Namespaces (Was: Re: [Xpath-ng] Thoughts on work products)

bryan bry at itnisk.com
Tue Nov 26 08:35:24 MST 2002



>That's right. Any node that does not have a parent returns the empty
>sequence as the result of the dm:parent() accessor.

>> What does dm:children return against a namespaceNode?

>An empty sequence. See the table at:

>  http://www.w3.org/TR/query-datamodel/#NamespaceNodeAccessors

Okay, I had some more time to read on it so my initial confusion is not
so bad as it was, okay I can accept it, sorry, sorry, I'm apt to
hysteria now that I've reached the age where I realize the world is
going to hell in a handbasket and I would much prefer to ride in an
applecart.

>I don't understand. Whether or not namespace nodes have a parent, you
can 
>still get hold of them by position() if you have several in a sequence.

This is from the overview of NamespaceNode:

"The information held in namespace nodes is instead made available to
applications using two functions defined in [Functions and Operators],
namely xf:get-in-scope-namespaces and xf:get-namespace-uri-for-prefix.
Certain properties of namespace nodes are not exposed by these
functions: in particular, properties related to the identity of
namespace nodes, their parentage, and their position in document order."

So I took that to mean that you can't get ahold of position() unless you
are accessing the namespace axis, which is deprecated, is that wrong?
But I don't think it's that important any longer now I've calmed down
and accepted that the xpath will, gulp, change. This is the second time
in three weeks that I've posted in haste repented at leisure, from now
on I should drink at least one cup of tea first. 


>My impression is that the decision was made because of implementation
>concerns. Why do you think W3C XML Schema support necessitates
namespace >nodes having no parents?

It was just one of those gut feelings things, my gut acting up a lot
lately no doubt invalidates it, I am apt to see XSDL infiltration in the
unlikeliest of places, why just the other day at my nephew's
kindergarten I noticed some of the kids were looking particularly
post-schema validated. The side effect you mentioned of removing
namespace nodes from the document reminded me of some of the ways that
XSDL seems to interact with namespaces, I did not think that the one
necessitated the other but rather that looking through the XSDL logic
glasses might have tinted the datamodel a particular shade of nasty
PSVI. 





More information about the Xpath-ng mailing list