- From: Michael Dyck <jmdyck@ibiblio.org>
- Date: Wed, 20 Nov 2002 23:13:32 -0500 (EST)
- To: public-qt-comments@w3.org
XQuery 1.0: An XML Query Language
W3C Working Draft 13 November 2002
A.1.1 Syntactic Constructs
---------------------------------------------------------------------------
Character Classes
"The following basic tokens are defined in [XML]."
I really don't think you want to call them tokens.
Why not "character classes"?
2. BaseChar
3. Ideographic
These are not used. Delete them.
1. Letter
4. CombiningChar
5. Digit
6. Extender
These are only used to define Nmstart and Nmchar, which are used only
to define NCNameForPrefix, which is identical to NCName, and is thus
redundant. Delete them.
---------------------------------------------------------------------------
Identifiers
2. NCNameChar
3. Prefix
5. LocalPart
None of these are used. Delete them.
---------------------------------------------------------------------------
"String Literals and Numbers"
They're not numbers, they're numerals. How about a header of just
"Literals"?
[4] StringLiteral
[5] URLLiteral
The fact that these two productions are marked "(ws: significant)"
suggests that all the other (unmarked) productions in this section are
subject to the default whitespace rules (i.e., whitespace is allowed
between lexemes), which raises the question of what the lexemes are in
these rules. Assuming you want to avoid such (pointless) questions, you
could either mark all the other productions as "ws: explicit", or (my
preference) you could delete the marking on these two and just say
somewhere that none of the productions in this section allow implicit
whitespace.
[5] URLLiteral
Given that URLLiteral has exactly the same BNF as StringLiteral,
and denotes exactly the same value, why not just say:
URLLiteral ::= StringLiteral
(and put it in A.2). Then you've still got a symbol on which to hang
any prose restrictions.
---------------------------------------------------------------------------
Comments
"They are allowed whereever whitespace is allowed"
Change "whereever" to "wherever".
"as long as the whitespace notation in not 'explicit' or 'significant'.
Change "in" to "is".
---------------------------------------------------------------------------
Defined Tokens
"The following is a list of defined tokens for the XQuery grammar."
First, it's not a list of tokens, it's a list of productions. You could
maybe stretch things and say it's a list of symbols, but they're not
even (all) token symbols. Specifically, these aren't:
[8] Nmstart
[9] Nmchar
[10] Digits
[16] HexDigits
[20] WhitespaceChar
It's also debateable whether S should be considered a token symbol.
Instead of saying "defined tokens", you could just say "other symbols".
[7] S
This definition is equivalent to the one in the XML spec. You could
just use that one.
[8] Nmstart
[9] Nmchar
[14] NCNameForPrefix
Nmstart and Nmchar are used only to define NCNameForPrefix, which is
identical to NCName. I suggest you delete these three definitions, and
change all occurrences of NCNameForPrefix to just NCName.
[11] EscapeQuot ::= '"' '"'
Why not just '""' (like EscapeApos)?
[19] Char
Supposedly, "legal characters are those allowed in the XML
recommendation", but this definition of Char:
includes [#xD800-#xDFFF], which XML excludes, and
excludes [#x10000-#x10FFFF], which XML includes.
[19] Char
[20] WhitespaceChar
You don't need the parentheses around the right-hand sides.
-Michael Dyck
Received on Friday, 22 November 2002 00:34:09 UTC