W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2005

[Bug 2219] R-227: identity constraints and xsi:nil

From: <bugzilla@wiggum.w3.org>
Date: Wed, 14 Sep 2005 19:20:05 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1EFcnd-00019P-Cm@wiggum.w3.org>


           Summary: R-227: identity constraints and xsi:nil
           Product: XML Schema
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSD Part 1: Structures
        AssignedTo: ht@w3.org
        ReportedBy: sandygao@ca.ibm.com
         QAContact: www-xml-schema-comments@w3.org

If an element selected by the field of an identity constraint has 
xsi:nil='true', is the value treated as missing? For example, is the following 
instance valid, given the schema. 

<xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <xsd:element name="root">
                                 <xsd:element ref="uid" maxOccurs="unbounded"/>
                 <xsd:unique id="foo123" name="uuid">
                         <xsd:selector xpath=".//uid"/>
                         <xsd:field xpath="."/>
         <xsd:element name="uid" nillable="true" type="xsd:anySimpleType"/>

<xml version="1.0"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         <uid xsi:nil="true" xsi:type="xsd:string"/>
         <uid xsi:nil="true"/>

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. 

Received on Wednesday, 14 September 2005 19:20:17 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:04 UTC