Namespaces (Was: Re: [Xpath-ng] Thoughts on work products)
Jeni Tennison
jeni at jenitennison.com
Tue Nov 26 09:01:09 MST 2002
Hi Bryan,
> 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.
OK :)
>>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?
Well, the namespace URIs returned by xf:get-in-scope-namespaces() will
still be in *some* order, which is likely to be determined by just the
same (arbitrary, implementation-defined) logic that was previously
used to determine the relative order of namespace nodes.
>>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.
I get that all the time ;)
> 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.
As far as I can recall, the only namespace-related thing that W3C XML
Schema introduces to the PSVI is xs:QName values. Namespace
information items (which don't have parents etc. -- are more like
namespace nodes in XPath 2.0 than in XPath 1.0) come from the plain
old XML Infoset.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
More information about the Xpath-ng
mailing list