RE: Comments on wsdl20.xsd

I guess we've spent enough time with XML Schema to start to enjoy verbosity
;-).

 

But really, I don't think many of these redundancies remain in the current
editor's version at
http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/wsdl20/wsdl20.xsd.  I
suspect you may be viewing an old version, or even more likely are using
Internet Explorer's default XML view.  When IE is given a document with a
DTD, it fetches the DTD and processes default attributes from it, and
includes them in the display.  If you are using IE, and the display of
applied default attributes bothers you, try viewing source instead.  Or use
a less-XML aware browser like Firefox :-).

 

Jonathan Marsh -  <http://www.wso2.com> http://www.wso2.com -
<http://auburnmarshes.spaces.live.com> http://auburnmarshes.spaces.live.com

 

  _____  

From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org] On
Behalf Of Ramkumar Menon
Sent: Friday, February 16, 2007 4:57 PM
To: www-ws-desc@w3.org
Subject: Comments on wsdl20.xsd

 

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 01:43:28 UTC