W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2006

[Bug 3606] [XPath] delimiting tokens

From: <bugzilla@wiggum.w3.org>
Date: Thu, 17 Aug 2006 09:12:55 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1GDdvr-0007TW-Eh@wiggum.w3.org>

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

           Summary: [XPath] delimiting tokens
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


For unrelated reasons, I was looking at test LocalNameFromQNameFunc018, which
contains the line:

declare default element namespace"http://www.example.com/QNameXSD";

This test is intended to succeed, and Saxon parses it successfully; but looking
at the spec, it seems this isn't allowed. 

A2.2 (in XQuery) says: 

(a) The non-delimiting terminal symbols are: ... namespace, ... StringLiteral,
... 

(b) It is customary to separate consecutive terminal symbols by whitespace and
Comments, but this is required only when otherwise two non-delimiting symbols
would be adjacent to each other.

Is there any good reason why StringLiteral is classified as a non-delimiting
symbol?

Am I correct in saying that as the spec stands, the above line should be a
syntax error?

There are other oddities in the list of non-delimiting symbols as well. For
example, it includes Char. This suggests that in the production rule

[159]           CommentContents            ::=          (Char+ - (Char* ('(:' |
':)') Char*))

the Char tokens must be separated by whitespace, whereas of course the opposite
is true. I think that symbols that are used only in ws:explicit rules have no
place in this list.

Also, the statement "There are two exceptions to this, that of "." and "-",
which do require a symbol separator if they follow a QName or NCName" isn't
quite complete: "." also requires a separator if it precedes or follows a
numeric literal.

I encountered this in XQuery, but it applies in principle to XPath also.
Received on Thursday, 17 August 2006 09:13:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:44 GMT