W3C home > Mailing lists > Public > www-xpath-comments@w3.org > January to March 2003

RE: XPath2 questions

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Thu, 6 Mar 2003 20:08:45 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E621060453E113@daemsg02.software-ag.de>
To: peter.schonefeld@bigpond.com, www-xpath-comments@w3.org

> I have a few questions relating to an implementation of 
> XPath2.0 and hope this is the correct address for advice.

The preferred address is public-qt-comments@w3.org, since we found that many
comments related to the family of specs including XPath, XSLT, and XQuery.
> I'd like to better understand how to address the context item 
> focus over a sequence of nodes. For example, given the 
> following input sequence into the expression "//child::mynode" :
> (
>   <mydocA><mynode></mydocA>,
>   <mdocB><mynode></mydocB>
> )

The question is, what is the context node when the expression
//child::mynode is issued? In your example you appear to have a sequence of
two elements, which do not belong to the same document. An expression
starting with "//" selects relative to the root of a document, and (at least
in this case) it will only select nodes in the same document as the context
> Will this return (<mynode>,<mynode>), the child nodes of 
> <mydocA> and <mydocB>?

Not unless these nodes are in the same document.
> Also, in the case of the expression "child::mydocA" operating 
> on the same input sequence, will this result in a singleton 
> sequence of (<mydocA>)? My feeling is that it does, however 
> if this is correct, I'm finding it difficult to conceptualise 
> the notion of a child axis for a sequence of items.

Axes operate only within trees, not within sequences.
> Finally, is there a test suite available or under development 
> for XPath 2.0?

I'm not aware of any coordinated efforts to develop such a suite.

Michael Kay
Software AG
Received on Thursday, 6 March 2003 14:09:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:02:15 UTC