W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2009

[Bug 6899] New: Transform: replaced attributes should be untyped

From: <bugzilla@wiggum.w3.org>
Date: Mon, 11 May 2009 17:57:52 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-6899-523@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6899

           Summary: Transform: replaced attributes should be untyped
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Update Facility
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


This relates to test case setToUntyped-010.xq

The essence of this query is:

copy $var1 := document { <test oldattr="abc"><content/></test> }
modify replace node $var1/test[1]/@oldattr with
$input-context/BOOKLIST[1]/BOOKS[1]/ITEM[1]/@CAT
return
    (
    $var1/test[1]/@CAT instance of attribute(*, xs:untypedAtomic),
    $var1/test[1]/@CAT instance of attribute(*, xs:string)
    )

and the expected result is that @CAT is typed as xs:string.

I think this is consistent with the rules for upd:replaceNode() as written in
3.1.8. However, it creates an inconsistent data model. The rules for the
copy-modify expression (2.4.5 clause 1.c.i) ensure that the test attribute is
xs:untyped, and XDM consistency requires that the attributes of an xs:untyped
element are all xs:untypedAtomic.

I believe that clause 1.b of 3.1.8 should change from

"If the type-name property of parent($target) is xs:untyped, then
upd:setToUntyped() is invoked on each element node in $replacement."

to

"If the type-name property of parent($target) is xs:untyped, then
upd:setToUntyped() is invoked on each element and attribute node in
$replacement."

and the result of this test should then change so that @CAT is
xs:untypedAtomic.


-- 
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 Monday, 11 May 2009 17:58:02 GMT

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