diff options
author | Kasimier T. Buchcik <kbuchcik@src.gnome.org> | 2005-11-11 12:52:32 +0000 |
---|---|---|
committer | Kasimier T. Buchcik <kbuchcik@src.gnome.org> | 2005-11-11 12:52:32 +0000 |
commit | 77e76829b62054db5ebb59f4ab5bc73bef12c2bc (patch) | |
tree | 63c9fe95c25f6e724dd2b10e6c5f7febc2df320f /test | |
parent | a44f234d3a0c94879136c5fa4b24f386148716ad (diff) | |
download | libxml2-77e76829b62054db5ebb59f4ab5bc73bef12c2bc.tar.gz |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/schemas/idc-keyref-err1_0.xml | 14 | ||||
-rw-r--r-- | test/schemas/idc-keyref-err1_1.xsd | 53 |
2 files changed, 67 insertions, 0 deletions
diff --git a/test/schemas/idc-keyref-err1_0.xml b/test/schemas/idc-keyref-err1_0.xml new file mode 100644 index 00000000..64a1d0bd --- /dev/null +++ b/test/schemas/idc-keyref-err1_0.xml @@ -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>
\ No newline at end of file diff --git a/test/schemas/idc-keyref-err1_1.xsd b/test/schemas/idc-keyref-err1_1.xsd new file mode 100644 index 00000000..43c769f4 --- /dev/null +++ b/test/schemas/idc-keyref-err1_1.xsd @@ -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>
\ No newline at end of file |