So, basically what I want to do is to emulate the "ref" attribute of schema validation. I have the following XML, for example:
<node name="parent">
<subordinate name="child3" />
</node>
<node name="child1" />
<node name="child2" />
And I want this to be flagged by my schema as invalid, since "child3" isn't one of the available 'node' options (it wasn't specified). I have the following schema:
<xs:element name="node" nillable="false">
<xs:complexType>
<xs:attribute ref="name" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="subordinate" nillable="false">
<xs:complexType>
<xs:attribute ref="name" use="required" />
</xs:complexType>
</xs:element>
But I'm not sure how to specify that the "subordinate" element's "name" attribute must come from another defined "node" element.
Thanks for any help you can give!