This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The update grammar applet (http://www.w3.org/2007/01/applets/xquery-updateApplet.html) parses queries like: $x It also parses: $for It does not, however, parse: $updating The error message generated is: Encountered "$ updating" at line 1, column 1. Was expecting one of: "xquery" ... "version" ... "encoding" ... "module" ... "namespace" ... "declare" ... "boundary-space" ... "preserve" ... "strip" ... "default" ... "element" ... "function" ... "option" ... "ordering" ... "ordered" ... "unordered" ... "order" ... "empty" ... "copy-namespaces" ... "no-preserve" ... "inherit" ... "no-inherit" ... "collation" ... "base-uri" ... "import" ... "schema" ... "at" ... "variable" ... "construction" ... "as" ... "return" ... "for" ... "in" ... "let" ... "where" ... "by" ... "stable" ... "some" ... "every" ... "satisfies" ... "typeswitch" ... "case" ... "if" ... "then" ... "else" ... "or" ... "and" ... "to" ... "*" ... "div" ... "idiv" ... "mod" ... "union" ... "intersect" ... "except" ... "instance" ... "of" ... "treat" ... "castable" ... "cast" ... "eq" ... "ne" ... "lt" ... "le" ... "gt" ... "ge" ... "is" ... "validate" ... "lax" ... "strict" ... "child" ... "descendant" ... "attribute" ... "self" ... "descendant-or-self" ... "following-sibling" ... "following" ... "@" ... "parent" ... "ancestor" ... "preceding-sibling" ... "preceding" ... "ancestor-or-self" ... ".." ... "document" ... "text" ... "comment" ... "processing-instruction" ... "empty-sequence" ... "item" ... "node" ... "document-node" ... "schema-attribute" ... "schema-element" ... "first" ... "last" ... "into" ... "after" ... "before" ... "insert" ... "nodes" ... "delete" ... "replace" ... "value" ... "rename" ... "copy" ... "modify" ... "update" ... "transform" ... "do" ... "type" ... "-" ... "+" ... "external" ... "ascending" ... "descending" ... "greatest" ... "least" ... <QNameToken> ... <NCNameColonStar> ... <StarColonNCName> ... <IntegerLiteral> ... <DecimalLiteral> ... <DoubleLiteral> ... <StringLiteral> ... "$" <QNameToken> ... "$" "external" ... "$" "xquery" ... "$" "version" ... "$" "encoding" ... "$" "module" ... "$" "namespace" ... "$" "declare" ... "$" "boundary-space" ... "$" "preserve" ... "$" "strip" ... "$" "default" ... "$" "function" ... "$" "option" ... "$" "ordering" ... "$" "ordered" ... "$" "unordered" ... "$" "order" ... "$" "empty" ... "$" "greatest" ... "$" "least" ... "$" "copy-namespaces" ... "$" "no-preserve" ... "$" "inherit" ... "$" "no-inherit" ... "$" "collation" ... "$" "base-uri" ... "$" "import" ... "$" "schema" ... "$" "at" ... "$" "variable" ... "$" "construction" ... "$" "update" ... "$" "as" ... "$" "lax" ... "$" "strict" ... "$" "return" ... "$" "transform" ... "$" "do" ... "$" "for" ... "$" "in" ... "$" "let" ... "$" "where" ... "$" "by" ... "$" "stable" ... "$" "ascending" ... "$" "descending" ... "$" "some" ... "$" "every" ... "$" "satisfies" ... "$" "case" ... "$" "then" ... "$" "else" ... "$" "or" ... "$" "and" ... "$" "to" ... "$" "div" ... "$" "idiv" ... "$" "mod" ... "$" "union" ... "$" "intersect" ... "$" "except" ... "$" "instance" ... "$" "of" ... "$" "treat" ... "$" "castable" ... "$" "cast" ... "$" "eq" ... "$" "ne" ... "$" "lt" ... "$" "le" ... "$" "gt" ... "$" "ge" ... "$" "is" ... "$" "validate" ... "$" "child" ... "$" "descendant" ... "$" "self" ... "$" "descendant-or-self" ... "$" "following-sibling" ... "$" "following" ... "$" "parent" ... "$" "ancestor" ... "$" "preceding-sibling" ... "$" "preceding" ... "$" "ancestor-or-self" ... "$" "document" ... "$" "insert" ... "$" "first" ... "$" "last" ... "$" "into" ... "$" "after" ... "$" "before" ... "$" "delete" ... "$" "replace" ... "$" "value" ... "$" "rename" ... "$" "copy" ... "$" "modify" ... "$" "nodes" ... "$" "type" ... "$" "attribute" ... "$" "comment" ... "$" "document-node" ... "$" "element" ... "$" "if" ... "$" "item" ... "$" "node" ... "$" "processing-instruction" ... "$" "schema-attribute" ... "$" "schema-element" ... "$" "text" ... "$" "typeswitch" ... "$" "empty-sequence" ... "(" ... "." ... "<" ... "<" ... "<!--" ... "<!--" ... "<?" ... "<?" ...
It looks like the solution is simply to add <g:string process-value="yes" if="update">updating</g:string> to the g:production for FunctionQName in xpath-grammar.xml. Of course, there may be other keywords that need a similar treatment. (It seems odd to me that we don't (in effect) generate the production for FunctionQName automatically. It would avoid this kind of problem.)
I've done some additional testing, and find that 4 of our keywords cannot be used as variable names. These are "revalidation", "skip", "updating", and "with".
(In reply to comment #2) > I've done some additional testing, and find that 4 of our keywords cannot be > used as variable names. These are "revalidation", "skip", "updating", and > "with". > I just checked in a version that recognizes these all as QNames.