Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml schema help

Status
Not open for further replies.

nelco

Programmer
Apr 4, 2006
93
0
0
US
My xsd:

<xs:element name="UDAS">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="2" maxOccurs="unbounded" name="UDA">
<xs:complexType>

<xs:sequence>
<xs:element name="UDA_ID" type="inttype" />
<xs:element name="UDA_VALUE" type="inttype" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

my xml:
<UDAS>
<UDA>
<UDA_ID>32</UDA_ID>
<UDA_VALUE>5</UDA_VALUE>
</UDA>
<UDA>
<UDA_ID>33</UDA_ID>
<UDA_VALUE>47</UDA_VALUE>
</UDA>
<UDA>
<UDA_ID>64</UDA_ID>
<UDA_VALUE>5</UDA_VALUE>
</UDA>
<UDA>
<UDA_ID>63</UDA_ID>
<UDA_VALUE>47</UDA_VALUE>
</UDA>
</UDAS>

I want to make two UDA's mandatory. They are UDA_ID 63 and UDA_ID 64. Others can have UDA_ID's values other than 63 or 64.

How do I restrict that in my schema.

I will appreciate any help.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top