[jdom-interest] Unrequested blank Attrib. Namespace for only the top Element

Rolf Lear rlear at algorithmics.com
Fri May 23 06:22:21 PDT 2003


Me thinks that you mis-understand Namespaces.

All your qsi Elements are in the "" Namespace, only it doesn;t say so on any
but the top element.

Thus, in the example:

<a xmlns="hello">
  <b />
  <b />
  <b />
  <b />
  <b />
</a>

Every element (the a and all the b's are in the "hello" namespace.

If you get around to reading the XML Spec, you will find that if you give a
Default Namespace for an element (one without a prefix), then all the child
elements will be part of that namespace unless explicitly given a different
namespace.

Pay really close attention to the Spec at:
http://www.w3.org/TR/REC-xml-names/#scoping-defaulting

Rolf

-----Original Message-----
From: Paul H. Roubekas [mailto:paul at roubekas.org]
Sent: Thursday, May 22, 2003 8:27 PM
To: 'HUFFMAN BRADLEY S'
Cc: jdom-interest at jdom.org
Subject: RE: [jdom-interest] Unrequested blank Attrib. Namespace for
only the top Element 


Someone Please help!

This is causing all my XPath expressions to return empty!  I have a
diedline and will have to work the weekend to fix this problem if no one
here can help.

-----Original Message-----
From: HUFFMAN BRADLEY S [mailto:hip at csa.cs.okstate.edu] 
Sent: Wednesday, May 21, 2003 12:06 AM
To: paul at roubekas.org
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] Unrequested blank Attrib. Namespace for
only the top Element 

> Why does my top level element, and not any of the others created by
the
> same code, always have a blank namespace declared? I only make new
"qsi"
> in two classes where the code looks the same to me.  Does the fact
that
> each element has the same name causing the problem? 

Does this happen with beta 8, 9, or the current cvs?

Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20030523/6dec63a2/attachment.htm


More information about the jdom-interest mailing list