Re: WSDL 2.0 element order enforcement in schema

Sanjiva,
Part 1: section 2.1.2 XML Representation of Description Component 
does contain the ordered list of XML elements in Lawrence's response
and the XML syntax tree:

<description
      targetNamespace="xs:anyURI" >
  <documentation />*
  [ <import /> | <include /> ]*
  <types />?
  [ <interface /> | <binding /> | <service /> ]*
</description>

from which we can infer the order. However the Primer gives a better,
more descriptive statement about ordering in section 2.2.2.1 WSDL2.0
Element Ordering. Perhaps that prose could be included in the
normative document.

John Kaputin.

On 7/6/05, Sanjiva Weerawarana <sanjiva@opensource.lk> wrote:
> 
> Lawrence, did you not find those extra constraints written in prose in
> the spec? If not we have a problem to be fixed.
> 
> Sanjiva.
> 
> On Tue, 2005-07-05 at 15:50 -0400, Arthur Ryman wrote:
> >
> > Lawrence/Jonathan,
> >
> > The technical problem is that extension elements are allowed anywhere
> > and if you describe that using choice then the resulting schema is
> > non-deterministic, which is apparently a very bad thing.
> >
> > The resolution of this issue was to leave the schema as it is and add
> > rules to the validator. (more coding for Woden)
> >
> > Arthur Ryman,
> > Rational Desktop Tools Development
> >
> > phone: +1-905-413-3077, TL 969-3077
> > assistant: +1-905-413-2411, TL 969-2411
> > fax: +1-905-413-4920, TL 969-4920
> > mobile: +1-416-939-5063, text: 4169395063@fido.ca
> > intranet: http://labweb.torolab.ibm.com/DRY6/
> >
> >
> > "Jonathan Marsh"
> > <jmarsh@microsoft.com>
> > Sent by:
> > www-ws-desc-request@w3.org
> >
> > 07/05/2005 03:20 PM
> >
> >
> >                To
> > Lawrence
> > Mandel/Toronto/IBM@IBMCA, <www-ws-desc@w3.org>
> >                cc
> >
> >           Subject
> > RE: WSDL 2.0
> > element order
> > enforcement in
> > schema
> >
> >
> >
> >
> >
> >
> >
> >
> > Your schema appears to limit extension elements to
> > post-import/include/types, right?  We looked at that before and found
> > it unacceptable.  We have looked at several different ways to describe
> > the order of top-level elements in Schema several times, including
> > using substitution groups, but we've never found a solution that
> > didn't impose other restrictions.
> >
> >
> >
> > ______________________________________________________________________
> >
> > From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org]
> > On Behalf Of Lawrence Mandel
> > Sent: Tuesday, July 05, 2005 9:10 AM
> > To: www-ws-desc@w3.org
> > Subject: WSDL 2.0 element order enforcement in schema
> >
> >
> > While looking at the WSDL 2.0 schema today I came across a question
> > about the ordering of elements in a WSDL 2.0 document.
> >
> > Section 2.1.2 of the WSDL 2.0 spec defines the following XML
> > representation of WSDL 2.0,
> >
> > <description
> >     targetNamespace="xs:anyURI" >
> > <documentation />*
> > [ <import /> | <include /> ]*
> > <types />?
> > [ <interface /> | <binding /> | <service /> ]*
> > </description>
> >
> > This definition imposes ordering constraints on the elements in the
> > WSDL 2.0 document. The WSDL 2.0 schema does not currently enforce this
> > ordering. The description type is defined as follows,
> >
> > <xs:complexType name='DescriptionType' >
> >   <xs:annotation>
> >     <xs:documentation>
> >
> >        Please refer to the WSDL 2.0 specification for
> >                additional constraints on the contents of this type.
> >     </xs:documentation>
> >   </xs:annotation>
> >   <xs:complexContent>
> >     <xs:extension base='wsdl:ExtensibleDocumentedType' >
> >       <xs:choice minOccurs='0' maxOccurs='unbounded' >
> >         <xs:element ref='wsdl:import' />
> >         <xs:element ref='wsdl:include' />
> >         <xs:element ref='wsdl:types'/>
> >
> >          <xs:element ref='wsdl:interface' />
> >                      <xs:element ref='wsdl:binding' />
> >                      <xs:element ref='wsdl:service' />
> >         <xs:any namespace='##other' processContents='lax' />
> >       </xs:choice>
> >                <xs:attribute name='targetNamespace' type='xs:anyURI'
> > use='required' />
> >     </xs:extension>
> >   </xs:complexContent>
> > </xs:complexType>
> >
> > The schema can be updated as follows to enforce the ordering outlined
> > in the spec.
> >
> > <xs:complexType name='DescriptionType' >
> >    <xs:annotation>
> >      <xs:documentation>
> >        Please refer to the WSDL 2.0 specification for
> >        additional constraints on the contents of this type.
> >      </xs:documentation>
> >    </xs:annotation>
> >    <xs:complexContent>
> >      <xs:extension base='wsdl:ExtensibleDocumentedType' >
> >        <xs:sequence>
> >          <xs:choice minOccurs='0' maxOccurs='unbounded' >
> >            <xs:element ref='wsdl:import' />
> >            <xs:element ref='wsdl:include' />
> >          </xs:choice>
> >          <xs:element ref='wsdl:types' minOccurs="0" maxOccurs="1"/>
> >          <xs:choice minOccurs='0' maxOccurs='unbounded' >
> >            <xs:element ref='wsdl:interface' />
> >            <xs:element ref='wsdl:binding' />
> >            <xs:element ref='wsdl:service' />
> >            <xs:any namespace='##other' processContents='lax' />
> >          </xs:choice>
> >        </xs:sequence>
> >        <xs:attribute name='targetNamespace' type='xs:anyURI'
> > use='required' />
> >      </xs:extension>
> >    </xs:complexContent>
> >  </xs:complexType>
> >
> > Is the omission of ordering constraints from the schema intentional?
> > Can someone update the schema to enforce section 2.1.2 of the spec?
> >
> >
> > Thanks,
> >
> > Lawrence Mandel
> >
> > Software Developer
> > IBM Rational Software
> > Phone: 905 - 413 - 3814   Fax: 905 - 413 - 4920
> > lmandel@ca.ibm.com
> 
> 
>

Received on Thursday, 7 July 2005 10:47:30 UTC