Radical Suggestion (was Re: Antwort: RE: [jdom-interest] Namespacehelp)

Dennis Sosnoski dms at sosnoski.com
Thu Jul 25 13:36:46 PDT 2002

Jason Hunter wrote:

>Elliotte has the best argument why we can't implement a fancy namespace
>inheritance model:  Your <table> element is either an XHTML table or a
>Furniture table and must always stay in the appropriate namespace
>regardless of where it moves in the tree.
Perhaps not the best example, since I can't imagine anyone mixing XHTML 
<table> and Furniture <table> in the same document, but I understand the 
point. This is certainly the XML-centric POV.

>Plus, my personal opinion is that if you think there are questions now,
>imagine if namespaces were inherited!  People would move elements,
>they'd change namespaces, and subtle bugs would waste countless hours. 
>It'd be a nightmare!
I suspect that moving elements is a very small portion of JDOM usage, 
and when done at all the move almost always takes place between 
compatible (i.e. same default namespace) subtrees. If you're moving your 
Furniture around, you're probably not going to dump it in the middle of 
a (XHTML) page. ;-) Your nightmare scenario is essentially the state of 
things now for the far more common case of building a tree.

>The current model is predictable, appropriate for XML, and exposes any
>misconceptions right away.  That's all very important.
I don't feel strongly about this and won't dispute further, but thought 
I'd point out that taking a different approach to namespaces would 
probably be more consistent with JDOM's goal of making XML easier for 
Java developers.

  - Dennis

More information about the jdom-interest mailing list