W3C home > Mailing lists > Public > www-xml-linking-comments@w3.org > January to March 2001

Re: XPointer Question on Axes

From: Michael Dyck <MichaelDyck@home.com>
Date: Sun, 18 Feb 2001 09:50:00 -0800
Message-ID: <3A900B48.CF323512@home.com>
To: Polman <polman@few.eur.nl>
CC: www-xml-linking-comments@w3.org
Polman wrote:
> 
> The production for NodeType now also includes 'point'
> and 'range'.
> 
> Does this imply that a queries (query fragments) like
>    ancestor::point()
> and
>    self::range()
> are correct,

Syntactically, yes.

> and if yes, what do they return, if, for example,
> the context location is a node location?

If the context location is a node, then the contents of its 'ancestor' and
'self' axes (and in fact, of *all* its axes) are defined by the XPath spec.
(XPointer doesn't override these.) In each case, the axis contains a set of
nodes. A NodeTest of "point()" or "range()" is false for any node, so the
above Steps would yield always yield empty location sets (when the context
location is a node).

> I have the feeling that I am constantly overlooking
> an essential phrase in the specs that explains all this.

It could just be the trick of knowing when the XPointer semantics "fall
through" to the XPath semantics.

-Michael Dyck
Received on Sunday, 18 February 2001 12:53:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:32:22 UTC