I have the following XML:
<Content name="contentName1">
<!-- Some sub elements here -->
</Content>
<Sequence Name="sequenceName1">
<Content name="contentName1" />
<!-- Some sub elements here -->
</Sequence>
with the following XSD
<xs:element maxOccurs="unbounded" name="Content">
<xs:complexType>
<xs:attribute name="Name" type="xs:string" use="required" />
<!-- other definitions here -->
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="Sequence">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Content">
<xs:complexType>
<xs:attribute name="ContentName" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
In the XSD, how can I tell to the ContentName attribute of the Content elements of Sequence to only accepts value declared in the ContentName of Content elements?
e.g: with the XML provided above, only contentName1 will be accepted in the Content of sequence.