[jdom-interest] Problems with default namespaces in Attributes

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Jun 27 05:44:07 PDT 2001

At 1:05 PM +0300 6/27/01, oskar.lonnberg at nokia.com wrote:

>I have some problems with default namespaces and attributes. If there is
>a default namespace (xmlns="...") defined for an element it should apply
>to its attributes also. The element namespace is retrieved correctly, but
>the attributes do not have any namespace defined. The code in the end should
>demonstrate the bug.

No. Default namespaces never apply to attributes. The namespaces spec 
is quite clear on this point. JDOM and the parsers it relies on are 
correct here.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |

More information about the jdom-interest mailing list