<?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>5908</bug_id>
          
          <creation_ts>2008-07-29 15:49:10 +0000</creation_ts>
          <short_desc>Contradiction around schemaBinding</short_desc>
          <delta_ts>2008-08-12 23:39:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>SML</product>
          <component>Interchange Format</component>
          <version>LC</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</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="Virginia Smith">virginia.smith</assigned_to>
          <cc>pratul.dublish</cc>
    
    <cc>virginia.smith</cc>
          
          <qa_contact name="SML Working Group discussion list">public-sml</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21375</commentid>
    <comment_count>0</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2008-07-29 15:49:10 +0000</bug_when>
    <thetext>In section 4.1 Packaging, the pseudo-schema has:

    &lt;schemaBindings&gt; ?
        &lt;defaultSchema&gt; ?
            &lt;namespaceBinding/&gt; *  
        &lt;/defaultSchema&gt;
        &lt;schemaBinding&gt; *
            &lt;namespaceBinding/&gt; *  
            &lt;documentAlias/&gt; +     
        &lt;/schemaBinding&gt;
    &lt;/schemaBindings&gt;

Which means that each &lt;schemaBinding&gt; can have any number (including 0) of &lt;namespaceBinding&gt; elements, and have at least one &lt;documentAlias&gt;.

But in Appendix A. SML-IF Schema:

  &lt;xs:complexType name=&quot;schemaBindingType&quot; mixed=&quot;false&quot;&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element ref=&quot;smlif:namespaceBinding&quot;/&gt;
      &lt;xs:element name=&quot;documentAlias&quot; type=&quot;smlif:uriType&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
      &lt;xs:any namespace=&quot;##other&quot; processContents=&quot;lax&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
    &lt;/xs:sequence&gt;
    &lt;xs:anyAttribute namespace=&quot;##other&quot; processContents=&quot;lax&quot;/&gt;
  &lt;/xs:complexType&gt;

Note that the reference to &quot;namespaceBinding&quot; has no min/maxOccurs specified, and minOccurs=0 is specified on &quot;documentAlias&quot;.

So obviously 4.1 and appendix A don&apos;t agree. What&apos;s intended?

I think both &lt;namespaceBinding&gt; and &lt;documentAlias&gt; should be &apos;*&apos;, that is minOccurs=0, maxOccurs=unbounded.

For &lt;namespaceBinding&gt;, because a schema can have more than one namespaces, we can&apos;t limit the number of &lt;namespaceBinding&gt; to exactly 1.

For &lt;documentAlias&gt;, allowing minOccurs=0 means that the producer can write

&lt;schemaBindings&gt;
  &lt;schemaBinding&gt;
    &lt;namespaceBinding namespace=&quot;ns&quot; aliases=&quot;v1.xsd&quot;/&gt;
  &lt;/schemaBinding&gt;
  &lt;schemaBinding&gt;
    &lt;namespaceBinding namespace=&quot;ns&quot; aliases=&quot;v2.xsd&quot;/&gt;
  &lt;/schemaBinding&gt;
&lt;/schemaBindings&gt;

That is, they can group schema documents in meaningful ways (e.g for different versions) without having to specify instance documents. This is useful when only schema documents are transmitted in the IF package.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21471</commentid>
    <comment_count>1</comment_count>
    <who name="Pratul Dublish">pratul.dublish</who>
    <bug_when>2008-08-07 19:05:03 +0000</bug_when>
    <thetext>Resolution in 8/7 call

both &lt;namespaceBinding&gt; and &lt;documentAlias&gt; should be &apos;*&apos;, that is minOccurs=0, maxOccurs=unbounded.&quot;
Pseudo-schema and normative schema must be changed to agree with this proposal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21518</commentid>
    <comment_count>2</comment_count>
    <who name="Virginia Smith">virginia.smith</who>
    <bug_when>2008-08-12 23:39:15 +0000</bug_when>
    <thetext>Fixed per comment #1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>