[jdom-interest] Bug with Default Namespace

Rick Nucci rick_nucci at boomi.com
Thu Nov 9 07:45:19 PST 2000


What I am seeing is that when I create a doc object from the xml file below,
then debug it and look at the rootElement (Where this default namespace is
declared) it is not there.  Then when I output this same doc to a file, the
namespace declaration is present.

Rick


-----Original Message-----
From: Brett McLaughlin [mailto:brett.mclaughlin at lutris.com]
Sent: Thursday, November 09, 2000 10:15 AM
To: Rick Nucci
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] Bug with Default Namespace




----- 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