[jdom-interest] Namespace inheritance after cloning

Alistair Young alistair at smo.uhi.ac.uk
Mon Nov 29 03:06:40 PST 2004


I seems to be expose the "flaw" in XML. XML is designed to be human 
readable - why? It's used for communication between machines! They're 
even pushing it for the backbone of the semantic web.
Problem is, there are two "interpretations" of XML - the human and the 
machine. The JDOM namespace behaviour is appropriate for the machine 
interpretation but I thought JDOM was to allow easier access to XML for 
humans. It's a great system - for the first time I've written XML 
handling code without constantly referring to the javadocs - that's a 
BIG step forward :)
It's just a pity that the human and machine interpretations clash when 
using namespaces. It's like I have to understand the physics of 
thermostats to boil my kettle :)
Alistair

On 29 Nov 2004, at 10:55, Eric VERGNAUD wrote:

> le 29/11/04 11:03, Alistair Young à alistair at smo.uhi.ac.uk a écrit :
>
>> It would be nice, if, when you addContent to an Element, if the new
>> Content didn't have any namespaces, JDOM didn't add the empty
>> namespace. Rather, it would just assume the new Content was to inherit
>> the original namespace. Of course, if a namespace is associated with
>> the new Content, then JDOM would honour this and add it.
>> Just a thought...
>> Alistair
>>
>
> Don't enter this subject Alistair, it's in the "pragmatic programmers
> against ayatollahs" area.
>
> The fact that this subject comes up every now and then doesn't seem to 
> make
> the ayatollahs doubt.
>
> The fact that a 10 lines patch was proposed that would allow this 
> behaviour
> as an option, and was refused basically on the motive that some gurus
> involved in this project have no consideration for dummies (which I 
> claim to
> be), shows that it's useless to propose improvements.
>
> Convenience is the enemy of theology.
>
> Eric
>
> If you're interested in the patch, I think I still have it somewhere.
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com




More information about the jdom-interest mailing list