Closed rhdunn closed 7 years ago
This is affected by the same problem as #9
According to the XQuery 3.0 grammar, a DirElemConstructor item does not have a space between the <
and NCName. Saxon generates an XPST0003 error (syntax error) for the following construct:
< a/>
NOTE: The "Building a Tokenizer for XPath or XQuery" document is taken from the appendix of a pre-1.0 version of XQuery. From 1.0, the structure of the document is fully described as an EBNF grammar. A tokenizer/lexer would need to process a subset of that grammar (e.g. for direct XML element construction).
Given:
incorrectly generates the following errors:
It looks like the '<' operator is being interpreted as the start of an XML tag.
NOTE: Neither
if (1 < 2) then ...
norif ((1+1) < 2) then ...
generate errors.