<?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>2219</bug_id>
          
          <creation_ts>2005-09-14 19:20:05 +0000</creation_ts>
          <short_desc>R-227: identity constraints and xsi:nil</short_desc>
          <delta_ts>2007-04-27 15:36:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Structures: XSD Part 1</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>medium, hard, idc cluster</status_whiteboard>
          <keywords>resolved</keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sandy Gao">sandygao</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6242</commentid>
    <comment_count>0</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2005-09-14 19:20:05 +0000</bug_when>
    <thetext>If an element selected by the field of an identity constraint has 
xsi:nil=&apos;true&apos;, is the value treated as missing? For example, is the following 
instance valid, given the schema. 

schema
------
&lt;xml version=&quot;1.0&quot;?&gt;
&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
         &lt;xsd:element name=&quot;root&quot;&gt;
                 &lt;xsd:complexType&gt;
                         &lt;xsd:sequence&gt;
                                 &lt;xsd:element ref=&quot;uid&quot; maxOccurs=&quot;unbounded&quot;/&gt;
                         &lt;/xsd:sequence&gt;
                 &lt;/xsd:complexType&gt;
                 &lt;xsd:unique id=&quot;foo123&quot; name=&quot;uuid&quot;&gt;
                         &lt;xsd:selector xpath=&quot;.//uid&quot;/&gt;
                         &lt;xsd:field xpath=&quot;.&quot;/&gt;
                 &lt;/xsd:unique&gt;
         &lt;/xsd:element&gt;
         &lt;xsd:element name=&quot;uid&quot; nillable=&quot;true&quot; type=&quot;xsd:anySimpleType&quot;/&gt;
&lt;/xsd:schema&gt;

instance
--------
&lt;xml version=&quot;1.0&quot;?&gt;
&lt;root xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; 
xsi:noNamespaceSchemaLocation=&quot;idF018.xsd&quot;&gt;
         &lt;uid xsi:nil=&quot;true&quot; xsi:type=&quot;xsd:string&quot;/&gt;
         &lt;uid xsi:nil=&quot;true&quot;/&gt;
&lt;/root&gt;

I think this should be valid since the xsi:nil attribute on the uid elements 
would be equivalent to the elements missing for the purposes of identity 
constraints. Either way 3.11.4 of Schema part 1 could use some clarification 
around xsi:nil. 

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003JulSep/0024.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14564</commentid>
    <comment_count>1</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2007-03-28 18:44:06 +0000</bug_when>
    <thetext>The WG discussed this at a face to face meeting on 28 March and
decided to close it as FIXED.  The necessary changes were adopted in a previous
WG meeting.

Briefly, when xsi:nil=true, it&apos;s treated as if the value is missing. So the attached example will be accepted by schema 1.1.

Note that if &lt;key&gt; is used in place of &lt;unique&gt;, the xml document becomes invalid, because &lt;key&gt; requires that all fields are present and have values.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14731</commentid>
    <comment_count>2</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2007-04-16 13:28:30 +0000</bug_when>
    <thetext>Closing it on behave of the originator, who indicated that &quot;The resolution seems fine and so the bug can be closed.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14905</commentid>
    <comment_count>3</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2007-04-27 15:36:11 +0000</bug_when>
    <thetext>Reply from the originator:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2007AprJun/0044.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>