与えられた:
<xs:complexType name="SymbolsList" final="">
<xs:sequence>
<xs:element name="symbol" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ComboList">
<xs:sequence>
<xs:element name="combo" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="symbol" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="comboName" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="symbolsList" type="SymbolsList">
<xs:unique name="uniqueSymbol">
<xs:selector xpath="./symbol" />
<xs:field xpath="@name" />
</xs:unique>
</xs:element>
<xs:element name="combosList" type="ComboList">
<xs:unique name="uniqueCombo">
<xs:selector xpath="./combo" />
<xs:field xpath="@comboName" />
</xs:unique>
</xs:element>
これは、記号のリストとそれらの記号の組み合わせのリストを定義すると思います。シンボルのリストの各エントリには一意の名前が必要であり、コンボのリストの各エントリには一意のcomboNameが必要です。私が知りたいのは、combosListシーケンスで許可されるオカレンスの数を、少なくともシンボルリストで定義されているシンボルの数に制限する方法があるかどうかです。
カーディナリティ制限が可変であるかどうか、もしそうなら、それをどのように関連付けるかを尋ねていると思います。
また、comboList要素(単一のコンボ)がsymbolList要素で定義されたシンボルの名前のみを使用できるようにしたいと思います。
その最後の部分を引っ張ることができると思います。異種の要素シーケンスのカリジナルサイズをいずれか以上に制限することについて話しているものはどこにも見つかりません。
おそらくそれは不可能です。