Where to place xs:unique constraint in XSD?
问题 I am using XSD for XML validation. I want to add unique values constraint for the input elements. I have XML format like this: <?xml version="1.0" encoding="UTF-8"?> <test> <definitions> <input>Page</input> </definitions> <definitions> <input>Page</input> </definitions> </test> My XSD: <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="test"> <xs:complexType> <xs:sequence> <xs:element name="definitions"