<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>6482</bug_id>
          
          <creation_ts>2009-01-28 11:58:33 +0000</creation_ts>
          <short_desc>[UPD] setToUntyped() and xml:id</short_desc>
          <delta_ts>2011-01-07 11:44:37 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Update Facility</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</assigned_to>
          <cc>jonathan.robie</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>23267</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-01-28 11:58:33 +0000</bug_when>
    <thetext>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): &quot;The is-id property is always true for attributes named xml:id.&quot;.

Admittedly it says this under &quot;construction from an InfoSet&quot; and &quot;construction from a PSVI&quot;. 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.]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23908</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-02-24 17:51:53 +0000</bug_when>
    <thetext>This change was accepted.

Action on MK to examine the test suite</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23909</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2009-02-24 17:53:32 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25101</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-05-11 14:50:02 +0000</bug_when>
    <thetext>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(&quot;jff001&quot;, $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.



</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>