Saxon attempts to tokenize the content of an XQuery
extension expression (pragma) before examining the
QName to see whether it is a recognized pragma. This
strategy fails if the pragma uses lexical constructs
that the tokenizer cannot handle, or if the
tokenization rules are different from those of XQuery
itself. For example, it fails if the pragma contains a
Moreover, Saxon does not yet implement the new rule in
the XQuery grammar that the QName at the start of the
pragma contents must either represent the entire pragma
contents, or must be terminated by whitespace.
Source fix: replace the contents of the method
line 2103) by the contents of the attached file. Note
that this new version of the method incorporates the
changes for bug 1508451.
Test cases: K-ExtensionExpression-4/6/8 in XQTS,
qischema101 et seq in the Saxon test suite.