I want the character
element to be repeatable if the cell
@type is filled
, numbered
, specialNumbered
, or specialUnnumbered
. I want the character
element NOT to be repeatable if the cell
@type is multiCharacterNumbered
or multiCharacterUnnumbered
.
If the cell
type is blank
, I'd like to disallow the character
element altogether.
Does this require XSD 1.1? How do I form the conditional or test?
<xs:element name="cell" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="character" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="filled"/>
<xs:enumeration value="blank"/>
<xs:enumeration value="numbered"/>
<xs:enumeration value="specialNumbered"/>
<xs:enumeration value="specialUnnumbered"/>
<xs:enumeration value="multiCharacterNumbered"/>
<xs:enumeration value="multiCharacterUnnumbered"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>