[Bug 12649] New: [XQuery 3.0] Namespace constructors: ordering of rules (editorial)

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

           Summary: [XQuery 3.0] Namespace constructors: ordering of rules
                    (editorial)
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: minor
          Priority: P2
         Component: XQuery 3.0
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


Section 3.8.3.7 clause 2 reads:

2. If the result of atomization is a single atomic value of type xs:NCName,
xs:string, or xs:untypedAtomic, it is used as the prefix property of the newly
constructed namespace node; if it can not be cast to xs:NCName, dynamic error
is raised [err:XQDY0074]. If the result is the empty sequence or an empty
string, the prefix property of the newly constructed namespace node is empty.
For any other result, a type error is raised [err:XPTY0004].

The rules here are in the wrong order; if the name is "" we raise an error
(because it's not an invalid NCName) before encountering the rule that says ""
is allowed. Furthermore, namespace nodes do not have a "prefix property". I
suggest:

2. If the result of atomization is an empty sequence or a single atomic value
of type xs:string or xs:untypedAtomic, then the following rules are applied in
order:

2a. If the result is castable to xs:NCName, then it is used as the local name
of the newly constructed namespace node. (The local name of a namespace node
represents the prefix part of the namespace binding.)

2b. If the result is the empty sequence or a zero-length xs:string or
xs:untypedAtomic value, the new namespace node has no name (such a namespace
node represents a binding for the default namespace).

2c. Otherwise, a dynamic error is raised [err:XQDY0074].  

3. If the result of atomization is not an empty sequence or a single atomic
value of type xs:string or xs:untypedAtomic, a type error is raised
[err:XPTY0004].

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 12 May 2011 13:11:52 UTC