[jdom-interest] Losing namespace with JDOM

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Sep 5 09:31:40 PDT 2002

At 8:52 AM -0700 9/5/02, Bhalchandra Patil wrote:
>Hello JDOM,
>I am facing a strange problem.
>I have a xml document which contains/use multiple
>namespaces. If i transform the document using JDOM,
>some of the attributes lose their namespaces. The
>input document has the namespaces declared at the
>(first) element level. If the input document contains
>the namespaces declaration at the top i.e. as
>attributes of the root element, then the problem
>doesnot occur.
>Also if i perform xml transformation, without using
>JDOM, the problem doesnot occur.
>Is this a bug?

It may be a bug in JDOM, but more likely it is a bug in your 
understanding of namespaces. You do know that unprefixed attributes 
are never in any namespace, right?  Without example code and 
demonstrations of the possible bug, there is little we can do to help 

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |

More information about the jdom-interest mailing list