W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2011

Re: Two grammar questions

From: Michael Kay <mike@saxonica.com>
Date: Sat, 01 Jan 2011 11:35:56 +0000
Message-ID: <4D1F119C.7040702@saxonica.com>
To: Krzysztof Maczyński <1981km@gmail.com>
CC: public-qt-comments@w3.org

>> [38]     AbbrevForwardStep     ::=     "@"? NodeTest
> Shouldn't that be NameTest?

No, it's correct as written. There aren't many cases where it's useful 
to write a NodeTest that isn't a NameTest ("@node()" is about the only 
one that makes sense, and that's a synonym for @*), but it's allowed for 
orthogonality. (@ can be used anywhere that "attribute::" can be used, 
and the things that can appear after "axis::" don't depend on which axis 
it is.
> Also, how does the grammar generate a PathExpression ending with "/" other than "/"?

It doesn't. There are no path expressions ending with "/", other than 
"/" itself.

Michael Kay
Received on Saturday, 1 January 2011 11:36:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:33 UTC