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

A

Aray

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

Aray

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>
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,829
Latest member
KimberAlli

Latest Threads

Top