[Bug 3778] 3.7.1.2: description for xmlns/xml is contradictory

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

           Summary: 3.7.1.2: description for xmlns/xml is contradictory
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: frans.englich@telia.com
         QAContact: public-qt-comments@w3.org


In 3.7.1.2 Namespace Declaration Attributes, the last point reads:

It is a static error [err:XQST0070] if a namespace declaration attribute binds
a namespace URI to the predefined prefix xml or xmlns, or binds a prefix other
than xml to the namespace URI http://www.w3.org/XML/1998/namespace.

Consider this query:

   <e xmlns:xml="http://www.w3.org/XML/1998/namespace"/>

Valid or not? On one hand it "binds a namespace URI to the predefined prefix
xml"(invalid) but on the other hand it binds a prefix to the namespace
"http://www.w3.org/XML/1998/namespace" that isn't 'other than "xml"'(valid).
This makes me think the paragraph is contradictory.

Assuming this is the intent:

* One may never bind to the prefix 'xmlns'
* One may only bind "http://www.w3.org/XML/1998/namespace" to "xml"
* "xml" may only be bound to "http://www.w3.org/XML/1998/namespace"

I suggest replacing the paragraph with:

'It is a static error[err:XQST0070] if a namespace declaration attribute binds
a namespace URI to the predefined prefix "xmlns" or binds the namespace URI
"http://www.w3.org/XML/1998/namespace" and the predefined prefix "xml" to
anything but themselves.'

A clearer version is welcome.

Some info:
* The XQTS appears to have no tests for '<e
xmlns:xml="http://www.w3.org/XML/1998/namespace"/>'
* Saxon 8.8J signals XQST0070 on the above query.

Received on Friday, 29 September 2006 16:35:08 UTC