Community
Participate
Working Groups
This is a spec compliance issue, now that the working group has consensus. From SML bug 5922's resolution: add a new <noSchemaBinding> sub element under <schemaBindings>. It contains any number of <documentAlias> elements. If an instance document matches one of the <documentAlias>, then the default schema doesn't apply to it. The editor's draft contains the new text and schema changes, and there is a diff for this change in the bug comment cited above (SML 5922 comment 3). A second change made in the same SML bug (called "proposal 2)"), after discussion in later comments, results in no difference in behavior for existing implementations.
Need to handle http://www.w3.org/Bugs/Public/show_bug.cgi?id=5923, where all schema documents must be examined for errors in construction, even if bound to 0 instances
Added logic to handle noSchemaBinding element. Test case: <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2008 IBM Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation --> <model xmlns="http://www.w3.org/2008/09/sml-if" schemaComplete="true"> <identity> <name>NoSchemaBinding</name> <baseURI> http://interop.serviceml.org </baseURI> <description>This SML-IF document is composed of two schema documents, S1 & S2, and three instance documents, I1, I2, & I3. <S1, I1, I2, I3> is a valid set whereas <S2, I1, I2, I3> is invalid. The default binding is used to bind S2 with I1, I2, and I3 but the no schema binding element is used to cancel out this binding. The document should thus be evaluated as valid. </description> </identity> <schemaBindings> <defaultSchema> <namespaceBinding aliases="S2" namespace="university"/> </defaultSchema> <noSchemaBinding> <documentAlias>Course1</documentAlias> <documentAlias>Course2</documentAlias> <documentAlias>Course3</documentAlias> </noSchemaBinding> </schemaBindings> <definitions> <document> <docinfo> <aliases> <alias>S1</alias> </aliases> </docinfo> <data> <xs:schema elementFormDefault="qualified" targetNamespace="university" xmlns:sml="http://www.w3.org/2008/09/sml" xmlns:tns="university" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="OptionalCourseRefType"> <xs:sequence> <xs:any maxOccurs="unbounded" minOccurs="0" namespace="##any" processContents="lax"/> </xs:sequence> <xs:anyAttribute namespace="##any" processContents="lax"/> </xs:complexType> <xs:complexType name="RequiredCourseRefType"> <xs:complexContent> <xs:extension base="tns:OptionalCourseRefType"/> </xs:complexContent> </xs:complexType> <xs:element name="Course" type="tns:CourseType"/> <xs:element name="Courses"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="Course" type="tns:CourseType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="CourseType"> <xs:sequence> <xs:element name="Name" type="xs:string"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="OptionalPreRequisite" type="tns:OptionalCourseRefType"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="RequiredPreRequisite" type="tns:RequiredCourseRefType"/> </xs:sequence> </xs:complexType> </xs:schema> </data> </document> <document> <docinfo> <aliases> <alias>S2</alias> </aliases> </docinfo> <data> <xs:schema elementFormDefault="qualified" targetNamespace="university" xmlns:sml="http://www.w3.org/2008/09/sml" xmlns:tns="university" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="OptionalCourseRefType" sml:acyclic="true"> <xs:sequence> <xs:any maxOccurs="unbounded" minOccurs="0" namespace="##any" processContents="lax"/> </xs:sequence> <xs:anyAttribute namespace="##any" processContents="lax"/> </xs:complexType> <xs:complexType name="RequiredCourseRefType"> <xs:complexContent> <xs:extension base="tns:OptionalCourseRefType"/> </xs:complexContent> </xs:complexType> <xs:element name="Course" type="tns:CourseType"/> <xs:element name="Courses"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="Course" type="tns:CourseType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="CourseType"> <xs:sequence> <xs:element name="Name" type="xs:string"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="OptionalPreRequisite" type="tns:OptionalCourseRefType"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="RequiredPreRequisite" type="tns:RequiredCourseRefType"/> </xs:sequence> </xs:complexType> </xs:schema> </data> </document> </definitions> <instances> <document> <docinfo> <aliases> <alias>Course1</alias> </aliases> </docinfo> <data> <Course xmlns="university" xmlns:sml="http://www.w3.org/2008/09/sml"> <Name>Course1</Name> <RequiredPreRequisite sml:ref="true"> <sml:uri>Course2</sml:uri> </RequiredPreRequisite> </Course> </data> </document> <document> <docinfo> <aliases> <alias>Course2</alias> </aliases> </docinfo> <data> <Course xmlns="university" xmlns:sml="http://www.w3.org/2008/09/sml"> <Name>Course2</Name> <OptionalPreRequisite sml:ref="true"> <sml:uri>Course3</sml:uri> </OptionalPreRequisite> </Course> </data> </document> <document> <docinfo> <aliases> <alias>Course3</alias> </aliases> </docinfo> <data> <Course xmlns="university" xmlns:sml="http://www.w3.org/2008/09/sml"> <Name>Course3</Name> <OptionalPreRequisite sml:ref="true"> <sml:uri>Course1</sml:uri> </OptionalPreRequisite> </Course> </data> </document> </instances> </model>
closing to cleanup bugzilla