xsd assistance

J

jhagemeier

Hi,

I’m looking for some help with an xsd type. I need a “Bulk” type
definition that can contain zero to many Deposit and/or Withdrawal
elements, in any order. For example:

<BulkRequest>
<DepositRequest/>
<DepositRequest/>
<WithdrawalRequest/>
<WithdrawalRequest/>
<BulkRequest/>

OR

<BulkRequest>
<WithdrawalRequest/>
<WithdrawalRequest/>
<DepositRequest/>
<DepositRequest/>
<BulkRequest/>

The definition below supports the zero to many but not the “any order”
requirement due to the <sequence>. It can’t be a <choice> because it
can contain both Deposit and Withdrawals and <all> doesn’t allow
“unbounded”.

<xs:complexType name="TypeBulkRequest">
<xs:sequence>
<xs:element name="DepositRequest" type="TypeDepositRequest"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="WithdrawalRequest" type="TypeWithdrawalRequest"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

How can I specify this relationship?

Thanks,
Jeff
 

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,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top