XSD Restrictions based on target xml elements
Posted
by ??????
on Stack Overflow
See other posts from Stack Overflow
or by ??????
Published on 2010-03-24T06:19:13Z
Indexed on
2010/03/24
6:23 UTC
Read the original article
Hit count: 564
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?
© Stack Overflow or respective owner