<xs:element name="semanticDensity" type="semanticDensity"> <xs:unique name="semanticDensityUnique"> <xs:selector xpath="*"/> <xs:field xpath="@uniqueElementName"/> </xs:unique> </xs:element>