<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.0.10">
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.<BR>
On Mon, 2004-11-29 at 16:40, Elliotte Harold wrote:
<PRE><FONT COLOR="#737373"><I>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.</I></FONT></PRE>
<PRE><TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
Phil Weighill-Smith <<A HREF="mailto:email@example.com"><U>firstname.lastname@example.org</U></A>><BR>