[Bug 3308] Which error to raise for attributes with the same node-name in a direct element constructor?


           Summary: Which error to raise for attributes with the same node-
                    name in a direct element constructor?
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: ying.lu@oracle.com
         QAContact: public-qt-comments@w3.org

For the following query,

<elem attr="val1" attr="val2" attr2="val3"/>

it can raise error XQST0040, according to XQuery specification section,
"If the attributes in a direct element constructor do not have distinct
expanded QNames as their respective node-name properties, a static error is
raised [err:XQST0040]."

It can also raise error XQDY0025, based on section bullet 5.d,
"attributes consist of all the attributes specified in the start tag as
described in Attributes, together with all the attribute nodes in the
content sequence, in implementation-dependent order. If two or more of these
attributes have the same node-name, a dynamic error is raised [err:XQDY0025]."

Should both error codes be allowed for the sample query? Please clarify.


Received on Thursday, 1 June 2006 21:15:01 UTC