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