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

[XQuery] Lexical rules for comment, pi, cdata

From: Sarah Wilkin <swilkin@apple.com>
Date: Fri, 23 Jan 2004 13:09:12 -0800
Message-Id: <64B41CDB-4DE8-11D8-B023-0003935B7D94@apple.com>
To: public-qt-comments@w3.org

In section A.2.2 Lexical Rules, "<!--", "<?" and "<![CDATA[" go to 
XML_COMMENT, PROCESSING_INSTRUCTION, and CDATA_SECTION respectively 
with pushState(). The direct element constructor "<" goes to START_TAG 
with pushState(OPERATOR)

Since the OPERATOR state is not pushed for comments, pis, and cdata, 
the following is illegal:
let $a := <!-- foo -->
return $a

whereas
let $a := (<!-- foo -->)
behaves correctly.

We suggest changing "<!--", "<?", and "<![CDATA" to push the OPERATOR 
state so the parentheses are not necessary.

--Sarah
Received on Friday, 23 January 2004 16:09:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:16 UTC