<?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>7352</bug_id>
          
          <creation_ts>2009-08-17 16:37:30 +0000</creation_ts>
          <short_desc>Default value of &quot;nillable&quot; on (local) element declarations in SD4SD</short_desc>
          <delta_ts>2009-10-02 15:34:44 +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>1.1 only</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></status_whiteboard>
          <keywords>resolved</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sandy Gao">sandygao</reporter>
          <assigned_to name="David Ezell">David_E3</assigned_to>
          <cc>cmsmcq</cc>
          
          <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>26489</commentid>
    <comment_count>0</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2009-08-17 16:37:30 +0000</bug_when>
    <thetext>The default value for &quot;nillable&quot; in the schema for schemas can turn good schema documents into bad ones.

Consider:

&lt;xs:schema ...&gt;
  &lt;xs:element name=&quot;global&quot; .../&gt;
  &lt;xs:complexType ...&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element ref=&quot;tns:global&quot;/&gt;

After validating against the SD4SD, a default value for &quot;nillable&quot; is added to the element reference:

      &lt;xs:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; nillable=&quot;false&quot; ref=&quot;tns:global&quot;/&gt;

But &quot;nillable&quot; isn&apos;t allowed on element refs [1].

It seems that we do not depend on the default value of &quot;nillable&quot; in the mapping rules. Section 3.3.2 has:

&quot;{nillable}	The ·actual value· of the nillable [attribute], if present, otherwise false.&quot;

Suggest to remove such default value from the SD4SD, in both 1.0 and 1.1.

[1] http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#src-element clause 2.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27079</commentid>
    <comment_count>1</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2009-09-11 16:27:38 +0000</bug_when>
    <thetext>The WG today accepted this analysis and instructed the editors to fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27292</commentid>
    <comment_count>2</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2009-09-18 13:04:41 +0000</bug_when>
    <thetext>Concrete proposal. In Appendix A, remove the default value on the attribute declaration for &quot;nillable&quot; from the complex type definition &quot;element&quot;. i.e. remove default=&quot;false&quot; from the following:

  &lt;xs:complexType name=&quot;element&quot; abstract=&quot;true&quot;&gt;
    &lt;xs:annotation&gt;
      ...
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base=&quot;xs:annotated&quot;&gt;
        &lt;xs:sequence&gt;
          ...
        &lt;/xs:sequence&gt;
        ...
        &lt;xs:attribute name=&quot;nillable&quot; type=&quot;xs:boolean&quot; default=&quot;false&quot;
                      use=&quot;optional&quot;/&gt;
        ...
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27298</commentid>
    <comment_count>3</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2009-09-18 15:32:20 +0000</bug_when>
    <thetext>WG accepted proposal in comment #2 on 2009-09-18.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>