[jdom-interest] bug in Element.getCopy ?

Jochen Strunk strunk at signal7.de
Fri Mar 2 01:56:23 PST 2001


At 18:11 01.03.2001 -0800, you wrote:
>The name and namespace uniquely identify an element and are intrinsic to
>that element.  Changing names or namespaces on a parent element should
>not change names or namespaces of children.
The XML namespace specification clearly states the following:
A default namespace is considered to apply to the element where it is 
declared (if that element has no namespace prefix), and to all elements 
with no prefix within the content of that element.

That contradicts to what you are saying because "no namespace" is not 
intrinsic to an element, it changes in the context of a parent element with 
a default namespace. If you change the default namespace of an element you 
also have to change the namespace of all its child elements with "no 
namespace". This you don't do in jdom, since every element is created with 
an empty namespace. Its a difference between the empty namspace and "no 
namespace" and in jdom there currently is no such thing as "no namespace".

jochen




(-) Jochen Strunk
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665402, Fax: 06151 665373
(-) strunk at signal7.de, www.signal7.de




More information about the jdom-interest mailing list