- From: <scott_boag@us.ibm.com>
- Date: Tue, 2 Sep 2003 18:06:19 -0400
- To: "Kevin Jones" <kjones@actuate.com>
- Cc: public-qt-comments@w3.org, public-qt-comments-request@w3.org
- Message-ID: <OF3B2F7326.D168231A-ON85256D95.00766FB2-85256D95.00796B46@lotus.com>
Hi Kevin. Yes, there should be a third category, or maybe two more
specific categories:
1) required whitespace, i.e. one or more. In the XML definition of the
grammar this is <g:requiredSkip show="no"/>
2) optional whitespace. In the XML definition of the grammar this is
<g:optionalSkip/>.
I can only explain this with general rules, which is that "words" must be
separated by requiredSkip, and punctuation can be optionalSkip. I will
try and make this more explicit in the next draft.
-scott
public-qt-comments-request@w3.org wrote on 09/02/2003 01:50:44 PM:
> 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
> because
> 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 18:07:14 UTC