XSD Restrictions based on target xml elements
- by ??????
Is it possible in xsd to create restriction based on elements of some type in target (processed) document?
For example I have XML like this:
<Pets>
<Pet name="Murka" />
<Pet name="Browko" />
<Pet name="Tuzik" />
</Pets>
<Children>
<Child name="Petruk" favoritePet="Browko" />
</Children>
so what I want to restrict the attribute "favoritePet" of element "Child" based on existing "Pet" elements.
How can I do this?