[jdom-interest] xmlns="" in children elements of root

John Muhlestein jmuhlestein at i-link.net
Wed Aug 29 10:59:21 PDT 2001


I disagree, based on earlier discussions, I don't believe this functionality
is worth the overhead.  Every element has a namespace, and you should be
responsible for assigning that namespace when the element is created.

John

> -----Original Message-----
> From: Rodney S. Foley [mailto:rsfoley at harddollar.com]
> Sent: Wednesday, August 29, 2001 11:34 AM
> To: jdom-interest at jdom.org
> Cc: 'philip.nelson at omniresources.com'
> Subject: RE: [jdom-interest] xmlns="" in children elements of root
> 
> 
> I would purpose that JDOM check every time an element(a) is 
> added to another
> element(a) that element(a) checks for element(b)'s namespace. 
>  If none was
> set, then element(a) give's element(b) it's namespace, and 
> set's a flag on
> element(b) stating namespace was automatically set.  
> 
> So anytime an element is moved around on the tree that if the 
> namespace was
> automatically set, that it continues to be changed to it's 
> new parent's
> namespace.
> 
> -----Original Message-----
> From: philip.nelson at omniresources.com
> [mailto:philip.nelson at omniresources.com]
> Sent: Wednesday, August 29, 2001 9:55 AM
> To: laurent.bihanic at atosorigin.com
> Cc: jdom-interest at jdom.org
> Subject: RE: [jdom-interest] xmlns="" in children elements of root
> 
> 
> 
> 
> > Yet, I agree with Rodney that if you define a default 
> > Namespace one can expect 
> > the constructor with no Namespace argument to use the default 
> > Namespace.
> > 
> > This is not an issue of whether JDOM is right or wrong but 
> > rather of how 
> > intuitive the JDOM API is and should be.
> > 
> > Laurent
> 
> Since I argued your point in those earler discussions, I can 
> only agree with
> you that the api as it stands does not follow what intuition 
> would dictate.
> However, I came to accept the api the way it is because,  
> first, it really
> is pretty easy to use, and second, this approach puts the 
> least amount of
> processing burden on the api.  To look upward for namespace 
> declarations,
> which JDOM does not model anyway, would have be done on very 
> single insert
> and anytime the namespaces were changed.  This way really is 
> simpler and
> faster I think.
> 
> The JDOM approach to namespaces is really simple and can be 
> described in a
> simple story (thanks Jason for that phrase which I use a lot 
> these days
> ;-)).  Each element has a namespace and you are responsible 
> to assign it in
> your code.
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhos
t.com
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com



More information about the jdom-interest mailing list