axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjiva Weerawarana" <sanj...@opensource.lk>
Subject Re: XML Schema question
Date Wed, 11 Aug 2004 06:02:41 GMT
You're right .. that's a bug in the XSD: Attributes cannot be of
complex types!

Sanjiva.
----- Original Message ----- 
From: Susantha Kumara
To: 'Apache AXIS C Developers List'
Cc: axis-dev@ws.apache.org
Sent: Wednesday, August 11, 2004 11:53 AM
Subject: XML Schema question


Hi,

I found following schema section of a WSDL and doubt that something wrong
with it. Please help me.

There is a ComplexType defined as follows,

<xsd:complexType name="StringParameter">
   <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="numBytes" type="soapenc:int"/>
        <xsd:attribute name="storageEncoding" type="xsd:string"/>
        <xsd:attribute name="direction" type="typens:flowDirectionType"/>
<!-- in, out, or inOut -->
        <xsd:attribute name="passMode" type="typens:passModeType"/>  <!-- 
passByValue or passByReference -->
        <xsd:attribute name="description" type="xsd:string"/>
      </xsd:extension>
   </xsd:simpleContent>
</xsd:complexType>

Following 2 elements referring to the complexType StringParameter is OK,

<xsd:element name="parm" type="typens:StringParameter" />
<xsd:element name="StringParameter" type="typens:StringParameter" />

But I feel following line is wrong,

<xsd:attribute name="parmAttr" type="typens:StringParameter" />

Because the complexType StringParameter contains attributes.

Your help for me to understand this is verymuch appreciated.

Thanks,

Susantha Kumara
Virtusa (pvt) Ltd.
Office : +94112714385
Mobile : +94777420453



Mime
View raw message