views:

346

answers:

1

In the XSD, there are two elements, A and B. They are siblings.

A can have a value of either "1" or "2". B can have a value of either "one" or "two".

I want to restrict this, however, so that only "1-one" and "2-two" are valid combinations, not "1-two" or "2-one". Is there a way of doing that in the XSD?

+2  A: 

Hi Rainer,

Schematron can be used to define such co-occurrence constraints. You can find some introductory articles here:

Regards, divo

0xA3