summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-09-10 05:26:00 +0000
committerMike Hommey <mh@glandium.org>2004-09-10 05:26:00 +0000
commit09deb06614c3408ec0816a3c88920138bae2083c (patch)
treea1b841a7dc28eecb98ca361c9371ecd1449a1908 /test
parentc14c53a3645d81281058d4bb4cff24fa8d6faf33 (diff)
downloadlibxml2-09deb06614c3408ec0816a3c88920138bae2083c.tar.gz
Load /tmp/tmp.BmUFjT/libxml2-2.6.13 intoupstream/2.6.13
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'test')
-rw-r--r--test/catalogs/whites.script4
-rw-r--r--test/catalogs/whites.sgml5
-rw-r--r--test/catalogs/whitex.script7
-rw-r--r--test/catalogs/whitex.xml15
-rw-r--r--test/ns54
-rw-r--r--test/schemas/annot-err_0.xml4
-rw-r--r--test/schemas/annot-err_0.xsd21
-rw-r--r--test/schemas/any1_0.xml21
-rw-r--r--test/schemas/any1_0.xsd22
-rw-r--r--test/schemas/any2_0.xml24
-rw-r--r--test/schemas/any2_0.xsd26
-rw-r--r--test/schemas/any3_0.xml17
-rw-r--r--test/schemas/any3_0.xsd17
-rw-r--r--test/schemas/any4_0.xml17
-rw-r--r--test/schemas/any4_0.xsd28
-rw-r--r--test/schemas/bug141333_0.xml9
-rw-r--r--test/schemas/bug141333_0.xsd25
-rw-r--r--test/schemas/bug145246.xsd.imp119
-rw-r--r--test/schemas/bug145246_0.xml30
-rw-r--r--test/schemas/bug145246_0.xsd173
-rw-r--r--test/schemas/ct-sc-nobase_0.xml4
-rw-r--r--test/schemas/ct-sc-nobase_0.xsd24
-rw-r--r--test/schemas/element-err_0.xml4
-rw-r--r--test/schemas/element-err_0.xsd39
-rw-r--r--test/schemas/element-minmax-err_0.xml5
-rw-r--r--test/schemas/element-minmax-err_0.xsd11
-rw-r--r--test/schemas/facet-unionST-err1_0.xml2
-rw-r--r--test/schemas/facet-whiteSpace_0.xml7
-rw-r--r--test/schemas/facet-whiteSpace_0.xsd12
-rw-r--r--test/schemas/hexbinary_1.xml2
-rwxr-xr-xtest/schemas/import-bad-1_0.imp5
-rw-r--r--test/schemas/import1_0.imp8
-rw-r--r--test/schemas/import1_0.xml11
-rw-r--r--test/schemas/import1_0.xsd29
-rw-r--r--test/schemas/import1_0b.imp8
-rw-r--r--test/schemas/import2_0.imp24
-rw-r--r--test/schemas/import2_0.xml8
-rw-r--r--test/schemas/import2_0.xsd24
-rw-r--r--test/schemas/include1_0.inc28
-rw-r--r--test/schemas/include1_0.xml8
-rw-r--r--test/schemas/include1_0.xsd15
-rw-r--r--test/schemas/include2_0.inc17
-rw-r--r--test/schemas/include2_0.xml9
-rw-r--r--test/schemas/include2_0.xsd14
-rw-r--r--test/schemas/include3_0.inc5
-rw-r--r--test/schemas/include3_0.xml7
-rw-r--r--test/schemas/include3_0.xsd9
-rw-r--r--test/schemas/item_0.xsd2
-rw-r--r--test/schemas/item_1.xsd2
-rw-r--r--test/schemas/restrict-CT-attr-ref_0.xml3
-rw-r--r--test/schemas/restrict-CT-attr-ref_0.xsd30
-rw-r--r--test/schemas/restriction-attr1_0.xml3
-rw-r--r--test/schemas/restriction-attr1_0.xsd18
-rw-r--r--test/schemas/seq-dubl-elem1_0.xml7
-rw-r--r--test/schemas/seq-dubl-elem1_0.xsd25
-rw-r--r--test/schemas/union_0_0.xml7
-rw-r--r--test/schemas/union_0_0.xsd5
-rw-r--r--test/schemas/xml.xsd117
-rw-r--r--test/schemas/xsd-list-itemType_0.xml3
-rw-r--r--test/schemas/xsd-list-itemType_0.xsd14
-rw-r--r--test/schemas/xsd-simpleType-varieties_0.xsd4
-rw-r--r--test/scripts/.memdump4
-rw-r--r--test/scripts/set1.script2
-rw-r--r--test/scripts/set1.xml1
-rw-r--r--test/scripts/set2.script3
-rw-r--r--test/scripts/set2.xml1
-rw-r--r--test/scripts/set3.script5
-rw-r--r--test/scripts/set3.xml1
-rw-r--r--test/scripts/set4.script4
-rw-r--r--test/scripts/set4.xml1
70 files changed, 1178 insertions, 11 deletions
diff --git a/test/catalogs/whites.script b/test/catalogs/whites.script
new file mode 100644
index 0000000..8f4dd13
--- /dev/null
+++ b/test/catalogs/whites.script
@@ -0,0 +1,4 @@
+public "-//OASIS//DTD DocBook XML CALS Table Model V4.1//EN "
+public "-//Davenport//DTD DocBook V3.0//EN"
+public " -//OASIS//DTD XML Exchange Table Model 19990315//EN"
+public "-//Davenport//ENTITIES DocBook Additional General Entities V3.0//EN"
diff --git a/test/catalogs/whites.sgml b/test/catalogs/whites.sgml
new file mode 100644
index 0000000..50269b7
--- /dev/null
+++ b/test/catalogs/whites.sgml
@@ -0,0 +1,5 @@
+PUBLIC " -//OASIS//DTD DocBook XML CALS Table Model V4.1//EN" "calstblx.dtd"
+PUBLIC "-//OASIS//DTD XML Exchange Table Model 19990315//EN " "soextblx.dtd"
+PUBLIC "-//Davenport//DTD DocBook
+ V3.0//EN" "docbook.dtd"
+PUBLIC "-//Davenport//ENTITIES DocBook Additional General Entities V3.0//EN" "dbgenent.mod"
diff --git a/test/catalogs/whitex.script b/test/catalogs/whitex.script
new file mode 100644
index 0000000..a49ca23
--- /dev/null
+++ b/test/catalogs/whitex.script
@@ -0,0 +1,7 @@
+resolve "toto " http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod
+public "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN"
+public " -//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN"
+public "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN "
+system urn:publicid:+-:OASIS:DTD+++DocBook+XML+V4.1.2:EN+
+public urn:publicid:+-:OASIS:DTD+DocBook+XML+++V4.1.2:EN+
+resolve " toto " toto
diff --git a/test/catalogs/whitex.xml b/test/catalogs/whitex.xml
new file mode 100644
index 0000000..d742887
--- /dev/null
+++ b/test/catalogs/whitex.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+<public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/>
+<public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/dbnotnx.mod"/>
+<public publicId=" -//OASIS//ENTITIES DocBook
+ XML Character Entities V4.1.2//EN " uri="http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod"/>
+<public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod"/>
+<public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/dbhierx.mod"/>
+<public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/dbgenent.mod"/>
+<public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd"/>
+<public publicId="-//OASIS//DTD DocBook MathML Module V1.0//EN" uri="http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd"/>
+<nextCatalog catalog="stylesheet.xml"/>
+<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/" rewritePrefix="/usr/share/xml/docbook/"/>
+</catalog>
diff --git a/test/ns5 b/test/ns5
new file mode 100644
index 0000000..d75d345
--- /dev/null
+++ b/test/ns5
@@ -0,0 +1,4 @@
+<element name="foo" xmlns:rng="http://example.org/ns/1" xmlns="http://example.org/ns/1">
+ <empty/>
+</element>
+
diff --git a/test/schemas/annot-err_0.xml b/test/schemas/annot-err_0.xml
new file mode 100644
index 0000000..fe92b0a
--- /dev/null
+++ b/test/schemas/annot-err_0.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<foo xmlns="http://FOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO annot-err_0.xsd"/> \ No newline at end of file
diff --git a/test/schemas/annot-err_0.xsd b/test/schemas/annot-err_0.xsd
new file mode 100644
index 0000000..70df4f7
--- /dev/null
+++ b/test/schemas/annot-err_0.xsd
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:goo="http://GOO"
+ xmlns:but="http://BUT">
+ <xsd:element name="foo" xml:lang="hhh">
+ <xsd:annotation id="?" death="is a good entertainer" but:such="is life">
+ I shouldn't do this here...
+ <xsd:appinfo id="?" source="somewhere"
+ goo:fun="bag" fun="another fun-bag">
+ weeelll
+ </xsd:appinfo>
+ <xsd:documentation xml:lang="*" id="?" source="anywhere"
+ goo:mothers="of invention" mothers="don't do your dishes">
+ hmmmmmm
+ </xsd:documentation>
+ ...and here as well - more than ever
+ </xsd:annotation>
+ </xsd:element>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/any1_0.xml b/test/schemas/any1_0.xml
new file mode 100644
index 0000000..91264e4
--- /dev/null
+++ b/test/schemas/any1_0.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- Tests xsd:any with "##any". -->
+<foo:foo
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO any1_0.xsd">
+
+ <foo:anything>
+ <foo:boo booAttr="123"/>
+ </foo:anything>
+ <bar:anything>
+ <foo:boo booAttr="213"/>
+ </bar:anything>
+ <anything>
+ <foo:boo booAttr="213"/>
+ </anything>
+
+
+</foo:foo>
+
diff --git a/test/schemas/any1_0.xsd b/test/schemas/any1_0.xsd
new file mode 100644
index 0000000..ed0087b
--- /dev/null
+++ b/test/schemas/any1_0.xsd
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- Tests xsd:any with "##any". -->
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO">
+
+ <xsd:element name="boo">
+ <xsd:complexType>
+ <xsd:attribute name="booAttr" type="xsd:integer" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="3"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/any2_0.xml b/test/schemas/any2_0.xml
new file mode 100644
index 0000000..e649a2c
--- /dev/null
+++ b/test/schemas/any2_0.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- Tests xsd:any with a set of namespaces, icluding
+ "##local" and "##targetNamespace". -->
+<foo:foo
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO any2_0.xsd">
+
+ <foo:anything>
+ <foo:boo booAttr="123"/>
+ </foo:anything>
+
+ <bar:anything>
+ <foo:boo booAttr="123"/>
+ </bar:anything>
+
+ <anything>
+ <foo:boo booAttr="123"/>
+ </anything>
+
+
+</foo:foo>
+
diff --git a/test/schemas/any2_0.xsd b/test/schemas/any2_0.xsd
new file mode 100644
index 0000000..2bf726e
--- /dev/null
+++ b/test/schemas/any2_0.xsd
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- Tests xsd:any with a set of namespaces, icluding
+ "##local" and "##targetNamespace". -->
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO">
+
+ <xsd:element name="boo">
+ <xsd:complexType>
+ <xsd:attribute name="booAttr" type="xsd:integer" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any
+ namespace="##targetNamespace http://BAR ##local"
+ processContents="lax"
+ maxOccurs="3"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/any3_0.xml b/test/schemas/any3_0.xml
new file mode 100644
index 0000000..158f91c
--- /dev/null
+++ b/test/schemas/any3_0.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- Tests xsd:any.
+ invalid: <bar.A/> and <foo:bar.B/>
+ valid: <bar:bar.C/>
+-->
+<foo:foo
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO any3_0.xsd">
+
+ <bar.A/>
+ <foo:bar.B/>
+ <bar:bar.C/>
+
+</foo:foo>
+
diff --git a/test/schemas/any3_0.xsd b/test/schemas/any3_0.xsd
new file mode 100644
index 0000000..b5c29f6
--- /dev/null
+++ b/test/schemas/any3_0.xsd
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO">
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax"/>
+ <xsd:any namespace="##other" processContents="lax"/>
+ <xsd:any namespace="##other" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/any4_0.xml b/test/schemas/any4_0.xml
new file mode 100644
index 0000000..1620397
--- /dev/null
+++ b/test/schemas/any4_0.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- Tests xsd:any.
+ invalid: <bar.A/> and <foo:bar.B/>
+ valid: <bar:bar.C/>
+-->
+<foo:foo
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO any4_0.xsd">
+
+ <foo:anything>
+ <foo:boo booAttr="123"/>
+ </foo:anything>
+
+</foo:foo>
+
diff --git a/test/schemas/any4_0.xsd b/test/schemas/any4_0.xsd
new file mode 100644
index 0000000..fa93577
--- /dev/null
+++ b/test/schemas/any4_0.xsd
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO">
+
+ <xsd:element name="boo">
+ <xsd:complexType>
+ <xsd:attribute name="booAttr" type="xsd:integer" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:choice>
+ <xsd:any namespace="http://FOO" processContents="lax" maxOccurs="1"/>
+ <xsd:element name="anything" form="qualified">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="foo:boo"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/bug141333_0.xml b/test/schemas/bug141333_0.xml
new file mode 100644
index 0000000..e14aa46
--- /dev/null
+++ b/test/schemas/bug141333_0.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="bug141333.xsd" attrA="valueA">
+
+ <bar attrA="valueA" attrB="valueB"/>
+
+</foo>
+
diff --git a/test/schemas/bug141333_0.xsd b/test/schemas/bug141333_0.xsd
new file mode 100644
index 0000000..1b81a7b
--- /dev/null
+++ b/test/schemas/bug141333_0.xsd
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
+
+ <xs:element name="foo" type="baseType"/>
+
+ <xs:complexType name="baseType">
+ <xs:all>
+ <xs:element name="bar" type="derivedType" minOccurs="0"/>
+ </xs:all>
+ <xs:attribute name="attrA" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="derivedType">
+ <xs:complexContent>
+ <xs:extension base="baseType">
+ <xs:attribute name="attrB" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+</xs:schema>
+
+
+
+
diff --git a/test/schemas/bug145246.xsd.imp b/test/schemas/bug145246.xsd.imp
new file mode 100644
index 0000000..7d92e1c
--- /dev/null
+++ b/test/schemas/bug145246.xsd.imp
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://purl.org/dc/elements/1.1/"
+ targetNamespace="http://purl.org/dc/elements/1.1/"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ DCMES 1.1 XML Schema
+ XML Schema for http://purl.org/dc/elements/1.1/ namespace
+
+ Created 2003-04-02
+
+ Created by
+
+ Tim Cole (t-cole3@uiuc.edu)
+ Tom Habing (thabing@uiuc.edu)
+ Jane Hunter (jane@dstc.edu.au)
+ Pete Johnston (p.johnston@ukoln.ac.uk),
+ Carl Lagoze (lagoze@cs.cornell.edu)
+
+ This schema declares XML elements for the 15 DC elements from the
+ http://purl.org/dc/elements/1.1/ namespace.
+
+ It defines a complexType SimpleLiteral which permits mixed content
+ and makes the xml:lang attribute available. It disallows child elements by
+ use of minOcccurs/maxOccurs.
+
+ However, this complexType does permit the derivation of other complexTypes
+ which would permit child elements.
+
+ All elements are declared as substitutable for the abstract element any,
+ which means that the default type for all elements is dc:SimpleLiteral.
+
+ </xs:documentation>
+
+ </xs:annotation>
+
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="xml.xsd">
+ </xs:import>
+ <!--http://www.w3.org/2001/03/xml.xsd-->
+ <xs:complexType name="SimpleLiteral">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ This is the default type for all of the DC elements.
+ It permits text content only with optional
+ xml:lang attribute.
+ Text is allowed because mixed="true", but sub-elements
+ are disallowed because minOccurs="0" and maxOccurs="0"
+ are on the xs:any tag.
+
+ This complexType allows for restriction or extension permitting
+ child elements.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:complexContent mixed="true">
+ <xs:restriction base="xs:anyType">
+ <xs:sequence>
+ <xs:any processContents="lax" minOccurs="1" maxOccurs="2"/>
+ </xs:sequence>
+ <xs:attribute ref="xml:lang" use="optional"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="any" type="SimpleLiteral" abstract="true"/>
+
+ <xs:element name="title" substitutionGroup="any"/>
+ <xs:element name="creator" substitutionGroup="any"/>
+ <xs:element name="subject" substitutionGroup="any"/>
+ <xs:element name="description" substitutionGroup="any"/>
+ <xs:element name="publisher" substitutionGroup="any"/>
+ <xs:element name="contributor" substitutionGroup="any"/>
+ <xs:element name="date" substitutionGroup="any"/>
+ <xs:element name="type" substitutionGroup="any"/>
+ <xs:element name="format" substitutionGroup="any"/>
+ <xs:element name="identifier" substitutionGroup="any"/>
+ <xs:element name="source" substitutionGroup="any"/>
+ <xs:element name="language" substitutionGroup="any"/>
+ <xs:element name="relation" substitutionGroup="any"/>
+ <xs:element name="coverage" substitutionGroup="any"/>
+ <xs:element name="rights" substitutionGroup="any"/>
+
+ <xs:group name="elementsGroup">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ This group is included as a convenience for schema authors
+ who need to refer to all the elements in the
+ http://purl.org/dc/elements/1.1/ namespace.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="any"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:group>
+
+ <xs:complexType name="elementContainer">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ This complexType is included as a convenience for schema authors who need to define a root
+ or container element for all of the DC elements.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:choice>
+ <xs:group ref="elementsGroup"/>
+ </xs:choice>
+ </xs:complexType>
+
+
+</xs:schema>
+
diff --git a/test/schemas/bug145246_0.xml b/test/schemas/bug145246_0.xml
new file mode 100644
index 0000000..6e53ac4
--- /dev/null
+++ b/test/schemas/bug145246_0.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--DOCTYPE giml SYSTEM "http://gitk.sourceforge.net/giml.dtd"-->
+<!-- $Id: bug145246_0.xml,v 1.1 2004/08/10 14:17:33 veillard Exp $
+ * @file gitkTemplate_message.xml
+ * @author Stefan Kost <ensonic@users.sf.net>
+ * @date Thu Jan 17 11:22:38 2002
+ *
+ * @brief message dialog template
+ * @ingroup gitkcore
+ *
+-->
+<giml xmlns="http://gitk.sourceforge.net/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://gitk.sourceforge.net/ bug145246.xsd"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.0"
+ >
+ <dialog focus="ctrl">
+ <meta>
+ <dc:title><i18n:text>message</i18n:text></dc:title>
+ </meta>
+ <dialogwidgets>
+ <dialogwidget id="Okay"/>
+ </dialogwidgets>
+ <widgetgroup>
+ <widget id="Message" type="label"/>
+ </widgetgroup>
+ </dialog>
+</giml>
+
diff --git a/test/schemas/bug145246_0.xsd b/test/schemas/bug145246_0.xsd
new file mode 100644
index 0000000..f51520d
--- /dev/null
+++ b/test/schemas/bug145246_0.xsd
@@ -0,0 +1,173 @@
+<?xml version="1.0" ?>
+<!--
+ * $Id: bug145246_0.xsd,v 1.1 2004/08/10 14:17:33 veillard Exp $
+ * @file giml.xsd
+ * @author Stefan Kost <ensonic@users.sf.net>
+ * @date Thu Jun 24 17:28:26 MEST 2004
+ *
+ * @brief giml document schema definition
+ * @ingroup gitkcore
+ *
+-->
+<xs:schema targetNamespace="http://gitk.sourceforge.net/"
+ xmlns="http://gitk.sourceforge.net/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.0/">
+ <xs:annotation>
+ <xs:documentation>
+ This schema describes giml dialog sources
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:import namespace="http://purl.org/dc/elements/1.1/"
+ schemaLocation="bug145246.xsd.imp"
+ />
+ <!--xs:import namespace="http://apache.org/cocoon/i18n/2.0/"
+ schemaLocation="file://./i18n.xsd"
+ /-->
+
+ <!-- foreign namespace
+ <xs:element name="title">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="text">
+ <xs:complexType mixed="true"></xs:complexType>
+ </xs:element>
+ -->
+
+ <xs:element name="option">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded"></xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="options">
+ <xs:complexType>
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="option"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="disabled">
+ <xs:complexType mixed="true"></xs:complexType>
+ </xs:element>
+
+ <xs:element name="required">
+ <xs:complexType mixed="true"></xs:complexType>
+ </xs:element>
+
+ <xs:element name="value">
+ <xs:complexType mixed="true"></xs:complexType>
+ </xs:element>
+
+ <xs:element name="label">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="1"></xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="widget">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="meta" minOccurs="0"/>
+ <xs:element ref="label" minOccurs="0"/>
+ <xs:element ref="disabled" minOccurs="0"/>
+ <xs:element ref="value" minOccurs="0"/>
+ <xs:element ref="options" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="type" default="action">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="action"/>
+ <xs:enumeration value="characterinput"/>
+ <xs:enumeration value="characterinput_numeric"/>
+ <xs:enumeration value="characterinput_alphabetic"/>
+ <xs:enumeration value="optionchoice"/>
+ <xs:enumeration value="optionchoice_boolean"/>
+ <xs:enumeration value="optionchoice_single"/>
+ <xs:enumeration value="optionchoice_single_compact"/>
+ <xs:enumeration value="label"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="hasFocus" default="false">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="widgetgroup">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="meta" minOccurs="0"/>
+ <xs:element ref="label" minOccurs="0"/>
+ <xs:element ref="widget" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="widgetgroup" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="dialogwidget">
+ <xs:complexType mixed="true">
+ <xs:attribute name="id" type="xs:ID"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="dialogwidgets">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="dialogwidget" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="meta">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="dc:title"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="dialog">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="meta" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="dialogwidgets" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="widgetgroup" minOccurs="1" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="focus" default="main">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="main"/>
+ <xs:enumeration value="ctrl"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="giml">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="dialog" minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ <!--xs:attribute name="xmlns" type="xs:string" fixed="http://gitk.sourceforge.net/"/-->
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
+
diff --git a/test/schemas/ct-sc-nobase_0.xml b/test/schemas/ct-sc-nobase_0.xml
new file mode 100644
index 0000000..8678410
--- /dev/null
+++ b/test/schemas/ct-sc-nobase_0.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<foo xmlns="http://FOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO ct-sc-nobase_0.xsd"/> \ No newline at end of file
diff --git a/test/schemas/ct-sc-nobase_0.xsd b/test/schemas/ct-sc-nobase_0.xsd
new file mode 100644
index 0000000..a00e941
--- /dev/null
+++ b/test/schemas/ct-sc-nobase_0.xsd
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO">
+
+ <xsd:complexType name="base">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:restriction base="foo:base">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/element-err_0.xml b/test/schemas/element-err_0.xml
new file mode 100644
index 0000000..4f43fd9
--- /dev/null
+++ b/test/schemas/element-err_0.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<foo xmlns="http://FOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO element-err_0.xsd"/> \ No newline at end of file
diff --git a/test/schemas/element-err_0.xsd b/test/schemas/element-err_0.xsd
new file mode 100644
index 0000000..a5c696f
--- /dev/null
+++ b/test/schemas/element-err_0.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO"
+ xmlns:goo="http://GOO">
+
+ <xsd:element name="bar" type="xsd:string"/>
+ <xsd:element type="xsd:string"/>
+ <xsd:element name="foo"
+ ref="foo:bar" minOccurs="3" maxOccurs="2"
+ abstract="true" block="flute"
+ form="qualified" id="b12" nillable="true"
+ substitutionGroup="foo:bar"
+ default="Jimi" fixed="Hendrix" final="fantasy">
+
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="foo:bar" name="myomy" minOccurs="3"
+ maxOccurs="2" abstract="true" block="flute"
+ form="qualified" id="b12" nillable="true"
+ substitutionGroup="foo:bar" type="xsd:string"
+ default="Jimi" fixed="Hendrix" final="fantasy">
+ <xsd:complexType/>
+ <xsd:simpleType/>
+ </xsd:element>
+ <xsd:element name="myomy" maxOccurs="0"
+ abstract="true" block="flute"
+ form="qualified" id="b12" nillable="true"
+ substitutionGroup="foo:bar" type="xsd:string"
+ default="Jimi" fixed="Hendrix" final="fantasy">
+ <xsd:complexType/>
+ <xsd:simpleType/>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/schemas/element-minmax-err_0.xml b/test/schemas/element-minmax-err_0.xml
new file mode 100644
index 0000000..62c5ec1
--- /dev/null
+++ b/test/schemas/element-minmax-err_0.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="element-minmax-err_0.xsd">
+ <bar/>
+</foo> \ No newline at end of file
diff --git a/test/schemas/element-minmax-err_0.xsd b/test/schemas/element-minmax-err_0.xsd
new file mode 100644
index 0000000..3384e7c
--- /dev/null
+++ b/test/schemas/element-minmax-err_0.xsd
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="bar" minOccurs="1" maxOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/facet-unionST-err1_0.xml b/test/schemas/facet-unionST-err1_0.xml
index aa96e20..b47df61 100644
--- a/test/schemas/facet-unionST-err1_0.xml
+++ b/test/schemas/facet-unionST-err1_0.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<foo xmlns="http://FOO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://FOO facet-unionST-err1_0.xsd">large</foo>
+ xsi:schemaLocation="http://FOO facet-unionST-err1_0.xsd">tiny</foo>
diff --git a/test/schemas/facet-whiteSpace_0.xml b/test/schemas/facet-whiteSpace_0.xml
new file mode 100644
index 0000000..dba26ca
--- /dev/null
+++ b/test/schemas/facet-whiteSpace_0.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<foo xmlns="http://FOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO facet-whiteSpace_0.xsd">hmmm
+
+ f f ff f
+ </foo> \ No newline at end of file
diff --git a/test/schemas/facet-whiteSpace_0.xsd b/test/schemas/facet-whiteSpace_0.xsd
new file mode 100644
index 0000000..83ef142
--- /dev/null
+++ b/test/schemas/facet-whiteSpace_0.xsd
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO" xmlns="http://FOO">
+
+ <xsd:element name="foo">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="replace"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/hexbinary_1.xml b/test/schemas/hexbinary_1.xml
index b9d6923..0f34854 100644
--- a/test/schemas/hexbinary_1.xml
+++ b/test/schemas/hexbinary_1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!-- all should fail to validate -->
+<!-- all (except 2 first) should fail to validate -->
<xsd_hexBinary>
<hex></hex>
<hex/>
diff --git a/test/schemas/import-bad-1_0.imp b/test/schemas/import-bad-1_0.imp
new file mode 100755
index 0000000..d70c012
--- /dev/null
+++ b/test/schemas/import-bad-1_0.imp
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<xsd:lalala
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://BAR">
+</xsd:lalala> \ No newline at end of file
diff --git a/test/schemas/import1_0.imp b/test/schemas/import1_0.imp
new file mode 100644
index 0000000..b7fd2ec
--- /dev/null
+++ b/test/schemas/import1_0.imp
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://BAR">
+
+ <xsd:element name="bar.A"/>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/import1_0.xml b/test/schemas/import1_0.xml
new file mode 100644
index 0000000..7046521
--- /dev/null
+++ b/test/schemas/import1_0.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!-- This one tests the document access strategy for <import> -->
+<foo:foo
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO import1_0.xsd">
+ <foo:bar/>
+ <bar:bar.A/>
+ <bar:bar.B/>
+</foo:foo> \ No newline at end of file
diff --git a/test/schemas/import1_0.xsd b/test/schemas/import1_0.xsd
new file mode 100644
index 0000000..401d657
--- /dev/null
+++ b/test/schemas/import1_0.xsd
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!-- This one tests the document access strategy for <import> -->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ elementFormDefault="qualified">
+ <xsd:import namespace="http://BAR" />
+ <!-- This document is not a XML schema document. -->
+ <xsd:import namespace="http://BAR" schemaLocation="import-bad-1_0.imp" />
+ <!-- This document does not exist. -->
+ <xsd:import namespace="http://BAR" schemaLocation="import1_0bc.imp" />
+ <!-- This document is ok. -->
+ <xsd:import namespace="http://BAR" schemaLocation="import1_0.imp" />
+ <!-- This document will be skipped, since a schema for the namespace
+ "http://BAR" was already imported. -->
+ <xsd:import namespace="http://BAR" schemaLocation="import1_0b.imp" />
+
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="bar"/>
+ <xsd:element ref="bar:bar.A"/>
+ <xsd:element ref="bar:bar.B"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/import1_0b.imp b/test/schemas/import1_0b.imp
new file mode 100644
index 0000000..70bddd7
--- /dev/null
+++ b/test/schemas/import1_0b.imp
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://BAR">
+
+ <xsd:element name="bar.B"/>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/import2_0.imp b/test/schemas/import2_0.imp
new file mode 100644
index 0000000..298e6b1
--- /dev/null
+++ b/test/schemas/import2_0.imp
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ elementFormDefault="qualified">
+
+ <!-- We need to import the namespace for the schema to be valid. -->
+ <xsd:import namespace="http://BAR"/>
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="foo.B" type="bar:fooType"/>
+ <xsd:element ref="bar:bar"/>
+ </xsd:sequence>
+ <xsd:attribute name="foo.attr"/>
+
+ </xsd:complexType>
+ </xsd:element>
+
+
+
+</xsd:schema>
diff --git a/test/schemas/import2_0.xml b/test/schemas/import2_0.xml
new file mode 100644
index 0000000..67723d4
--- /dev/null
+++ b/test/schemas/import2_0.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo:foo xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://BAR import2_0.xsd" foo.attr="oo">
+ <foo:foo.B/>
+ <bar:bar/>
+</foo:foo>
diff --git a/test/schemas/import2_0.xsd b/test/schemas/import2_0.xsd
new file mode 100644
index 0000000..6922bec
--- /dev/null
+++ b/test/schemas/import2_0.xsd
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:foo="http://FOO"
+ targetNamespace="http://BAR"
+ elementFormDefault="qualified">
+
+ <xsd:import namespace="http://FOO" schemaLocation="import2_0.imp"/>
+
+ <xsd:simpleType name="fooType">
+ <xsd:restriction base="xsd:string">
+ <xsd:maxLength value="10"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="bar">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="foo:foo" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+
+</xsd:schema>
diff --git a/test/schemas/include1_0.inc b/test/schemas/include1_0.inc
new file mode 100644
index 0000000..1745abe
--- /dev/null
+++ b/test/schemas/include1_0.inc
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
+
+ <xsd:simpleType name="barType">
+ <xsd:restriction base="xsd:string">
+ <xsd:maxLength value="10" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:attribute name="bar" type="barType" fixed="o"/>
+
+ <xsd:element name="bar.B" type="xsd:anyURI" block="#all" nillable="true" final="restriction extension"/>
+
+ <xsd:element name="bar">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="bar.A" block="restriction" form="qualified" nillable="true" />
+ <xsd:element ref="bar.B"/>
+ </xsd:sequence>
+
+ <xsd:attribute ref="bar" xml:lang="DE">
+ <xsd:annotation/>
+ </xsd:attribute>
+ <xsd:attribute name="uri" type="xsd:token" />
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/include1_0.xml b/test/schemas/include1_0.xml
new file mode 100644
index 0000000..8ffee0e
--- /dev/null
+++ b/test/schemas/include1_0.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<foo:foo xmlns:foo="http://FOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO include1_0.xsd" foo:req="oo">
+ <foo:bar foo:bar="o" uri="asd"><foo:bar.A/><foo:bar.B>anyURI</foo:bar.B></foo:bar>
+ <boo/>
+
+</foo:foo> \ No newline at end of file
diff --git a/test/schemas/include1_0.xsd b/test/schemas/include1_0.xsd
new file mode 100644
index 0000000..5e6d837
--- /dev/null
+++ b/test/schemas/include1_0.xsd
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO" version="">
+ <xsd:include schemaLocation="include1_0.inc" />
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="foo:bar"/>
+ <xsd:element name="boo" type="xsd:string"/>
+ </xsd:sequence>
+ <xsd:attribute name="req" use="required" form="qualified"/>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/include2_0.inc b/test/schemas/include2_0.inc
new file mode 100644
index 0000000..3104cd5
--- /dev/null
+++ b/test/schemas/include2_0.inc
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified" attributeFormDefault="qualified"
+ blockDefault="extension" finalDefault="extension">
+
+ <xsd:element name="bar">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="bar.B" type="xsd:anyType"/>
+ </xsd:sequence>
+ <xsd:attribute name="bar"/>
+ </xsd:complexType>
+
+ </xsd:element>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/include2_0.xml b/test/schemas/include2_0.xml
new file mode 100644
index 0000000..b460b93
--- /dev/null
+++ b/test/schemas/include2_0.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<foo:foo
+ xmlns:foo="http://FOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO include2_0.xsd">
+ <foo:bar foo:bar="ooo">
+ <foo:bar.B foo:bar="ooo"/>
+ </foo:bar>
+</foo:foo> \ No newline at end of file
diff --git a/test/schemas/include2_0.xsd b/test/schemas/include2_0.xsd
new file mode 100644
index 0000000..5f63102
--- /dev/null
+++ b/test/schemas/include2_0.xsd
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO">
+ <xsd:include schemaLocation="include2_0.inc" />
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="foo:bar"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/include3_0.inc b/test/schemas/include3_0.inc
new file mode 100644
index 0000000..c0436e8
--- /dev/null
+++ b/test/schemas/include3_0.inc
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:element name="bar" />
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/include3_0.xml b/test/schemas/include3_0.xml
new file mode 100644
index 0000000..e880cc5
--- /dev/null
+++ b/test/schemas/include3_0.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<foo:foo
+ xmlns:foo="http://FOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO include3_0.xsd">
+ <foo:bar />
+</foo:foo> \ No newline at end of file
diff --git a/test/schemas/include3_0.xsd b/test/schemas/include3_0.xsd
new file mode 100644
index 0000000..5319486
--- /dev/null
+++ b/test/schemas/include3_0.xsd
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO">
+ <xsd:include schemaLocation="include3_0.inc" />
+
+ <xsd:element name="bar"/>
+ <xsd:element name="foo"/>
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/item_0.xsd b/test/schemas/item_0.xsd
index 3d95ef3..315e06e 100644
--- a/test/schemas/item_0.xsd
+++ b/test/schemas/item_0.xsd
@@ -7,7 +7,7 @@
<xsd:pattern value="\d{3}-[A-Z]{2}"/>
</xsd:restriction>
</xsd:simpleType>
- <xsd:element name="Item" minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="Item">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="productName" type="xsd:string"/>
diff --git a/test/schemas/item_1.xsd b/test/schemas/item_1.xsd
index cea1f01..3cf966e 100644
--- a/test/schemas/item_1.xsd
+++ b/test/schemas/item_1.xsd
@@ -7,7 +7,7 @@
<xsd:pattern value="\d{3}-[A-Z]{2}"/>
</xsd:restriction>
</xsd:simpleType>
- <xsd:element name="Item" minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="Item">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="productName" type="xsd:string"/>
diff --git a/test/schemas/restrict-CT-attr-ref_0.xml b/test/schemas/restrict-CT-attr-ref_0.xml
new file mode 100644
index 0000000..d021a83
--- /dev/null
+++ b/test/schemas/restrict-CT-attr-ref_0.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<foo:foo xmlns:foo="http://FOO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO restrict-CT-attr-ref_0.xsd" foo:id="b0836217462"/> \ No newline at end of file
diff --git a/test/schemas/restrict-CT-attr-ref_0.xsd b/test/schemas/restrict-CT-attr-ref_0.xsd
new file mode 100644
index 0000000..a98b82a
--- /dev/null
+++ b/test/schemas/restrict-CT-attr-ref_0.xsd
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ attributeFormDefault="qualified"
+ xmlns:foo="http://FOO"
+ targetNamespace="http://FOO">
+
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ <xsd:complexType name="typeIDAttr">
+ <xsd:attribute ref="foo:id"/>
+ </xsd:complexType>
+
+ <xsd:simpleType name="fooID">
+ <xsd:restriction base="xsd:ID">
+ <xsd:pattern value="b\d{10}"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:restriction base="foo:typeIDAttr">
+ <xsd:attribute name="id" type="foo:fooID"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/restriction-attr1_0.xml b/test/schemas/restriction-attr1_0.xml
new file mode 100644
index 0000000..33b8f19
--- /dev/null
+++ b/test/schemas/restriction-attr1_0.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<foo xmlns="http://FOO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO file:///l:/libxml2/test/schemas/restriction-attr1_0.xsd" barA="hh"/>
diff --git a/test/schemas/restriction-attr1_0.xsd b/test/schemas/restriction-attr1_0.xsd
new file mode 100644
index 0000000..31c288f
--- /dev/null
+++ b/test/schemas/restriction-attr1_0.xsd
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://FOO" targetNamespace="http://FOO">
+
+ <xs:element name="foo">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:restriction base="typeA">
+ <xs:attribute name="barA" type="xs:string" use="optional"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="typeA">
+ <xs:attribute name="barA" type="xs:string" use="required"/>
+ </xs:complexType>
+
+</xs:schema> \ No newline at end of file
diff --git a/test/schemas/seq-dubl-elem1_0.xml b/test/schemas/seq-dubl-elem1_0.xml
new file mode 100644
index 0000000..a93c8ee
--- /dev/null
+++ b/test/schemas/seq-dubl-elem1_0.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<foo:foo xmlns:foo="http://FOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO seq-dubl-elem1_0.xsd">
+ <foo:PGPKeyID>PEhlbGxvIHdvcmxkIT4=</foo:PGPKeyID>
+ <foo:PGPKeyPacket>PEhlbGxvIHdvcmxkIT4=</foo:PGPKeyPacket>
+</foo:foo> \ No newline at end of file
diff --git a/test/schemas/seq-dubl-elem1_0.xsd b/test/schemas/seq-dubl-elem1_0.xsd
new file mode 100644
index 0000000..fd05da7
--- /dev/null
+++ b/test/schemas/seq-dubl-elem1_0.xsd
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:foo="http://FOO"
+ targetNamespace="http://FOO" version="0.1"
+ elementFormDefault="qualified">
+
+ <complexType name="fooType">
+ <choice>
+ <sequence>
+ <element name="PGPKeyID" type="base64Binary"/>
+ <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
+ <any namespace="##other" processContents="lax" minOccurs="0"
+maxOccurs="unbounded"/>
+ </sequence>
+ <sequence>
+ <element name="PGPKeyPacket" type="base64Binary"/>
+ <any namespace="##other" processContents="lax" minOccurs="0"
+maxOccurs="unbounded"/>
+ </sequence>
+ </choice>
+ </complexType>
+
+ <element name="foo" type="foo:fooType"/>
+
+</schema> \ No newline at end of file
diff --git a/test/schemas/union_0_0.xml b/test/schemas/union_0_0.xml
index 79078f9..1a47763 100644
--- a/test/schemas/union_0_0.xml
+++ b/test/schemas/union_0_0.xml
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<foo xmlns="http://foo"
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo xmlns="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://foo union_0_0.xsd">
<em>EMP0090</em>
<em>EMP0099</em>
</foo>
diff --git a/test/schemas/union_0_0.xsd b/test/schemas/union_0_0.xsd
index a6dfad0..23e93d1 100644
--- a/test/schemas/union_0_0.xsd
+++ b/test/schemas/union_0_0.xsd
@@ -7,7 +7,10 @@
<xsd:element name="foo">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="em" type="emType" maxOccurs="unbounded"/>
+ <xsd:element name="em"
+ type="emType"
+ maxOccurs="unbounded"
+ form="qualified"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
diff --git a/test/schemas/xml.xsd b/test/schemas/xml.xsd
new file mode 100644
index 0000000..e49fff8
--- /dev/null
+++ b/test/schemas/xml.xsd
@@ -0,0 +1,117 @@
+<?xml version='1.0' encoding="ISO-8859-1"?>
+<!--!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" -->
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+
+ <xs:annotation>
+ <xs:documentation>
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+
+ This schema document describes the XML namespace, in a form
+ suitable for import by other schema documents.
+
+ Note that local names in this namespace are intended to be defined
+ only by the World Wide Web Consortium or its subgroups. The
+ following names are currently defined in this namespace and should
+ not be used with conflicting semantics by any Working Group,
+ specification, or document instance:
+
+ base (as an attribute name): denotes an attribute whose value
+ provides a URI to be used as the base for interpreting any
+ relative URIs in the scope of the element on which it
+ appears; its value is inherited. This name is reserved
+ by virtue of its definition in the XML Base specification.
+
+ lang (as an attribute name): denotes an attribute whose value
+ is a language code for the natural language of the content of
+ any element; its value is inherited. This name is reserved
+ by virtue of its definition in the XML specification.
+
+ space (as an attribute name): denotes an attribute whose
+ value is a keyword indicating what whitespace processing
+ discipline is intended for the content of the element; its
+ value is inherited. This name is reserved by virtue of its
+ definition in the XML specification.
+
+ Father (in any context at all): denotes Jon Bosak, the chair of
+ the original XML Working Group. This name is reserved by
+ the following decision of the W3C XML Plenary and
+ XML Coordination groups:
+
+ In appreciation for his vision, leadership and dedication
+ the W3C XML Plenary on this 10th day of February, 2000
+ reserves for Jon Bosak in perpetuity the XML name
+ xml:Father
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang or xml:space attributes
+ on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ &lt;schema . . .>
+ . . .
+ &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ &lt;type . . .>
+ . . .
+ &lt;attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes</xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2001/03/xml.xsd.
+ At the date of issue it can also be found at
+ http://www.w3.org/2001/xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself. In other words, if the XML Schema namespace changes, the version
+ of this document at
+ http://www.w3.org/2001/xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2001/03/xml.xsd will not change.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang" type="xs:language">
+ <xs:annotation>
+ <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values . . .</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="space" default="preserve">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ </xs:attributeGroup>
+
+</xs:schema>
diff --git a/test/schemas/xsd-list-itemType_0.xml b/test/schemas/xsd-list-itemType_0.xml
new file mode 100644
index 0000000..a20e408
--- /dev/null
+++ b/test/schemas/xsd-list-itemType_0.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- This is the test data for the check of the implementation of the "itemType" attribute of the xsd:list element. -->
+<foo xmlns="http://FOO">tea for two and two for tea</foo>
diff --git a/test/schemas/xsd-list-itemType_0.xsd b/test/schemas/xsd-list-itemType_0.xsd
new file mode 100644
index 0000000..b96dbb4
--- /dev/null
+++ b/test/schemas/xsd-list-itemType_0.xsd
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!-- This test checks the implementation of the "itemType" attribute of the xsd:list element. -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://FOO" xmlns:foo="http://FOO">
+
+ <element name="foo">
+ <simpleType>
+ <list itemType="string"/>
+ </simpleType>
+ </element>
+
+
+</schema> \ No newline at end of file
diff --git a/test/schemas/xsd-simpleType-varieties_0.xsd b/test/schemas/xsd-simpleType-varieties_0.xsd
index e4ed6ac..8a752e2 100644
--- a/test/schemas/xsd-simpleType-varieties_0.xsd
+++ b/test/schemas/xsd-simpleType-varieties_0.xsd
@@ -2,7 +2,9 @@
<!-- This test checks the implementation of the varieties of the xsd:simpleType element. -->
-<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://FOO" xmlns:foo="http://FOO">
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO" xmlns:foo="http://FOO"
+ elementFormDefault="qualified">
<element name="foo">
<complexType>
diff --git a/test/scripts/.memdump b/test/scripts/.memdump
index 65b5fcc..122e4aa 100644
--- a/test/scripts/.memdump
+++ b/test/scripts/.memdump
@@ -1,4 +1,4 @@
- 05:38:46 PM
+ 12:14:38 AM
- MEMORY ALLOCATED : 0, MAX was 15611
+ MEMORY ALLOCATED : 0, MAX was 21622
BLOCK NUMBER SIZE TYPE
diff --git a/test/scripts/set1.script b/test/scripts/set1.script
new file mode 100644
index 0000000..e9a3e69
--- /dev/null
+++ b/test/scripts/set1.script
@@ -0,0 +1,2 @@
+set <b/>
+save -
diff --git a/test/scripts/set1.xml b/test/scripts/set1.xml
new file mode 100644
index 0000000..dcd0694
--- /dev/null
+++ b/test/scripts/set1.xml
@@ -0,0 +1 @@
+<a>foo</a>
diff --git a/test/scripts/set2.script b/test/scripts/set2.script
new file mode 100644
index 0000000..0d60777
--- /dev/null
+++ b/test/scripts/set2.script
@@ -0,0 +1,3 @@
+cd a
+set <!-- test multiple children --> <b/> <c/>
+save -
diff --git a/test/scripts/set2.xml b/test/scripts/set2.xml
new file mode 100644
index 0000000..dcd0694
--- /dev/null
+++ b/test/scripts/set2.xml
@@ -0,0 +1 @@
+<a>foo</a>
diff --git a/test/scripts/set3.script b/test/scripts/set3.script
new file mode 100644
index 0000000..e99745a
--- /dev/null
+++ b/test/scripts/set3.script
@@ -0,0 +1,5 @@
+cd *
+xpath //*[namespace-uri()="bar"]
+set <b/>
+xpath //*[namespace-uri()="bar"]
+save -
diff --git a/test/scripts/set3.xml b/test/scripts/set3.xml
new file mode 100644
index 0000000..211b4e5
--- /dev/null
+++ b/test/scripts/set3.xml
@@ -0,0 +1 @@
+<a xmlns="bar">foo</a>
diff --git a/test/scripts/set4.script b/test/scripts/set4.script
new file mode 100644
index 0000000..39d64cb
--- /dev/null
+++ b/test/scripts/set4.script
@@ -0,0 +1,4 @@
+cd a/b
+set <a:c/>
+xpath //*[namespace-uri()="foo"]
+save -
diff --git a/test/scripts/set4.xml b/test/scripts/set4.xml
new file mode 100644
index 0000000..1ba4401
--- /dev/null
+++ b/test/scripts/set4.xml
@@ -0,0 +1 @@
+<a xmlns:a="bar"><b xmlns:a="foo"/></a>