I need to create DTD or XMLSchema. How do i link elements collection@key="role" with collection@key="tie"? Is this possible or do they need to be done in different elements?
I have XML
<!DOCTYPE schema [
<!ELEMENT schema (collection+, part+)>
<!ELEMENT collection[key=role] (name, partref+)>
<!ATTLIST collection[key=role] collection-id ID #REQUIRED
key CDATA #REQUIRED>
<!ELEMENT name (#PCDATA)>
<!ELEMENT partref EMPTY>
<!ATTLIST partref refid IDREF #REQUIRED>
<!ELEMENT collection[key=tie] (name)>
<!ATTLIST collection[key=tie] part-id ID #REQUIRED>
]>
<schema>
<collection collection-id="C28392-33-TT" key="role">
<name>Turnip Twaddler</name>
<partref refid="P81952-26-PK"/>
<partref refid="P86679-52-SP"/>
<partref refid="P81472-68-FD"/>
<partref refid="P88107-39-GT"/>
</collection>
<collection collection-id="C28772-63-OB" key="role">
<name>Olive Bruiser</name>
<partref refid="P80228-21-PT"/>
<partref refid="P82387-85-PA"/>
</collection>
<part part-id="P80228-21-PT">
<name>Pitter</name>
</part>
<collection part-id="P86994-25-RC" key="tie">
<name>Ribbon Curler</name>
</collection>
</schema>