P
Piers Chivers
Hi,
I have XML like
<SomeElement>
<Value>5</Value>
<Value>3</Value>
<Value>7</Value>
</SomeElement>
I want to define the schema to say that the <Value>s must contain at least
one of a number of known values, and may contain some other <Value>s. For
example, if the known <Value>s were 3 and 5 then the above is valid. Also,
<SomeElement>
<Value>5</Value>
<Value>1</Value>
</SomeElement>
AND
<SomeElement>
<Value>3<Value>
</SomeElement>
are valid because they contain one of (3 and 5). But
<SomeElement>
<Value>8</Value>
</SomeElement>
is not valid. I've tried defining this using xs:all and enumerations but
with no luck. All suggestions gratefully received.
Thanks,
Piers
I have XML like
<SomeElement>
<Value>5</Value>
<Value>3</Value>
<Value>7</Value>
</SomeElement>
I want to define the schema to say that the <Value>s must contain at least
one of a number of known values, and may contain some other <Value>s. For
example, if the known <Value>s were 3 and 5 then the above is valid. Also,
<SomeElement>
<Value>5</Value>
<Value>1</Value>
</SomeElement>
AND
<SomeElement>
<Value>3<Value>
</SomeElement>
are valid because they contain one of (3 and 5). But
<SomeElement>
<Value>8</Value>
</SomeElement>
is not valid. I've tried defining this using xs:all and enumerations but
with no luck. All suggestions gratefully received.
Thanks,
Piers