You must Sign In to post a response.
  • Category: XML

    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>
  • #758061
    Hello Ashok,

    Can you share your whole XSD code so that we can help you easily.?

    Regards,
    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"


  • Sign In to post your comments