W3C home > Mailing lists > Public > www-ql@w3.org > April to June 2001

Re: What's implementable in XPath expressions?

From: Michael Dyck <MichaelDyck@home.com>
Date: Wed, 25 Apr 2001 23:21:51 -0700
Message-ID: <3AE7BE7F.82DCB20B@home.com>
To: Howard Katz <howardk@fatdog.com>
CC: www-ql@w3.org
Howard Katz wrote:
> 
> What's actually implementable at the head of an XPath expression? I'm trying
> to figure out what's allowed by the following snippet from the JavaCup
> grammar:
> ...
> Certainly $VarName/somePath and DOT/somePath are going to be commonly seen,
> but what about the others? What's the meaning of
> [ElementConstructor]/somePath, for example? Or even [Literal]/somePath? How
> should I interpret these constructs?

<http://www.w3.org/TR/xpath#node-sets>, the corresponding point in the XPath
spec, says

    The / and // operators compose an expression and a relative
    location path. It is an error if the expression does not
    evaluate to a node-set.

If XQuery has similar semantics, I think [ElementConstructor]/somePath could
be valid (if perhaps pointless), e.g.
    <foo><bar/></foo> / bar
but [Literal]/somePath would never be valid.

-Michael Dyck
Received on Thursday, 26 April 2001 02:23:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:10:17 GMT