[Bug 4997] Replace of attribute nodes can be ambiguous

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

           Summary: Replace of attribute nodes can be ambiguous
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Update Facility
        AssignedTo: andrew.eisenberg@us.ibm.com
        ReportedBy: john.snelson@oracle.com
         QAContact: public-qt-comments@w3.org


I believe the following update query is ambiguous:

copy $in := <employee name="Rhys Evans" gender="male"/>
modify (
do replace $in/@name with attribute {"salary"} {"10"},
do replace $in/@gender with attribute {"name"} {"Blodwyn Jones"}
)
return $in

In this case, should the result be err:XUDY0021 because the second replace adds
an attribute that already exists? Or should the transform succeed because the
first replace removes the attribute that the second replace clashes with?

Received on Thursday, 30 August 2007 12:33:17 UTC