xmlスキーマのいわゆる「Unique Particle Attribution」制約と、これに違反する理由について何か知っている人はいますか:
<xs:complexType name="SMIL.switch.content">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="smil:metadata"/>
<xs:element ref="SMIL.switch-control"/>
</xs:choice>
<xs:choice>
<xs:choice>
<xs:sequence maxOccurs="unbounded">
<xs:choice maxOccurs="unbounded">
<xs:element ref="SMIL.timecontainer.class"/>
<xs:element ref="SMIL.media-object"/>
</xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="smil:metadata"/>
<xs:element ref="SMIL.switch-control"/>
</xs:choice>
</xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="smil:metadata"/>
<xs:element ref="SMIL.switch-control"/>
</xs:choice>
</xs:choice>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="smil:layout"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="smil:metadata"/>
<xs:element ref="SMIL.switch-control"/>
</xs:choice>
</xs:sequence>
</xs:choice>
</xs:sequence>
</xs:complexType>
XJC の実行によるエラーは次のとおりです。
[エラー] cos-nonambig: " http://www.w3.org/ns/SMIL ":metadata および " http://www.w3.org/ns/SMIL ":metadata (またはそれらの置換グループの要素) 「固有粒子の帰属」に違反します。このスキーマに対する検証中に、これら 2 つの粒子に対してあいまいさが生じます。
スキーマは、trang を使用して SMIL 3.0 DTD から生成されます。