- From: Alberto Massari <amassari@progress.com>
- Date: Mon, 05 May 2003 14:21:25 +0200
- To: public-qt-comments@w3.org
While I was working on updating the grammar files for our XPath/XQuery
parser, I noticed some problems with the new working draft:
[XPath & XQuery]
1) the DEFAULT state is missing the handler for QName (that should trigger
a transition to OPERATOR)
2) the QNAME state is no more needed (the only keyword that triggers this
state is OfType, that is no more in the specs)
3) the transition rules don't allow the syntax
"document-node(element(xxx))", because the "element(" string is not
recognized in the KINDTEST state that "document-node(" triggers (in that
state, "element" is recognized as a QName, then a transition is made to
CLOSEKINDTEST, where the "(" is not allowed).
So, "document-node(" should probably trigger the DEFAULT state (not the
ITEMTYPE, to not allow an occurrence indicator after the "element(" keyword)
4) this is probably just a side effect, that would need an example to make
it "official": the query "/ instance of document-node()" is not a valid
one, because "/" in the DEFAULT state doesn't trigger a transition to the
OPERATOR state, and "instance of" is only recognized in that state. So the
"instance" word is recognized as a QName, and "of" is considered an error.
The possible solutions I see are:
a) specify that the user needs to write "(/) instance of document-node()"
b) allow "instance of" in the DEFAULT state
c) add a parsing note specifying that "/" should trigger the OPERATOR
state if followed by a space
[XPath only]
1) the lexical rules in the appendix A.2.2 contains some "strange"
keywords, that looks like remains of the previous grammar rules, or
references to XQuery keywords that the publishing process still generated.
They are:
- in the DEFAULT state, "OfType","RBrace" and "LbraceExprEnclosure"
- in the OPERATOR state, "Global", "LbraceExprEnclosure", "InContext",
"OfType", "RBrace"
- in the KINDTEST state, "LbraceExprEnclosure", "InContextForKindTest", and
"Global"
- in the CLOSEKINDTEST state, "LbraceExprEnclosure"
- in the SCHEMACONTEXTSTEP state, "LbraceExprEnclosure"
Also, there is a QMark symbol that should be displayed as "?"
[XQuery only]
1) the lexical rules in the appendix A.2.2 contains some "strange"
keywords, that looks like remains of the previous grammar rules, or
references to XQuery keywords that the publishing process still generated.
They are:
- in the DEFAULT state, "OfType"
- in the OPERATOR state, "InContext", "OfType"
Also, there is a QMark symbol that should be displayed as "?"
Alberto
-------------------------------
Alberto Massari
Progress Software
http://www.StylusStudio.com
Received on Monday, 5 May 2003 10:00:13 UTC