XML-Schema: Is there a way to make different type elements(each type has more than one Element) pres

Discussion in 'XML' started by Aray, Jan 5, 2007.

  1. Aray

    Aray Guest

    There were some different type elements. each of the type has arbitary
    amount of Elements, and all those Elements is in ramdon order, How Can I
    write the Schema file?
     
    Aray, Jan 5, 2007
    #1
    1. Advertising

  2. Aray

    Aray Guest

    I found a way: use <group> as following:

    <xs:complexType name="testType">
    <xs:choice>
    <xs:group ref="testGroup" maxOccurs="unbounded" minOccurs="0" />
    </xs:choice>
    </xs:complexType>
    <xs:group name="testGroup">
    <xs:choice>
    <xs:element name="element1" />
    <xs:element name="element2" />
    </xs:choice>
    </xs:group>

    --

    "Aray" <1@2.3> дÈëÏûÏ¢ news:enkti9$c25$99.com...
    > There were some different type elements. each of the type has arbitary
    > amount of Elements, and all those Elements is in ramdon order, How Can I
    > write the Schema file?
    >
     
    Aray, Jan 5, 2007
    #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. M Series
    Replies:
    0
    Views:
    364
    M Series
    Oct 20, 2003
  2. Fendi Baba
    Replies:
    0
    Views:
    525
    Fendi Baba
    Oct 21, 2003
  3. jacquesh
    Replies:
    2
    Views:
    569
    jacquesh
    Nov 8, 2006
  4. Steven D'Aprano
    Replies:
    0
    Views:
    143
    Steven D'Aprano
    Dec 23, 2013
  5. Replies:
    3
    Views:
    116
    Gary Herron
    Dec 23, 2013
Loading...

Share This Page