[jdom-interest] Namespace inheritance after cloning
phil.weighill-smith at volantis.com
Mon Nov 29 09:03:39 PST 2004
Risking a flame or two, the approach we took as to provide an external
"clone" mechanism that could generate a copy of a (part of a) JDOM node
tree, modifying all the namespaces for the elements in that tree to a
namespace passed into the mechanism. This allows you to do what you want
without getting into the question of modifying JDOM's source to behave
in a non-XML-consistent manner.
On Mon, 2004-11-29 at 16:40, Elliotte Harold wrote:
> Eric VERGNAUD wrote:
> > 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 ?
> Not, in this case, no. JDOM's approach is the only sensible one.
> Alternatives have been tried, and they've failed. Every single developer
> and every technology for working with XML that has tried to make
> namespaces properties of position rather than part of the element's
> fundamental nature has quickly realized the error of their ways, and
> adopted JDOM's approach. JDOM was not the first to do it, and it won't
> be the last. But there are *no* alternative techniques for
> namespace-aware processing of XML that have achieved any success.
> if you want to convince me otherwise, you're going to have to do more
> than talk. You're going to have to demonstrate that the alternative
> approach actually works by producing an API that uses it, getting a wide
> number of people to use it for processing documents that use namespaces,
> and then showing that they are not confused and do not produce buggy code.
> You don't have to do it all yourself. JDOM's open source. Fork it and
> try for yourself. But this experiment has been done before and the
> outcome's always been the same. I am confident that you or anyone else
> who actually tried to use an API like this for any significant period of
> time would very quickly see the wisdom of JDOM's approach.
Phil Weighill-Smith <phil.weighill-smith at volantis.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest