- From: Arthur Ryman <ryman@ca.ibm.com>
- Date: Fri, 21 Mar 2003 14:24:30 -0500
- To: "Edward Wertz" <ed@mindreef.com>
- Cc: www-ws-desc@w3.org, www-ws-desc-request@w3.org
Edward, Yes, the schema fragment I quoted was from the WSDL 1.1 spec. The schema you refer to is considered to be better. However, neither is considered to be normative. Only the spec is normative. The spec includes a BNF-like grammar for WSDL. Although the order of most of the child elements doesn't really matter, some are restricted. For example, the <import>s come first followed by at most one <types>. So, no, even the improved schema isn't enough. You have to read the spec. As a tool developer, I find the second class status of the schema to be a bad idea. After all, schema is a precise formal language that supports machine processing. My goal as a WG member is that we should provide a normative schema since that is unambiguous in comparison with the narative prose in the spec. Arthur Ryman |---------+----------------------------> | | "Edward Wertz" | | | <ed@mindreef.com>| | | Sent by: | | | www-ws-desc-reque| | | st@w3.org | | | | | | | | | 03/21/2003 01:25 | | | PM | | | | |---------+----------------------------> >---------------------------------------------------------------------------------------------------------------------------------------------| | | | To: Arthur Ryman/Toronto/IBM@IBMCA | | cc: <www-ws-desc@w3.org>, <www-ws-desc-request@w3.org> | | Subject: Re: WSDL 1.1 schema question | | | | | >---------------------------------------------------------------------------------------------------------------------------------------------| Arthur, I fudged one of my questions. When I was asking about well-formedness I was intending to ask about the well-formedness of the XML that makes up the WSDL. I understand this isn't sufficient to convey the semantics of how the XML is interpretted, but is schema validation necessary and sufficient to ensure that all the XML components for a WSDL are in the right spot and the right order within a single document? The schema you quoted appears to be the schema at the bottom of the w3c WSDL 1.1 specfication [1]. But there is a different schema behind the uri [2] for the WSDL 1.1 namespace. I was under the impression that the schema at [2] was more up to date and was considered the official schema for the WSDL 1.1 namespace. I've copied the declaration of the definitions tag from [2] which indicates that extensibility elements must appear first and then there is an unbounded choice of any of the child tags. [1] and [2] are very different and causing me some confusion. <xs:element name="definitions" type="wsdl:tDefinitions"> <xs:complexType name="tDefinitions"> <xs:complexContent> <xs:extension base="wsdl:tExtensibleDocumented"> <xs:sequence> <xs:group ref="wsdl:anyTopLevelOptionalElement" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:attribute name="targetNamespace" type="xs:anyURI" use="optional" /> <xs:attribute name="name" type="xs:NCName" use="optional" /> </xs:extension> </xs:complexContent> </xs:complexType> <xs:group name="anyTopLevelOptionalElement"> <xs:annotation> <xs:documentation>Any top level optional element allowed to appear more then once - any child of definitions element except wsdl:types. Any extensibility element is allowed in any place. </xs:documentation> </xs:annotation> <xs:choice> <xs:element name="import" type="wsdl:tImport" /> <xs:element name="types" type="wsdl:tTypes" /> <xs:element name="message" type="wsdl:tMessage"> <xs:unique name="part"> <xs:selector xpath="wsdl:part" /> <xs:field xpath="@name" /> </xs:unique> </xs:element> <xs:element name="portType" type="wsdl:tPortType" /> <xs:element name="binding" type="wsdl:tBinding" /> <xs:element name="service" type="wsdl:tService"> <xs:unique name="port"> <xs:selector xpath="wsdl:port" /> <xs:field xpath="@name" /> </xs:unique> </xs:element> </xs:choice> </xs:group> Thanks for your help, Edward [1] - http://www.w3.org/TR/wsdl#A4.1 [2] - http://schemas.xmlsoap.org/wsdl/ (http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd) ----- Original Message ----- From: "Arthur Ryman" <ryman@ca.ibm.com> To: "Edward Wertz" <ed@mindreef.com> Cc: <www-ws-desc@w3.org>; <www-ws-desc-request@w3.org> Sent: Friday, March 21, 2003 11:20 AM Subject: Re: WSDL 1.1 schema question > Edward, > > Schema validation is not enough. For example, one WSDL document may import > others and refer to components defined there. Schema validation applies to > single documents AFAIK so therefore all of the semantic rules of WSDL 1.1 > can't be expressed in XSD. > > The order of immediate child elements of <definitions> of a given kind, > e.g. <message>, does not matter, but the sequence of kinds is specified: > > <complexType name="definitionsType"> > <complexContent> > <extension base="wsdl:documented"> > <sequence> > <element ref="wsdl:import" minOccurs="0" maxOccurs > ="unbounded"/> > <element ref="wsdl:types" minOccurs="0"/> > <element ref="wsdl:message" minOccurs="0" maxOccurs > ="unbounded"/> > <element ref="wsdl:portType" minOccurs="0" maxOccurs > ="unbounded"/> > <element ref="wsdl:binding" minOccurs="0" maxOccurs > ="unbounded"/> > <element ref="wsdl:service" minOccurs="0" maxOccurs > ="unbounded"/> > <any namespace="##other" minOccurs="0" maxOccurs > ="unbounded"> > <annotation> > <documentation>to support extensibility elements > </documentation> > </annotation> > </any> > </sequence> > <attribute name="targetNamespace" type="uriReference" use > ="optional"/> > <attribute name="name" type="NMTOKEN" use="optional"/> > </extension> > </complexContent> > </complexType> > > > Arthur Ryman > > > |---------+----------------------------> > | | "Edward Wertz" | > | | <ed@mindreef.com>| > | | Sent by: | > | | www-ws-desc-reque| > | | st@w3.org | > | | | > | | | > | | 03/18/2003 05:50 | > | | PM | > | | | > |---------+----------------------------> > > --------------------------------------------------------------------------- ------------------------------------------------------------------| > | | > | To: <www-ws-desc@w3.org> | > | cc: | > | Subject: WSDL 1.1 schema question | > | | > | | > > --------------------------------------------------------------------------- ------------------------------------------------------------------| > > > > I was reading through the WSDL 1.1 schema at > http://schemas.xmlsoap.org/wsdl/ and have a couple questions. > > In the "anyTopLevelOptionalElement" group there is documentation indicating > that the types should not appear more than once and extensibility elements > are allowed in any place. The structure of the schema, however, implies > that extensibility elements must appear before any of the > "anyTopLevelOptionalElement" elements, and the schema does not restrict the > types node from occurring more than once. > > Is the structure outlined by the schema the official structure of WSDL 1.1 > documents? Is schema validation enough to ensure a well-formed WSDL > document? > Does the order of any of the immediate child elements to a Definitions node > matter? > > Edward > > >
Received on Friday, 21 March 2003 14:29:03 UTC