This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5908 - Contradiction around schemaBinding
Summary: Contradiction around schemaBinding
Status: RESOLVED FIXED
Alias: None
Product: SML
Classification: Unclassified
Component: Interchange Format (show other bugs)
Version: LC
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Virginia Smith
QA Contact: SML Working Group discussion list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2008-07-29 15:49 UTC by Sandy Gao
Modified: 2008-08-12 23:39 UTC (History)
2 users (show)

See Also:


Attachments

Description Sandy Gao 2008-07-29 15:49:10 UTC
In section 4.1 Packaging, the pseudo-schema has:

    <schemaBindings> ?
        <defaultSchema> ?
            <namespaceBinding/> *  
        </defaultSchema>
        <schemaBinding> *
            <namespaceBinding/> *  
            <documentAlias/> +     
        </schemaBinding>
    </schemaBindings>

Which means that each <schemaBinding> can have any number (including 0) of <namespaceBinding> elements, and have at least one <documentAlias>.

But in Appendix A. SML-IF Schema:

  <xs:complexType name="schemaBindingType" mixed="false">
    <xs:sequence>
      <xs:element ref="smlif:namespaceBinding"/>
      <xs:element name="documentAlias" type="smlif:uriType" minOccurs="0" maxOccurs="unbounded"/>
      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>

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

So obviously 4.1 and appendix A don't agree. What's intended?

I think both <namespaceBinding> and <documentAlias> should be '*', that is minOccurs=0, maxOccurs=unbounded.

For <namespaceBinding>, because a schema can have more than one namespaces, we can't limit the number of <namespaceBinding> to exactly 1.

For <documentAlias>, allowing minOccurs=0 means that the producer can write

<schemaBindings>
  <schemaBinding>
    <namespaceBinding namespace="ns" aliases="v1.xsd"/>
  </schemaBinding>
  <schemaBinding>
    <namespaceBinding namespace="ns" aliases="v2.xsd"/>
  </schemaBinding>
</schemaBindings>

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.
Comment 1 Pratul Dublish 2008-08-07 19:05:03 UTC
Resolution in 8/7 call

both <namespaceBinding> and <documentAlias> should be '*', that is minOccurs=0, maxOccurs=unbounded."
Pseudo-schema and normative schema must be changed to agree with this proposal.
Comment 2 Virginia Smith 2008-08-12 23:39:15 UTC
Fixed per comment #1.