aboutsummaryrefslogtreecommitdiffstats
path: root/test/schemas
diff options
context:
space:
mode:
authorKasimier T. Buchcik <kbuchcik@src.gnome.org>2005-08-09 12:31:55 +0000
committerKasimier T. Buchcik <kbuchcik@src.gnome.org>2005-08-09 12:31:55 +0000
commit800cbac34e09997cdb742e961f57b18bc7a58e75 (patch)
treeb522a9447f295573e9494ebb12fa519576f82c54 /test/schemas
parent6e65e15777ebb281aec362fa2aba51e2cb5aa87f (diff)
downloadandroid_external_libxml2-800cbac34e09997cdb742e961f57b18bc7a58e75.tar.gz
android_external_libxml2-800cbac34e09997cdb742e961f57b18bc7a58e75.tar.bz2
android_external_libxml2-800cbac34e09997cdb742e961f57b18bc7a58e75.zip
Fixed #312957 reported by Carol Hunter: streaming XPath states were not
* xmlschemas.c: Fixed #312957 reported by Carol Hunter: streaming XPath states were not popped in every case, thus failed to resolve correctly for subsequent input. * test/schemas/bug312957* result/schemas/bug312957*: Added the test submitted by Carol Hunter.
Diffstat (limited to 'test/schemas')
-rw-r--r--test/schemas/bug312957_0.xml14
-rw-r--r--test/schemas/bug312957_1.xsd39
2 files changed, 53 insertions, 0 deletions
diff --git a/test/schemas/bug312957_0.xml b/test/schemas/bug312957_0.xml
new file mode 100644
index 00000000..c22444f7
--- /dev/null
+++ b/test/schemas/bug312957_0.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<family xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="bug312957_1.xsd"
+ name="test">
+ <siblings>
+ <sibling name="gill"/>
+ </siblings>
+ <sisters>
+ <sister name="gill"/>
+ <sister name="annie"/>
+ </sisters>
+</family>
+
+
diff --git a/test/schemas/bug312957_1.xsd b/test/schemas/bug312957_1.xsd
new file mode 100644
index 00000000..fb7972ea
--- /dev/null
+++ b/test/schemas/bug312957_1.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="family" type="family_type">
+ <xs:key name="sibling_key">
+ <xs:selector xpath="siblings/sibling"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+ <xs:keyref name="sibling_key_ref" refer="sibling_key">
+ <xs:selector xpath="sisters/sister"/>
+ <xs:field xpath="@name"/>
+ </xs:keyref>
+ </xs:element>
+ <xs:complexType name="family_type">
+ <xs:sequence>
+ <xs:element name="siblings" type="siblings_type" />
+ <xs:element name="sisters" type="sisters_type" />
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="siblings_type">
+ <xs:sequence>
+ <xs:element name="sibling" type="sibling_type" minOccurs="0"
+maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="sisters_type">
+ <xs:sequence>
+ <xs:element name="sister" type="sister_type" minOccurs="0"
+maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="sibling_type">
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="sister_type">
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+</xs:schema>