[jdom-interest] Bug with Default Namespace

Brett McLaughlin brett.mclaughlin at lutris.com
Thu Nov 9 07:15:20 PST 2000


----- Original Message -----
From: "Rick Nucci" <rick_nucci at boomi.com>
Date: Wednesday, November 8, 2000 9:18 pm
Subject: [jdom-interest] Bug with Default Namespace

> Hello,
> 
> There is a bug in the latest codeset (I am using jdk1.3.0).  I am 
> trying to
> build() an XML doc that in the root element has a default namespace
> declared, like this:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Template xmlns="www.yahoo.com">
>            <Application1 xmlns:xplt="www.xxxx.com" 
> xmlns:xpl="www.xxxx.com"version="3.0">
>                        <xpl:insertText />
>                        <xplt:anyElement>
>                                    <Name />
>                        </xplt:anyElement>
>            
>            <Application2 xmlns:xplt="www.xxxx.com" 
> xmlns:xpl="www.xxxx.com"version="3.0">
>                        <xpl:insertText />
>                        <xplt:anyElement>
>                                    <Name />
>                        </xplt:anyElement>
>            
> </Template>
> 
> 
> After building this file and creating the org.jdom.Document 
> object, All is
> fine, except the default namespace (in this case for 
> www.yahoo.com) is
> ignored, ie not present in the doc object.  When this same 
> Document object
> is then output to a file using XMLOutputter, the file is complete and
> correct.  The problem is somewhere in the build() process, but I 
> have not
> been able to determine the exact cause.

How are you getting that default namespace? The Document object never 
stores any namespaces; the Template element will have the namespace with 
the URI www.yahoo.com.

What are you seeing? And how are you seeing it?

-Brett

> 
> Regards,
> 
> Rick Nucci
> 
> ______________________________________________
> 
> Rick Nucci
> Partner, Boomi Inc.
> (610) 834-8730
> rick_nucci at boomi.com
> http://www.boomi.com
> 
> 
> 




More information about the jdom-interest mailing list