Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Invalid
-
2.11.0
-
None
-
None
-
Windows, Java 1.6
Description
When a keyref field element refers to attribute defined as simple type of list the identity constraint does not work. Schema and data below.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
<xs:element name="Data">
<xs:complexType>
<xs:all>
<xs:element name="Data1">
<xs:complexType>
<xs:attribute name="keydata" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="Data2">
<xs:complexType>
<xs:attribute name="keyref" type="keyreftypes" use="required"/>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
<xs:key name="Keys">
<xs:selector xpath=".//Data1"/>
<xs:field xpath="@keydata"/>
</xs:key>
<xs:keyref name="KeyRefs" refer="Keys">
<xs:selector xpath=".//Data2"/>
<xs:field xpath="@keyref"/>
</xs:keyref>
</xs:element>
<xs:simpleType name="keyreftypes">
<xs:list itemType="xs:string"/>
</xs:simpleType>
</xs:schema>
<?xml version="1.0" encoding="utf-8" ?>
<Data>
<Data1 keydata="1"/>
<Data2 keyref="1"/>
</Data>