[jdom-interest] JDOM && Jaxen

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Aug 2 05:32:09 PDT 2001

At 8:26 AM -0400 8/2/01, bob mcwhirter wrote:

>Now I'm completely confused.
>Is the namespace:: axis then a set of all namespace mappings in scope
>for a particular element?  Or is it the decls of namespaces on an

The former, all namespaces in scope on the element, regardless of how or where they were applied. Namespace declarations are not exposed in any way in the XPath data model. An XSLT stylesheet, for example, can do nothing with namespace declarations.

>Is the spec really saying not to expect to find namespace information
>in the attribute:: axis?

Yes. That's exactly what it's saying. 

Again, this is XPath's decision, and predates JDOM by a couple of years. JDOM had nothing to do with this. However, both XPath and JDOM share the philosophy that only what namespaces are in scope matters. How and where those namespaces were applied is an irrelevant detail of serialization.

| 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