Thanks this works for "title" as a single element under "department". Another element under "department" is "subdepartment" and this is repeated 5 times for different sub departments.
If I try to enforce these to me unique, XMLSpy returns an error stating:
- Field '{anonymous}' of identity constraint 'UniqueSubDept' evaluates to a node-set with more than one member.
- Error location: departments / department / subdepartment
Here is the code:
Code:
<xs:unique name="UniqueSubDept">
<xs:selector xpath="department"/>
<xs:field xpath="subdepartment"/>
</xs:unique>
Please can you let me know how to enforce unique values within repeating elements?
Thanks