W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2003

Whitespace in XQuery 1.0

From: Kevin Jones <kjones@actuate.com>
Date: Tue, 2 Sep 2003 10:50:44 -0700
Message-ID: <A1BD4B37957C934C9BCF6619615E41957A5CF6@exchange6.actuate.com>
To: <public-qt-comments@w3.org>
We are trying to validate our understanding of the XQuery lexical productions.  After reviewing the XQuery spec I've come the conclusion that it is very flexible on the use of whitespace. Two designations, explicit and significant, may be assigned to productions. Explicit states that any whitespace allowed in the production must be stated. Significant states that whitespace is allowed and must not be discarded.

The end result is that for everything else "whitespace may freely be added between terminals..." but it is apparently not required. In addition, the preference in lexical analysis is for the longest possible valid match.

So... the following would appear to be a valid xquery expression:

for$x in document("foo")/item stableorderby$x/size return$x


1) There is no requirement for whitespace between keywords and variable references
2) stableorderby can be represented by the grouing of terminals denoted by < "stable" "order" "by"> which again has no requirement for whitespace between terminals.

So our questions are (1) is this correct?  and (2) is this what people expected?

Kevin Jones
Received on Tuesday, 2 September 2003 15:50:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:49 UTC