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

XML schema conditional execution

Status
Not open for further replies.

popolade

Programmer
Jul 7, 2005
1
FR
Hey

I've got a problem with a conditional execution in a XML schema.
Depending of the value of an element (called SPL), an other element becomes mandatory (called RON, at the begining conditional).

It's something like this:

If SPL equals ZZZZZ, RON becomes mandatory (minOccurs="1")

<xs:element name="SPL" type="SPLtype"/>
<xs:element name="RON" type="RONtype" minOccurs="0"/>

Where do I write the following test?

<xs:if test="SPLtype='ZZZZZ'">
<xs:element name="RONtype" minOccurs="1"/>
</xs:if>

Sorry for my english.

Thank you, Mathieu.
 
There is no such element as xs:if.

To do this, I think you'll have to use a choice.

Jon

"Asteroids do not concern me, Admiral. I want that ship, not excuses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top