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: Fri, 27 Apr 2001 00:14:01 -0700
Message-ID: <3AE91C39.C02E2FD6@home.com>
To: www-ql@w3.org
Howard Katz wrote:
> I've just been having some conceptual difficulty grokking the
> marriage of an angle-bracket representation of XML with XPath
> relative location syntax. Unaccustomed to the mixed notation, I've been
> finding the idea of "/<aRoot></aRoot>/someRelPath" difficult to grasp.

Ah, well, *that* example is another matter. According to the Appendix B
grammar, the only thing that can come after a '/' is a Step, which is fairly
restricted and does not include ElementConstructor. So 
in your example is syntactically invalid. However, an ElementContructor can
occur *before* the first '/' of a PathExpr, so
is syntactically okay. (Although because the constructed aRoot element has
neither children, attributes, or parent, there's not much you could
substitute for "someRelPath" that would actually yield anything. Perhaps
just dot.)

> Once I translate that into "/aRoot/someRelPath," I'm fine.

Nope, not the same thing. Or rather, if we transpose to the land of
syntactically valid expressions,
is not equivalent to

Received on Friday, 27 April 2001 03:15:48 UTC

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