From: Kal A. <ka...@te...> - 2004-09-26 13:56:38
|
Hi Conal, Thanks for the update. I agree that XTMBuilder should either flag up a misplaced <scope> element as an error or process it, but it should definitely not just silently ignore it. There is an optional flag which turns on XTM validation: http://www.tm4j.org/tm4j/xtmbuilder/validation which you set by calling the setProperty method of XTMBuilder (although this gets hidden from you if you use the SerializedTopicMapSource helper). Following the maxim "Be strict in what you produce and generous in what you accept", I think that the builder should be able to handle a <scope> element appearing in the wrong place as a child of <baseName>, <occurrence> and <association> - so I'll enter a bug for this into the tracker. Cheers, Kal On Sun, 2004-09-26 at 08:06, Conal Tuohy wrote: > I think I've found what was going wrong with my topicmaps (in which the name > scopes were being ignored). > > I debugged org.tm4j.topicmap.utils.XTMBuilder and found that for a baseName > to be scoped, the scope element has to appear before the baseNameString > element. Looking at the DTD, this is of course perfectly correct - the > optional <scope> child of a <baseName> must be the first child element. So > it was my mistake. D'oh! :-( > > But it seems to me that it'd be nice for XTMBuilder to flag a <scope> > appearing after a <baseNameString> as an error, rather than ignoring it. The > scoping of <occurrence> and <association> elements is handled differently, > and for these elements XTMBuilder seems to accept <scope> elements which > appear (invalidly) after a <resourceData>, <member>, etc, > > Cheers > > Con > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users -- Kal Ahmed <ka...@te...> techquila |