Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xsd assistance

Reply
Thread Tools

xsd assistance

 
 
jhagemeier@gmail.com
Guest
Posts: n/a
 
      05-01-2008
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
 
Reply With Quote
 
 
 
 
Joseph J. Kesselman
Guest
Posts: n/a
 
      05-01-2008
Choice with maxOccurs="unbounded".
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML + XSD: Is it possible to get all errors against the XSD? Markus Java 1 11-22-2005 02:53 PM
Difference between <import ....xsd> and <xlink:href=.....xsd> ???? Bernd Oninger XML 1 06-30-2004 08:21 AM
xsd:any as a child of xsd:all Peter Aberline XML 0 04-05-2004 03:38 PM
referencing another XSD file within an XSD file JavaDeveloper@nowhere.com XML 1 01-14-2004 05:22 PM
XSD document for XSD defintion Rick Razzano XML 1 09-26-2003 12:41 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57