xsd assistance

Discussion in 'XML' started by jhagemeier@gmail.com, May 1, 2008.

  1. Guest

    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
     
    , May 1, 2008
    #1
    1. Advertising

  2. Choice with maxOccurs="unbounded".
     
    Joseph J. Kesselman, May 1, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,191
    Markus
    Nov 22, 2005
  2. Rick Razzano

    XSD document for XSD defintion

    Rick Razzano, Sep 26, 2003, in forum: XML
    Replies:
    1
    Views:
    537
    C. M. Sperberg-McQueen
    Sep 26, 2003
  3. Replies:
    1
    Views:
    916
    Martin Honnen
    Jan 14, 2004
  4. Peter Aberline

    xsd:any as a child of xsd:all

    Peter Aberline, Apr 5, 2004, in forum: XML
    Replies:
    0
    Views:
    826
    Peter Aberline
    Apr 5, 2004
  5. Bernd Oninger
    Replies:
    1
    Views:
    561
    Henry S. Thompson
    Jun 30, 2004
Loading...

Share This Page