mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-20 03:52:25 +03:00
Changed xmlSchemaFormatIDCKeySequence() to use
* xmlschemas.c: Changed xmlSchemaFormatIDCKeySequence() to use xmlSchemaGetCanonValueWhtspExt() in order to correctly report values for xs:anySimpleType. * test/schemas/idc-keyref-err1* result/schemas/idc-keyref-err1*: Added a test for this change.
This commit is contained in:
14
test/schemas/idc-keyref-err1_0.xml
Normal file
14
test/schemas/idc-keyref-err1_0.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<Foo
|
||||
xmlns="urn:test:foo"
|
||||
xmlns:foo="urn:test:foo"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="urn:test:foo idc-keyref_1.xsd">
|
||||
|
||||
<Def>
|
||||
<Link foo:linkKey="L4"/>
|
||||
</Def>
|
||||
|
||||
<Ref foo:linkRef="L4"/>
|
||||
|
||||
</Foo>
|
53
test/schemas/idc-keyref-err1_1.xsd
Normal file
53
test/schemas/idc-keyref-err1_1.xsd
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema
|
||||
targetNamespace="urn:test:foo"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:foo="urn:test:foo"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="qualified">
|
||||
|
||||
<xs:element name="Link">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="linkKey" type="xs:string" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
||||
<!-- -->
|
||||
<xs:element name="Foo">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
|
||||
<xs:element name="Def">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="foo:Link"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="Ref">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="linkRef" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:key name="LinkKey">
|
||||
<xs:selector xpath=".//foo:Link | .//foo:Link"/>
|
||||
<xs:field xpath="@foo:linkKey"/>
|
||||
</xs:key>
|
||||
|
||||
<xs:keyref name="LinkKeyRef" refer="foo:LinkKey">
|
||||
<xs:selector xpath=".//foo:Ref"/>
|
||||
<xs:field xpath="@foo:linkRef"/>
|
||||
</xs:keyref>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
Reference in New Issue
Block a user