<root>
<elem type="1" id="1"/>
<elem type="1" id="2"/>
</root>
I want to check in XSD schema so that all the elements should have same attribute value for "type". Suppose one element has type="1" and other element has type="2", Then I want schema validation to fail. How to restrict this in Schema?