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 Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml schema tricks

Status
Not open for further replies.

ranadhir

Programmer
Nov 4, 2003
54
IN
I need to define 2 rules in my schema .
The validated xml is of the form

<root>
<vegetable>
<class>root</radish>
<type>A</type>
<value>moderate</value>
</vegetable>
<vegetable>
...
...
</vegetable>
..
..
</root>
Condition 1: When class is 'seed' - element 'type' is optional else mandatory.
Condition 2: Atleast one 'vegetable' should have 'value' as 'benficial'.

How do i define these conditions in the schema?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top