Schema Question

S

sudheer.kilari

<xsd:complexType name="BaseMoney">
<xsd:sequence>
<xsd:element name="amount" type="xsd:decimal"
minOccurs="0"/>
<xsd:element name="currencyCode"
type="tns:CurrencyTypeCode" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="MiscSaleInfo">
<xsd:sequence>
<xsd:element name="amount"
type="tns:BaseMoney" minOccurs="0"/>
<xsd:element name="chargeType"
type="tns:MiscSaleChargeTypeCode" minOccurs="0"/>
</xsd:sequence>


In the above schema, I am creating a element "amount" which is of
type "BaseMoney".But BaseMoney again has a elment named amount in it.
I attached a simple Example, but is it a good practice ? ( I am able
to validate both the Schema and message )

Example:
- <miscSales>
- <amount>
<amount>345.36</amount>
<currencyCode>USD</currencyCode>
</amount>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,263
Latest member
SimonZfx79

Latest Threads

Top