G
Gus Gassmann
I have the following two elements in a large schema:
<xs:complexType name="TimeDomainStageVariables">
<xs:sequence minOccurs="0">
<xs:element name="var" type="TimeDomainStageVar"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="numberOfVariables"
type="xs:nonNegativeInteger" use="required"/>
<xs:attribute name="startIdx" type="xs:nonNegativeInteger"
use="optional"/>
</xs:complexType>
<xs:complexType name="TimeDomainStageVar">
<xs:attribute name="idx" use="required">
<xs:simpleType>
<xs:restriction base="xs:int"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
The idea is to provide a list of which variables belong to which
stage, and there are two mechanisms for doing this. Is it possible to
set things up so that the attribute "startIdx" and the sequence of
<TimeDomainStageVar>s in the first element is mutually exclusive? That
is, if the user puts startIdx, I'd like the maxOccurs in line 3 above
to be limited to 0 instead of "unbounded". Can that be done?
Thanks for any ideas.
<xs:complexType name="TimeDomainStageVariables">
<xs:sequence minOccurs="0">
<xs:element name="var" type="TimeDomainStageVar"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="numberOfVariables"
type="xs:nonNegativeInteger" use="required"/>
<xs:attribute name="startIdx" type="xs:nonNegativeInteger"
use="optional"/>
</xs:complexType>
<xs:complexType name="TimeDomainStageVar">
<xs:attribute name="idx" use="required">
<xs:simpleType>
<xs:restriction base="xs:int"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
The idea is to provide a list of which variables belong to which
stage, and there are two mechanisms for doing this. Is it possible to
set things up so that the attribute "startIdx" and the sequence of
<TimeDomainStageVar>s in the first element is mutually exclusive? That
is, if the user puts startIdx, I'd like the maxOccurs in line 3 above
to be limited to 0 instead of "unbounded". Can that be done?
Thanks for any ideas.