Is it possible to specify multiple fixed combinations of attributes for an element?
i.e.
<xs:element name="parameters" type="action1"/>
or
<xs:element name="parameters" type="action2"/>
where:
<xs:complexType name="action1">
<xs:attribute name="duration" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="action2">
<xs:attribute name="start" type="xs:integer" use="required"/>
<xs:attribute name="finish" type="xs:integer" use="required"/>
</xs:complexType>
so the following is valid xml
<parameters duration="1 month"/>
<parameters start="12" finish="17"/>
but
<parameters start="12" duration="1 month"/>
is not.
- Frink
i.e.
<xs:element name="parameters" type="action1"/>
or
<xs:element name="parameters" type="action2"/>
where:
<xs:complexType name="action1">
<xs:attribute name="duration" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="action2">
<xs:attribute name="start" type="xs:integer" use="required"/>
<xs:attribute name="finish" type="xs:integer" use="required"/>
</xs:complexType>
so the following is valid xml
<parameters duration="1 month"/>
<parameters start="12" finish="17"/>
but
<parameters start="12" duration="1 month"/>
is not.
- Frink