I am trying to create an XML Schema 1.0 that validates multiple element combinations.
For example,
Is it possible to create a list of possible element - value combination in schema? Like, Valid only if
A=1 && B=2
A=2 && B=4
Pass Example
<Full>
<A>1</A>
<B>2</B>
</Full>
<Full>
<A>2</A>
<B>4</B>
</Full>
Fail Example
<Full>
<A>2</A>
<B>2</B>
</Full>
<Full>
<A>1</A>
<B>4</B>
</Full>
I can't use XML Schema 1.1 yet. Is there any good way to put these logic in one schema?
Sorry about the confusion, I just rewrite my problem again.
Here Set below things based on your requirement:-
minOccurs="0" - for zero occurrances or more than that
minOccurs="1" - for minimum one occurrance or more than that
maxOccurs="unbounded" : Set this if you want to use infinite times
maxOccurs="1" : Set this if you want to only for one time
UPDATED:
Assuming that your are passing all the three separate XMLs, (Not as one whole XML)
Another Update: