Unique name value validation in XSD
i have xml data like bellow, i want to validate for duplicate name, but initially F_NAME will be empty,how to do the validation
my xml is :
<Employee>
<Name ID="1" F_NAME="" />
<Name ID="2" F_NAME="" />
</Employee>
This code is not working:
<xs:unique name="Test" >
<xs:selector xpath="F_NAME"/>
<xs:field xpath="@Test"/>
</xs:unique>