[Bug 1527] New: Grammar for abbreviated step

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1527

           Summary: Grammar for abbreviated step
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: chamberl@almaden.ibm.com
         QAContact: public-qt-comments@w3.org


The syntax for an abbreviated step now looks like this:

AbbrevForwardStep ::= "@"? NodeTest
NodeTest ::= KindTest | NameTest

This allows users to write silly things like this:

@comment()

which looks for a comment node on the attribute axis.
Of course, there is nothing on the attribute axis but attribute nodes, so there 
is no need for a KindTest following "@" in an abbreviated step.

We could eliminate this kind of silliness by changing the grammar as follows:

AbbrevForwardStep ::= NodeTest | "@" NameTest
NodeTest ::= KindTest | NameTest

Received on Saturday, 9 July 2005 19:12:57 UTC