[jdom-interest] Namespace inheritance after cloning

Eric VERGNAUD eric.vergnaud at wanadoo.fr
Mon Nov 29 06:42:06 PST 2004

le 29/11/04 13:42, Elliotte Harold à elharo at metalab.unc.edu a écrit :

> Eric VERGNAUD wrote:
>> Don't enter this subject Alistair, it's in the "pragmatic programmers
>> against ayatollahs" area.
> This is a crock. There is no conflict here. What you call the ayatollah
> approach is the pragmatic one. Making namespaces change depending on
> where an element was placed in a document or which document it was
> placed in would be hard to use, fragile, brittle, and confusing. It
> would make code extremely hard to maintain and debug, and extremely
> slow, even in the rare cases where it wasn't actively wrong. This
> approach would cause far more problems than it solves, and sooner rather
> than later.
> The problem is not that there is too much overhead to supporting two
> approaches. The problem is that one of the approaches (letting namespace
> URIs change depending on element position) is flat-out wrong. It is
> actively contrary to how namespaces are supposed to work in XML.
> I agree that the namespace syntax and scoping in XML is excessively
> confusing. This is hardly the only problem it causes. However, it is not
> JDOM's place to "fix" the brokenness of namespaces. JDOM's namespace
> handling is simply correct. It is substantially more correct than DOM's.
> If you are getting confused when using namespaces with JDOM, then that
> is because you are confused about namespaces; and it is better that you
> detect and correct your confusion sooner rather than later. JDOM helps
> you do that. There is no upside to enabling developers' mistaken beliefs
> about namespaces. A good API makes it easy to do things the right way
> and hard to impossible to do things the wrong way; and this is exactly
> what JDOM is doing.


You always seem to find it very convenient to put the blame on namespace

Did it ever occur to you that someone, with a perfect understanding, could
simply disagree on the purpose of tools and API's and on programming style
and habits WITHOUT being wrong, but simply different ?

That seems to be YOUR global misunderstanding.


More information about the jdom-interest mailing list