tags:

views:

15

answers:

1

Hi all,

I have an xsd schema and I want to be able to make it so that the order of the elements doesn't matter, this is what I have:

<xs:element name="ADT_A08_231_GLO_DEF">
  <xs:complexType>
   <xs:sequence>
    <xs:element minOccurs="1" maxOccurs="1" name="EVN_EventTypeSegment" type="xs:string" />
    <xs:element minOccurs="1" maxOccurs="1" name="PID_PatientIdentificationSegment" type="xs:string" />
    <xs:element minOccurs="0" maxOccurs="1" name="PD1_PatientAdditionalDemographicSegment" type="xs:string" />
   </xs:sequence>
  </xs:complexType>
</xs:element>

How can I make it so that the EVN and PID element can occur random (first EVN then PID or first PID element and then the EVN element) in the xml file.

like:

<EVN_EventTypeSegment>Test</EVN_EventTypeSegment>
<PID_PatientIdentificationSegment>PIDTest</PID_PatientIdentificationSegment>

or:

<PID_PatientIdentificationSegment>PIDTest</PID_PatientIdentificationSegment>
<EVN_EventTypeSegment>Test</EVN_EventTypeSegment>

Thx for your help

A: 

I made this possible by using a choice group :D

Rise_against