tags:

views:

202

answers:

2

Is there a way to change the available elements based on a previous element value?

I have some lookup 'Cause' codes but some of these only belong to certain 'Products'.

I therefore want to create each products lookup cause code enumeration and let this only be available based on the product selection.

Is this possible ?

Many Thanks

+1  A: 

I don't think those sort of "business rules" can be expressed in XSD.

One option is to also create schematron validation rules to enforce those sort of conditional structure rules based upon element/attribute values.

Mads Hansen
A: 

You can effect element polymorphism (of the same name) in the XSD for instance elements decorated w/ enumerated xsi:type attributes as described here

6eorge Jetson