This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6482 - [UPD] setToUntyped() and xml:id
Summary: [UPD] setToUntyped() and xml:id
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-28 11:58 UTC by Michael Kay
Modified: 2011-01-07 11:44 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2009-01-28 11:58:33 UTC
A literal reading of setToUntyped() suggests that the is-id property is cleared for all attributes, including an attribute named xml:id.

A number of tests in the test suite, for example setToUntyped-001, take the same interpretation.

However, the data model specification states (twice): "The is-id property is always true for attributes named xml:id.".

Admittedly it says this under "construction from an InfoSet" and "construction from a PSVI". However, the wording used strongly suggests that it is intended to be a universal rule. And certainly, it is a sensible rule: the whole point of xml:id is that IDness should be determined solely by the choice of attribute name.

I believe that the update spec should treat this as a constraint, and ensure that the is-id property is always true for attributes named xml:id (whether these are existing attributes, newly created, or whatever.)

[I have this rule very deeply hard-wired into my data model implementation, and I think it is reasonable to do so.]
Comment 1 Michael Kay 2009-02-24 17:51:53 UTC
This change was accepted.

Action on MK to examine the test suite
Comment 2 Jonathan Robie 2009-02-24 17:53:32 UTC
Change: 

http://www.w3.org/TR/xqupdate/#id-upd-set-to-untyped

2. If $N is an attribute node, its properties are changed as follows:

a. type-name is set to xs:untypedAtomic.
b. typed-value is set equal to the string-value property, as an instance of xs:untypedAtomic.
c.  is-id and is-idrefs are set to false.

To:

2. If $N is an attribute node, its properties are changed as follows:

a. type-name is set to xs:untypedAtomic.
b. typed-value is set equal to the string-value property, as an instance of xs:untypedAtomic.
c. is-idrefs is set to false
d. is-id is set to false if the attribute name is not xml:id
Comment 3 Michael Kay 2009-05-11 14:50:02 UTC
In comment #1 I was given the action to examine the impact of this resolution on the test suite.

I believe the changes needed are as follows, and have committed these to CVS:

setToUntyped-001. Result of empty(id("jff001", $var1/test[1])) changes from true to false.

setToUptyped-002. Ditto.

setToUntyped-003. Ditto.

setToUntyped-004. Ditto.

setToUntyped-005. Ditto.

setToUntyped-006. Ditto.

setToUntyped-007. Ditto.