- From: Zafar Abbas <zafara@microsoft.com>
- Date: Tue, 6 Sep 2005 10:31:56 -0700
- To: <andrew.hodge@abs.gov.au>, <xmlschema-dev@w3.org>
- Cc: <ht@inf.ed.ac.uk>
There are known issues regarding content model restriction checking in MSXML 4.0 which will be addressed in the future version (MSXML 6.0). I am listing results for the sample schemas below. Example1/2/3: known issue, fixed in future release. ** some more tests ** Example4: MSXML fails this since it is an invalid restriction. Example5: Valid restriction. Example6: known issue, fixed in future release. Example7: MSXML fails this since it is an invalid restriction. Example8: Valid restriction. Thanks, Zafar Abbas -----Original Message----- From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On Behalf Of andrew.hodge@abs.gov.au Sent: Wednesday, August 31, 2005 10:44 PM To: xmlschema-dev@w3.org Cc: ht@inf.ed.ac.uk Subject: Re: Content Model for Restrictions Hi Henry, I have double checked and done some more tests with our schemas (with some curious results) Regards Andrew >From Henry I'll try to get some MSoft people to look at this (but first, could you please confirm that MSXML rejects _all_ your examples) -- as Kasimir said, your first example is equivalent to a restriction of anyType, and that should work for sure. I have double checked this example : Fails with MSXML Vers 4 SP2 Fails with MSXML Vers 4 SP1 Fails with XMLSpy Vers 5 Rel 3 Passes with XMLSpy Vers 5 Rel 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="urn:abs.gov.au/BusinessAdministrationSystems" xmlns:tns="urn:abs.gov.au/BusinessProcessManagement" targetNamespace="urn:abs.gov.au/BusinessProcessManagement" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:complexType name="TestEventPayload"> <xs:sequence> <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="RestTestEventPayload"> <xs:complexContent> <xs:restriction base="tns:TestEventPayload"> <xs:sequence> <xs:element name="test1"/> <xs:element name="test2"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> ********************************************************************* This schema fails with XMLSpy Rel 5 Vers 3 (illegal restriction of content model for EventPayload) However it passes with MSXML Vers 4 SP2, MSXML Vers 4 SP1, XMLSpy Vers 5 Rel 2. <xs:schema targetNamespace="urn:abs.gov.au/BusinessProcessManagement" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="urn:abs.gov.au/BusinessAdministrationSystems" xmlns:tns="urn:abs.gov.au/BusinessProcessManagement" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:include schemaLocation=" http://redirectory/infra:Administration_Infrastructure-V00.50"/> <xs:import namespace="urn:abs.gov.au/BusinessAdministrationSystems" schemaLocation="http://redirectory/schema:Administration-V00.50"/> <xs:complexType name="Administration_Generic_Request_Service-V00.50"> <xs:complexContent> <xs:restriction base="tns:Event"> <xs:sequence> <xs:element name="EventDiscriminator" type="xs:string"/> <xs:element name="EventPublisher" type="xs:string"/> <xs:element name="EventPayload"> <xs:complexType> <xs:complexContent> <xs:restriction base="tns:EventPayload"> <xs:sequence> <xs:element ref="admin:Task"/> <xs:element ref="admin:Status" minOccurs="0"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:element> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> <xs:element name="Administration_Generic_Request_Service-V00.50" type="tns:Administration_Generic_Request_Service-V00.50" substitutionGroup="tns:Event"/> </xs:schema> it is restricting this fragment (and it needs to go through multiple includes to get there) .... <xs:complexType name="EventPayload"> <xs:sequence> <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:element name="EventPayload" type="tns:EventPayload"/> <xs:complexType name="Event"> <xs:sequence> <xs:element name="EventDiscriminator" type="xs:string"/> <xs:element name="EventPublisher" type="xs:string"/> <xs:element ref="tns:EventPayload"/> </xs:sequence> </xs:complexType> <xs:element name="Event" type="tns:Event" abstract="true"/> .... ********************************************************************* With a single include I get : Fails with MSXML Vers 4 SP2 Fails with MSXML Vers 4 SP1 Fails with XMLSpy Vers 5 Rel 3 Passes with XMLSpy Vers 5 Rel 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="urn:abs.gov.au/BusinessAdministrationSystems" xmlns:tns="urn:abs.gov.au/BusinessProcessManagement" targetNamespace="urn:abs.gov.au/BusinessProcessManagement" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:include schemaLocation="c:\data\bpm\schemas\TestSpy2005 Test1.xsd"/> <xs:complexType name="RestTestEventPayload"> <xs:complexContent> <xs:restriction base="tns:TestEventPayload"> <xs:sequence> <xs:element name="test1"/> <xs:element name="test2"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="urn:abs.gov.au/BusinessAdministrationSystems" xmlns:tns="urn:abs.gov.au/BusinessProcessManagement" targetNamespace="urn:abs.gov.au/BusinessProcessManagement" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:complexType name="TestEventPayload"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:any namespace="##any" processContents="lax"/> </xs:choice> </xs:complexType> </xs:schema> ********************************************************************* Some more tests ********************************************************************* Fails with MSXML Vers 4 SP2 Fails with MSXML Vers 4 SP1 Fails with XMLSpy Vers 5 Rel 3 Passes with XMLSpy Vers 5 Rel 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="urn:abs.gov.au/BusinessAdministrationSystems" xmlns:tns="urn:abs.gov.au/BusinessProcessManagement" targetNamespace="urn:abs.gov.au/BusinessProcessManagement" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:complexType name="TestEventPayload"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:any namespace="##any" processContents="lax"/> </xs:sequence> </xs:complexType> <xs:complexType name="RestTestEventPayload"> <xs:complexContent> <xs:restriction base="tns:TestEventPayload"> <xs:sequence> <xs:element name="test1"/> <xs:element name="test2"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> ********************************************************************* Passes with MSXML Vers 4 SP2 Passes with MSXML Vers 4 SP1 Passes with XMLSpy Vers 5 Rel 2 Passes with XMLSpy Vers 5 Rel 3 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="urn:abs.gov.au/BusinessAdministrationSystems" xmlns:tns="urn:abs.gov.au/BusinessProcessManagement" targetNamespace="urn:abs.gov.au/BusinessProcessManagement" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:complexType name="TestEventPayload"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:any namespace="##any" processContents="lax"/> </xs:sequence> </xs:complexType> <xs:complexType name="RestTestEventPayload"> <xs:complexContent> <xs:restriction base="tns:TestEventPayload"> <xs:sequence> <xs:element name="test1"/> <!--<xs:element name="test2"/>--> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> ********************************************************************* Fails with MSXML Vers 4 SP2 Fails with MSXML Vers 4 SP1 Fails with XMLSpy Vers 5 Rel 3 Passes with XMLSpy Vers 5 Rel 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="urn:abs.gov.au/BusinessAdministrationSystems" xmlns:tns="urn:abs.gov.au/BusinessProcessManagement" targetNamespace="urn:abs.gov.au/BusinessProcessManagement" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:complexType name="TestEventPayload"> <xs:sequence> <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="RestTestEventPayload"> <xs:complexContent> <xs:restriction base="tns:TestEventPayload"> <xs:sequence> <xs:element name="test1"/> <xs:element name="test1"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> ********************************************************************* Fails with MSXML Vers 4 SP2 Fails with MSXML Vers 4 SP1 Passes with XMLSpy Vers 5 Rel 3 Passes with XMLSpy Vers 5 Rel 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="urn:abs.gov.au/BusinessAdministrationSystems" xmlns:tns="urn:abs.gov.au/BusinessProcessManagement" targetNamespace="urn:abs.gov.au/BusinessProcessManagement" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:complexType name="TestEventPayload"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:any namespace="##any" processContents="lax"/> </xs:choice> </xs:complexType> <xs:complexType name="RestTestEventPayload"> <xs:complexContent> <xs:restriction base="tns:TestEventPayload"> <xs:sequence> <xs:element name="test1"/> <xs:element name="test2"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> ********************************************************************* Passes with MSXML Vers 4 SP2 Passes with MSXML Vers 4 SP1 Passes with XMLSpy Vers 5 Rel 3 Passes with XMLSpy Vers 5 Rel 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="urn:abs.gov.au/BusinessAdministrationSystems" xmlns:tns="urn:abs.gov.au/BusinessProcessManagement" targetNamespace="urn:abs.gov.au/BusinessProcessManagement" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:complexType name="TestEventPayload"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:any namespace="##any" processContents="lax"/> </xs:choice> </xs:complexType> <xs:complexType name="RestTestEventPayload"> <xs:complexContent> <xs:restriction base="tns:TestEventPayload"> <xs:sequence> <xs:element name="test1"/> <!--<xs:element name="test2"/> --> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> ----------------------------------------------- ABS Web Site: www.abs.gov.au
Received on Tuesday, 6 September 2005 17:32:06 UTC