Project

Profile

Help

Bug #4744 » UniqueKeyBug.xsd

XSD to validate test file against - Marek Skorek, 2020-09-22 10:31

 
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:meta="http://anicasystem.com.pl/XMLSchema/meta"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified"
elementFormDefault="unqualified"
version="1.1">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element ref="row" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:unique name="uniqueKey">
<xs:selector xpath="row" />
<xs:field xpath="@A" />
<xs:field xpath="@B" />
<xs:field xpath="@C" />
<xs:field xpath="@D" />
</xs:unique>
</xs:element>
<xs:element name="row">
<xs:complexType>
<xs:attribute name="A" use="required" type="xs:string" />
<xs:attribute name="B" use="required" type="xs:string" />
<xs:attribute name="C" use="required" type="xs:string" />
<xs:attribute name="D" use="required" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:schema>
(2-2/2)