- From: Martin Gudgin <mgudgin@microsoft.com>
- Date: Wed, 10 Jul 2002 03:53:58 -0700
- To: <www-ws-desc@w3.org>
I've been updated the schema for our spec[1] and have run into trouble describing out completely open content model. I think we agreed in Paris that EIIs from other namespaces could appear absolutely anywhere. Unfortunately due to the optional nature of, for example, the import and type EIIs this makes the content model for, in this example, definitions, non-deterministic. The operation EIIs inside bindings have a similar problem. I cannot see a reasonable way around this. One make the schema deterministic is to make all the problem content models repeating disjunctions, for example; <xs:complexType name="tBindingOperation" > <xs:complexContent> <xs:extension base="wsdl:tExtensibleDocumented" > <xs:choice minOccurs='0' maxOccurs='unbounded' > <xs:element name="input" type="wsdl:tBindingOperationMessage" minOccurs="0" /> <xs:element name="output" type="wsdl:tBindingOperationMessage" minOccurs="0" /> <xs:element name="fault" type="wsdl:tBindingOperationFault" minOccurs="0" maxOccurs="unbounded" /> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> </xs:choice> <xs:attribute name="name" type="xs:NCName" use="required" /> </xs:extension> </xs:complexContent> </xs:complexType> We would also have to take the element wildcard out of extensible documented in order to make this work; <xs:complexType name="tExtensibleDocumented" abstract="true" > <xs:annotation> <xs:documentation> This type is extended by component types to allow attributes from other namespaces to be added. </xs:documentation> </xs:annotation> <xs:complexContent> <xs:extension base="wsdl:tDocumented" > <xs:anyAttribute namespace="##other" processContents="lax" /> </xs:extension> </xs:complexContent> </xs:complexType> The down side of this approach is that it makes the content model VERY inaccurate. I was going to attempt another approach namely enumerating all the possible content models as a disjunction of sequences but I think it quickly becomes non-deterministic anyway ( to say nothing of amazingly verbose ( I think it's factorial or close, so for binding operations it would be a choice between 6! possible sequences ( 720 )) ( partially expanded version below ) If we make things only extensible at the end ( or at the beginning ), this problem will go away. For definitions we could allow extension elements at any point AFTER import and type... Comments, flames, etc. to the usual address Gudge <xs:complexType name="tBindingOperation" > <xs:complexContent> <xs:extension base="wsdl:tExtensibleDocumented" > <xs:choice> <xs:sequence> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:element name="input" type="wsdl:tBindingOperationMessage" /> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:element name="output" type="wsdl:tBindingOperationMessage" /> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:sequence maxOccurs='unbounded' > <xs:element name="fault" type="wsdl:tBindingOperationFault" /> <xs:any namespace="##other" processContents="lax" minOccurs="0" /> </xs:sequence> </xs:sequence> <xs:sequence> <xs:element name="input" type="wsdl:tBindingOperationMessage" /> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:element name="output" type="wsdl:tBindingOperationMessage" /> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:sequence maxOccurs='unbounded' > <xs:element name="fault" type="wsdl:tBindingOperationFault" /> <xs:any namespace="##other" processContents="lax" minOccurs="0" /> </xs:sequence> </xs:sequence> <xs:sequence> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:element name="input" type="wsdl:tBindingOperationMessage" /> <xs:element name="output" type="wsdl:tBindingOperationMessage" /> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:sequence maxOccurs='unbounded' > <xs:element name="fault" type="wsdl:tBindingOperationFault" /> <xs:any namespace="##other" processContents="lax" minOccurs="0" /> </xs:sequence> </xs:sequence> <xs:sequence> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:element name="input" type="wsdl:tBindingOperationMessage" /> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:element name="output" type="wsdl:tBindingOperationMessage" /> <xs:sequence maxOccurs='unbounded' > <xs:element name="fault" type="wsdl:tBindingOperationFault" /> <xs:any namespace="##other" processContents="lax" minOccurs="0" /> </xs:sequence> </xs:sequence> <xs:sequence> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:element name="input" type="wsdl:tBindingOperationMessage" /> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:element name="output" type="wsdl:tBindingOperationMessage" /> <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded" /> <xs:sequence maxOccurs='unbounded' > <xs:element name="fault" type="wsdl:tBindingOperationFault" /> </xs:sequence> </xs:sequence> <!-- Ad Nauseam --> </xs:choice> <xs:attribute name="name" type="xs:NCName" use="required" /> </xs:extension> </xs:complexContent> </xs:complexType>
Received on Wednesday, 10 July 2002 06:54:30 UTC