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
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