W3C home > Mailing lists > Public > www-ws-desc@w3.org > February 2007

Comments on wsdl20.xsd

From: Ramkumar Menon <ramkumar.menon@gmail.com>
Date: Fri, 16 Feb 2007 16:56:45 -0800
Message-ID: <22bb8a4e0702161656y65533d7cx78a638230938196@mail.gmail.com>
To: www-ws-desc@w3.org
Gurus,

I have a few questions on the WSDL 2.0 xsd.
I observe that at several places within the XSD, I see explicit mention of
attributes with their default values. Is there a special reason for doing it
this way ?

For instance,

a) Elements that carry explicit minOccurs="1" and/or maxOccurs="1"
attributes.

For instance, observe the "any" element within the definition of
MessageRefFaultType.

<xs:complexType name="MessageRefFaultType" mixed="false">
  <xs:complexContent>
   <xs:extension base="wsdl:ExtensibleDocumentedType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
     <xs:any namespace="##other" processContents="lax" minOccurs="1"
maxOccurs="1" />
    </xs:choice>
    <xs:attribute name="ref" type="xs:QName" use="required" />
    <xs:attribute name="messageLabel" type="xs:NCName" use="optional" />
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>

   Similarly, the minOccurs="1" on the <choice> within the "ServiceType"
definition. [inlined below]

     <xs:complexType name="ServiceType" mixed="false">
 <xs:complexContent>
  <xs:extension base="wsdl:ExtensibleDocumentedType">
  <xs:choice minOccurs="1" maxOccurs="unbounded">  <!---- you can see the
minOccurs attribute here -->
    <xs:element ref="wsdl:endpoint" />
    <xs:any namespace="##other" processContents="lax" minOccurs="1"
maxOccurs="1" />
  </xs:choice>
  <xs:attribute name="name" type="xs:NCName" use="required" />
  <xs:attribute name="interface" type="xs:QName" use="required" />
 </xs:extension>
</xs:complexContent>
</xs:complexType>

b) Explicit usage of the attribute mixed="false" on the complex types
defined in the XSD.

For e.g.,

<xs:complexType name="ImportType" mixed="false">
<xs:complexContent>
<xs:extension base="wsdl:ExtensibleDocumentedType">
<xs:sequence>
 <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
processContents="strict" />
</xs:sequence>
<xs:attribute name="namespace" type="xs:anyURI" use="required" />
<xs:attribute name="location" type="xs:anyURI" use="optional" />
</xs:extension>
</xs:complexContent>
</xs:complexType>

c) Explicit usage of processContents="strict" .


 For e.g.

<xs:complexContent>
<xs:extension base="wsdl:ExtensibleDocumentedType">
<xs:sequence>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
processContents="strict" />
</xs:sequence>
<xs:attribute name="namespace" type="xs:anyURI" use="required" />
<xs:attribute name="location" type="xs:anyURI" use="optional" />
</xs:extension>
</xs:complexContent>
</xs:complexType>

rgds,

Ram
-- 
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!

-Ramkumar Menon
A typical Macroprocessor
Received on Saturday, 17 February 2007 00:56:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:58:46 GMT