[xquery-talk] VarRef

Bob Foster bob at objfac.com
Mon May 30 03:26:59 PDT 2005

Sijo Mathew wrote:
 > Well, I shall list out another non-terminal defn which is used
 > both in the XML and in the XQuery spec.
 >     Predefined entity references are used both in the XML and
 > in the XQuery specification. The grammar defn follows.
 >>From XQuery grammar,
 > [147] PredefinedEntityRef    ::=    "&" ("lt" | "gt" | "amp"
 >                                                     | "quot" | 
"apos") ";"
 >>From XML spec.
 > [68]    EntityRef    ::=    '&' Name ';'
 > And predefined entities are specified as amp, lt, gt, apos, quot
 > So, according to XQuery, white spaces are allowed between
 > "&" symbol and "lt", but in XML which is NOT allowed.

It's the same in XQuery. To sort out the whitespace rules in XQuery you 
need to look at the normative comments in Appendix A, which don't appear 
the body of the document. PredefinedEntityRef is marked /* ws: explicit */.

Bob Foster

More information about the talk mailing list