[Bug 1369] New: [XQuery] some editorial comments on 3.4 Arithmetic Expressions

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1369

           Summary: [XQuery] some editorial comments on 3.4 Arithmetic
                    Expressions
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: jmdyck@ibiblio.org
         QAContact: public-qt-comments@w3.org


3.4 Arithmetic Expressions

"A subtraction operator must be preceded by whitespace if it could otherwise be
interpreted as part of the previous token. For example, a-b will be interpreted
as a name, but a - b and a -b will be interpreted as arithmetic operations."
    Change "operations" to "expressions".

    The phrase "could otherwise" is vague. For instance, consider the query:
        a- b
    There's only one way to derive these characters from Expr (the "a minus b"
    way). That is, there isn't a legal way to interpret the '-' as part of the
    previous token. So one could say that the "could otherwise be interpreted"
    clause does not hold, and conclude that the hyphen needn't be preceded by
    whitespace. This is presumably not what you want, since the first example
    in A.2.2.1 says that
        foo- foo
    is a syntax error.
    It might suffice to tack on something like "See section [blah] for full
    details regarding the use of whitespace." which at least conveys that the
    sentences in question don't give a complete statement.

    Maybe put the sentences in a Note.

Received on Wednesday, 11 May 2005 07:15:20 UTC