I'm trying to force uniqueness of an attribute using \[code\]xs:unique\[/code\]. However, I think I'm having some trouble with XPath. I have an abstract element, ObjectA, that has an attribute "identifier" that is a string. I want this identifier to be unique across all instances of the concrete elements ObjectB and ObjectC. I don't think \[code\]xpath="."\[/code\] is correct.\[code\]<xs:element name="ObjectA" type="ns:ObjectAType"> <xs:unique name="Identifier"> <xs:selector xpath="."/> <xs:field xpath="@identifier"/> </xs:unique></xs:element><xs:complexType name="ObjectAType" abstract="true"> <xs:attribute ref="ns:identifier" use="required" /></xs:complexType><xs:attribute name="identifier" type="xs:string" /><xs:element name="ObjectB" type="ns:ObjectBType" substitutionGroup=ns:ObjectA" /><xs:element name="ObjectC" type="ns:ObjectCType" substitutionGroup=ns:ObjectA" />\[/code\]