XSD identity constraint errors
Inspect xs:unique, xs:key and xs:keyref selectors and fields. Repeated identifiers can violate a uniqueness rule even though every individual field has the right datatype. Correct identifiers at their source and keep references consistent.
Make keys unique and references consistent
Inspect xs:unique, xs:key and xs:keyref selectors and fields. Repeated identifiers can violate a uniqueness rule even though every individual field has the right datatype. Correct identifiers at their source and keep references consistent.
Reproduced engine diagnostics and complete fixes
Original minimal examples checked on 2 November 2026. Engine wording differs; follow the cause, not a message alone.
libxml2-wasm 0.7.2
Element 'a': Duplicate key-sequence ['x'] in unique identity-constraint 'uniqueId'.Xerces2-J 2.12.2 / Temurin Java 21.0.13+9-LTS
cvc-identity-constraint.4.1: Duplicate unique value [x] found for identity constraint "uniqueId" of element "r".lxml 6.0.2 / libxml2 2.14.6
Element 'a': Duplicate key-sequence ['x'] in unique identity-constraint 'uniqueId'..NET 10.0.14 / System.Xml
There is a duplicate key sequence 'x' for the 'uniqueId' key or unique identity constraint.Complete XSD (before)
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="r"><xs:complexType><xs:sequence><xs:element name="a" maxOccurs="unbounded"><xs:complexType><xs:attribute name="id" type="xs:string"/></xs:complexType></xs:element></xs:sequence></xs:complexType><xs:unique name="uniqueId"><xs:selector xpath="a"/><xs:field xpath="@id"/></xs:unique></xs:element></xs:schema>Repeat this check in your workflow
API, Python CLI and GitHub Actions starter are available for automation. The public API is early access; paid CI authentication and SLA are not offered. Pro: US$19/month, 25-file batches and 10 saved schemas. Team: US$49/month, 100-file batches, 100 schemas and five seats.