AW: [Objectbridge-developers] [Fwd: [objectbridge - Open Discussi on] New repository.xml/dtd propo
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2001-08-29 08:29:31
|
Hi again, > -----Urspr=FCngliche Nachricht----- > Von: Ivan Toshkov [mailto:to...@cr...] > Gesendet: Mittwoch, 29. August 2001 10:13 > An: Thomas Mahler > Cc: Iv...@ho...; objectbridge > Betreff: Re: [Objectbridge-developers] [Fwd: [objectbridge - Open > Discussion] New repository.xml/dtd proposal.] >=20 >=20 > On Tue, 2001-08-28 at 21:40, Thomas Mahler wrote: > > Hi Ivan,=20 > >=20 > > Thanks for your proposal. It's really an improvement to the old = DTD! > > Very well done! > > I have some minor remarks which you find below. > >=20 > >=20 > > > Subject: [objectbridge - Open Discussion] New repository.xml/dtd > > > proposal. > > > Date: Tue, 28 Aug 2001 07:34:38 -0700 > > > From: no...@so... > > > To: no...@so... > > >=20 > > > Read and respond to this message at: > > > http://sourceforge.net/forum/message.php?msg_id=3D221783 > > > By: core > > >=20 > > > Hello, > > >=20 > > > Here is a proposal for new repository.xml and DTD based on the > > > discussion, which > > > took place in the mailing list. > > >=20 > > > Unfortunately, there are some problems with my email=20 > provider, so I may > > > be not > > > aware of all the recent posts. > > >=20 > >=20 > > I posted your proposal to the mailinglist, so that evryone=20 > listening may > > comment on it. > Thanks. The mail servers seems to operate normaly again :) > >=20 > > > The changes are as follows: > > > 1) Decoupling the repository to the following top-level=20 > elements: > > > jdbc-connection (formerly ConnectionDescriptor), > > > table (formerly part of the ClassDescriptor), > > > class (formerly part of the ClassDescriptor) and > > > class-extension (formerly ClassDescriptor/ExtentDescriptor). > > >=20 > >=20 > > I'd prefer to call it extent, interface or class-extent rather than > > class-extension. > Ok, I'll change that. > >=20 > > > 2) Put all the data in attributes, instead of as text.=20 > This is useful > > > because > > > the DTD can describe the attributes better than the text (e.g. > > > enumeration of > > > values) and it's easer to write SAX parser, because you=20 > can do most of > > > the > > > work in the start event, rather than the end. > > >=20 > >=20 > > I agree. The main reason why I started with an element=20 > oriented DTD was > > that I thought it would be easier to read for humans. But I=20 > think your > > grammar is at least as readable as my original version! > >=20 > > > 3) Changed the naming convention to something, which=20 > more closely > > > resambles > > > the one used by W3C. > > >=20 > >=20 > > It's quite clear to read. What I liked with my old DTD was that the > > element names (say "ClassDescriptor") corresponded with the=20 > respective > > classes that were instantiated by the parser. > > But that's not a real argument... > Well, nither is mine. I wanted one naming convention and I'm=20 > quite used > to the one I proposed, so this is the result. > >=20 > > > One of the remaining issues is the element, formerly=20 > known as (prince? > > > ;)) `deciptor_ids'. It contains a space separated list=20 > of foreign key > > > references. > > > I don't know if this should go to the new `table' or=20 > `class' elements. > > >=20 > >=20 > > Actually the descriptor_ids were referencing the=20 > fielddescriptors of the > > "other" class. Thus we have to use names that identify the=20 > respective > > field element. > > For example: > > <class table-ref=3D"Kategorien" > > name=3D"test.ojb.broker.ProductGroupWithTypedCollection"> > > <field column=3D"Kategorie_Nr" name=3D"groupId"/> > > <field column=3D"KategorieName" name=3D"groupName"/> > > <field column=3D"Beschreibung" name=3D"description"/> > > <collection item-class=3D"test.ojb.broker.Article" > > name=3D"allArticlesInGroup" > > =20 > collection-class=3D"test.ojb.broker.ArticleCollection" > > auto-retrieve=3D"yes" > > auto-update=3D"yes" > > auto-delete=3D"yes"> > > <ref-id id=3D"productGroupId"/> > > </collection> > > </class> > >=20 > > where the 1-n relation between ProductGroup and ARticle is=20 > maintained by > > the foreign key attribute productGroupId in class Article: > > ... > > <field column=3D"Kategorie_Nr" name=3D"productGroupId"/> >=20 > Yes, I was too lazy to change this. Actually, I've generated the XML > from the old one with an XSL (which can post here, once the XML > structure is finalized) and fixed some of the problems=20 > manually. Then I > used JBuilder 5, which can create a DTD from XML and again=20 > fixed *some* > of the problems manually. >=20 > What bothers me with descriptor_ids is that it seems important in = both > class and table elements. In table it will be used to generate the > foreign keys and it should reference to column names. If its in = class, > it should use field names. >=20 > I don't know OJB internals, so I don't know if we can eliminate the > second choice, so perhaps I should eliminate the first one=20 > (as it is in > the proposed xml). >=20 ojb depends on the proper reference to the class-attribute descriptor! = Of course it would be better to have this information only in one place. Thomas >=20 > -- > Ivan >=20 >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > http://lists.sourceforge.net/lists/listinfo/objectbridge-developers >=20 |