summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-07-06 12:57:17 +0000
committerMike Hommey <mh@glandium.org>2004-07-06 12:57:17 +0000
commitc14c53a3645d81281058d4bb4cff24fa8d6faf33 (patch)
tree29bccc2e7499af078a3d1cdcfb517a1dee891be5 /test
parentd4e028c96af89ade493b440d4f2de6b684c03a06 (diff)
downloadlibxml2-c14c53a3645d81281058d4bb4cff24fa8d6faf33.tar.gz
Load /tmp/tmp.DIvcnD/libxml2-2.6.11 intoupstream/2.6.11
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'test')
-rw-r--r--test/ent961
-rw-r--r--test/errors/.memdump4
-rw-r--r--test/errors/charref1.xml1
-rw-r--r--test/schemas/anyAttr-derive-errors1_0.xml30
-rw-r--r--test/schemas/anyAttr-derive-errors1_0.xsd223
-rw-r--r--test/schemas/anyAttr-derive1_0.xml30
-rw-r--r--test/schemas/anyAttr-derive1_0.xsd227
-rw-r--r--test/schemas/anyAttr-derive2_0.xml9
-rw-r--r--test/schemas/anyAttr-derive2_0.xsd33
-rw-r--r--test/schemas/anyAttr-errors1_0.xml26
-rw-r--r--test/schemas/anyAttr-processContents-err1_0.xml11
-rw-r--r--test/schemas/anyAttr-processContents-err1_0.xsd26
-rw-r--r--test/schemas/anyAttr-processContents1_0.xml13
-rw-r--r--test/schemas/anyAttr-processContents1_0.xsd32
-rw-r--r--test/schemas/anyAttr.importA.1_0.xsd24
-rw-r--r--test/schemas/anyAttr.importB.1_0.xsd21
-rw-r--r--test/schemas/anyAttr1_0.xml31
-rw-r--r--test/schemas/anyAttr1_0.xsd144
-rw-r--r--test/schemas/bug141312_0.xml2
-rw-r--r--test/schemas/bug141312_0.xsd16
-rw-r--r--test/schemas/bug141333.xml9
-rw-r--r--test/schemas/bug141333.xsd25
-rw-r--r--test/schemas/bug143951.imp12
-rw-r--r--test/schemas/bug143951_0.xml9
-rw-r--r--test/schemas/bug143951_0.xsd17
-rw-r--r--test/schemas/cos-ct-extends-1-3_0.xml9
-rw-r--r--test/schemas/cos-ct-extends-1-3_0.xsd51
-rw-r--r--test/schemas/cos-st-restricts-1-2-err_0.xml3
-rw-r--r--test/schemas/cos-st-restricts-1-2-err_0.xsd30
-rw-r--r--test/schemas/date_0.xml1
-rw-r--r--test/schemas/derivation-ok-extension-err_0.xml9
-rw-r--r--test/schemas/derivation-ok-extension-err_0.xsd22
-rw-r--r--test/schemas/derivation-ok-extension_0.xml9
-rw-r--r--test/schemas/derivation-ok-extension_0.xsd22
-rw-r--r--test/schemas/derivation-ok-restriction-2-1-1_0.xml8
-rw-r--r--test/schemas/derivation-ok-restriction-2-1-1_0.xsd56
-rw-r--r--test/schemas/derivation-ok-restriction-4-1-err_0.xml8
-rw-r--r--test/schemas/derivation-ok-restriction-4-1-err_0.xsd69
-rw-r--r--test/schemas/derivation-restriction-anyAttr_0.xml12
-rw-r--r--test/schemas/derivation-restriction-anyAttr_0.xsd24
-rw-r--r--test/schemas/derivation-restriction-anyType.xml9
-rw-r--r--test/schemas/derivation-restriction-anyType.xsd22
-rw-r--r--test/schemas/facet-unionST-err1_0.xml4
-rw-r--r--test/schemas/facet-unionST-err1_0.xsd27
-rw-r--r--test/schemas/scc-no-xmlns_0.xml3
-rw-r--r--test/schemas/scc-no-xmlns_0.xsd11
-rw-r--r--test/schemas/scc-no-xsi_0.xml3
-rw-r--r--test/schemas/scc-no-xsi_0.xsd11
-rw-r--r--test/schemas/src-attribute1_0.xml2
-rw-r--r--test/schemas/src-attribute1_0.xsd13
-rw-r--r--test/schemas/src-attribute2_0.xml2
-rw-r--r--test/schemas/src-attribute2_0.xsd13
-rw-r--r--test/schemas/src-attribute3-1_0.xml2
-rw-r--r--test/schemas/src-attribute3-1_0.xsd15
-rw-r--r--test/schemas/src-attribute3-2-form_0.xml2
-rw-r--r--test/schemas/src-attribute3-2-form_0.xsd16
-rw-r--r--test/schemas/src-attribute3-2-st_0.xml2
-rw-r--r--test/schemas/src-attribute3-2-st_0.xsd22
-rw-r--r--test/schemas/src-attribute3-2-type_0.xml2
-rw-r--r--test/schemas/src-attribute3-2-type_0.xsd16
-rw-r--r--test/schemas/src-attribute4_0.xml2
-rw-r--r--test/schemas/src-attribute4_0.xsd17
-rw-r--r--test/schemas/src-element1_0.xml2
-rw-r--r--test/schemas/src-element1_0.xsd9
-rw-r--r--test/schemas/src-element2-1_0.xml2
-rw-r--r--test/schemas/src-element2-1_0.xsd17
-rw-r--r--test/schemas/src-element2-2_0.xml2
-rw-r--r--test/schemas/src-element2-2_0.xsd48
-rw-r--r--test/schemas/src-element3_0.xml2
-rw-r--r--test/schemas/src-element3_0.xsd29
-rw-r--r--test/schemas/xsd-simpleType-varieties_0.xml8
-rw-r--r--test/schemas/xsd-simpleType-varieties_0.xsd43
-rw-r--r--test/valid/t10.xml12
73 files changed, 1759 insertions, 0 deletions
diff --git a/test/ent9 b/test/ent9
new file mode 100644
index 0000000..5db63ba
--- /dev/null
+++ b/test/ent9
@@ -0,0 +1,61 @@
+<!DOCTYPE doc [
+<!ENTITY test1 "<a/>,<b/>,<c/>,<d/>">
+]>
+<doc>
+ <ent>&test1;</ent>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <p> WE need lot of garbage now to trigger the problem</p>
+ <ent>&test1;</ent>
+</doc>
+
diff --git a/test/errors/.memdump b/test/errors/.memdump
new file mode 100644
index 0000000..d197ae2
--- /dev/null
+++ b/test/errors/.memdump
@@ -0,0 +1,4 @@
+ 01:09:53 PM
+
+ MEMORY ALLOCATED : 0, MAX was 12998
+BLOCK NUMBER SIZE TYPE
diff --git a/test/errors/charref1.xml b/test/errors/charref1.xml
new file mode 100644
index 0000000..11423df
--- /dev/null
+++ b/test/errors/charref1.xml
@@ -0,0 +1 @@
+<bla>&#010100000000000000000000000000000000000000000000000060;</bla>
diff --git a/test/schemas/anyAttr-derive-errors1_0.xml b/test/schemas/anyAttr-derive-errors1_0.xml
new file mode 100644
index 0000000..98e948c
--- /dev/null
+++ b/test/schemas/anyAttr-derive-errors1_0.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo
+ xmlns="http://FOO"
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:doo="http://DOO"
+ xmlns:import="http://IMPORT"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO anyAttr-derive-errors1_0.xsd">
+
+ <derive.1_1 barA="o" bar:barB="o" foo:barC="o"/>
+ <derive.1_4 barA="o" bar:barB="o" foo:barC="o"/>
+ <derive.2_1 barA="o" bar:barB="o" foo:barC="o" doo:barD="o" />
+ <derive.3_1 barA="o" foo:barC="o" doo:barD="o" />
+ <derive.4_1 bar:barB="o" foo:barC="o" doo:barD="o"/>
+
+ <derive.5_1_a barA="o" bar:barB="o" foo:barC="o" doo:barD="o" />
+ <derive.5_1_b barA="o" bar:barB="o" foo:barC="o" doo:barD="o" />
+
+ <derive.5_2_a bar:barB="o" foo:barC="o" doo:barD="o" />
+ <derive.5_2_b bar:barB="o" foo:barC="o" doo:barD="o" />
+
+ <derive.5_4_a bar:barB="o" doo:barD="o" />
+ <derive.5_4_b bar:barB="o" doo:barD="o" />
+
+ <derive.6_1 barA="o" bar:barB="o" foo:barC="o" doo:barD="o"/>
+ <derive.6_2 bar:barB="o" foo:barC="o" doo:barD="o"/>
+</foo>
+
+
diff --git a/test/schemas/anyAttr-derive-errors1_0.xsd b/test/schemas/anyAttr-derive-errors1_0.xsd
new file mode 100644
index 0000000..1ab9bab
--- /dev/null
+++ b/test/schemas/anyAttr-derive-errors1_0.xsd
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsd:schema xmlns:foo="http://FOO" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import="http://IMPORT"
+ targetNamespace="http://FOO" elementFormDefault="qualified">
+ <xsd:import namespace="http://IMPORT" schemaLocation="anyAttr.importA.1_0.xsd"/>
+ <xsd:import schemaLocation="anyAttr.importB.1_0.xsd"/>
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- Attribute Wildcard Union -->
+ <xsd:element name="derive.1_1" type="foo:type.1_1"/>
+ <xsd:element name="derive.1_4" type="foo:type.1_4"/>
+ <xsd:element name="derive.2_1" type="foo:type.2_1"/>
+ <xsd:element name="derive.3_1" type="foo:type.3_1"/>
+ <xsd:element name="derive.4_1" type="foo:type.4_1"/>
+ <xsd:element name="derive.5_1_a" type="foo:type.5_1_a"/>
+ <xsd:element name="derive.5_1_b" type="foo:type.5_1_b"/>
+ <xsd:element name="derive.5_2_a" type="foo:type.5_2_a"/>
+ <xsd:element name="derive.5_2_b" type="foo:type.5_2_b"/>
+ <xsd:element name="derive.5_4_a" type="foo:type.5_4_a"/>
+ <xsd:element name="derive.5_4_b" type="foo:type.5_4_b"/>
+ <xsd:element name="derive.6_1" type="foo:type.6_1"/>
+ <xsd:element name="derive.6_2" type="foo:type.6_2"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Attribute Wildcard Union -->
+
+ <!-- 1. If O1 and O2 are the same value, then that value must be the value. -->
+ <xsd:complexType name="type.1_1">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.1_1">
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.1_1">
+ <xsd:attributeGroup ref="foo:attrGr.1_1"/>
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.1_1">
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:attributeGroup>
+
+ <xsd:complexType name="type.1_4">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.1_4">
+ <xsd:anyAttribute namespace="http://BAR ##local http://FOO" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.1_4">
+ <xsd:attributeGroup ref="foo:attrGr.1_4"/>
+ <xsd:anyAttribute namespace="##local http://BAR ##targetNamespace " processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.1_4">
+ <xsd:anyAttribute namespace=" http://FOO http://BAR ##local"/>
+ </xsd:attributeGroup>
+
+ <!-- 2. If either O1 or O2 is any, then any must be the value. -->
+ <xsd:complexType name="type.2_1">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.2_1">
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.2_1">
+ <xsd:attributeGroup ref="foo:attrGr.2_1"/>
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.2_1">
+ <xsd:anyAttribute namespace="##local ##targetNamespace"/>
+ </xsd:attributeGroup>
+
+ <!-- 3. If both O1 and O2 are sets of (namespace names or ·absent·),
+ then the union of those sets must be the value. -->
+ <xsd:complexType name="type.3_1">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.3_1">
+ <xsd:anyAttribute namespace="##targetNamespace http://DOO" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.3_1">
+ <xsd:attributeGroup ref="foo:attrGr.3_1"/>
+ <xsd:anyAttribute namespace="##local" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.3_1">
+ <xsd:anyAttribute namespace="##local ##targetNamespace http://BAR"/>
+ </xsd:attributeGroup>
+ <!-- 4 If the two are negations of different values (namespace
+ names or ·absent·), then a pair of not and ·absent· must be the value. -->
+ <xsd:complexType name="type.4_1">
+ <xsd:complexContent>
+ <xsd:extension base="imp.type.base.derive.4_1">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!-- 5 If either O1 or O2 is a pair of not and a namespace name and
+ the other is a set of (namespace names or ·absent·) (call this set S),
+ then The appropriate case among the following must be true: -->
+ <!-- 5.1 If the set S includes both the negated namespace name and
+ ·absent·, then any must be the value. -->
+ <xsd:complexType name="type.5_1_a">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_1_a">
+ <xsd:anyAttribute namespace="##local ##targetNamespace" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_1_a">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="type.5_1_b">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_1_b">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_1_b">
+ <xsd:anyAttribute namespace="##local ##targetNamespace" processContents="lax"/>
+ </xsd:complexType>
+
+ <!-- 5.2 If the set S includes the negated namespace name but not ·absent·,
+ then a pair of not and ·absent· must be the value. -->
+ <xsd:complexType name="type.5_2_a">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_2_a">
+ <xsd:anyAttribute namespace="##targetNamespace http://BAR" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_2_a">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="type.5_2_b">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_2_b">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_2_b">
+ <xsd:anyAttribute namespace="##targetNamespace http://BAR" processContents="lax"/>
+ </xsd:complexType>
+ <!-- 5.3 If the set S includes ·absent· but not the negated namespace name,
+ then the union is not expressible. -->
+ <!--
+ <xsd:complexType name="type.5_3_a">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_3_a">
+ <xsd:anyAttribute namespace="##local http://BAR" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_3_a">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="type.5_3_b">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_3_b">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_3_b">
+ <xsd:anyAttribute namespace="##local http://BAR" processContents="lax"/>
+ </xsd:complexType>
+ -->
+ <!-- 5.4 If the set S does not include either the negated namespace name
+ or ·absent·, then whichever of O1 or O2 is a pair of not and a namespace
+ name must be the value. -->
+ <xsd:complexType name="type.5_4_a">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_4_a">
+ <xsd:anyAttribute namespace="http://BAR" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_4_a">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="type.5_4_b">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_4_b">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_4_b">
+ <xsd:anyAttribute namespace="http://BAR" processContents="lax"/>
+ </xsd:complexType>
+ <!-- 6 If either O1 or O2 is a pair of not and ·absent· and the other is a
+ set of (namespace names or ·absent·) (again, call this set S), then The
+ appropriate case among the following must be true: -->
+ <!-- 6.1 If the set S includes ·absent·, then any must be the value. -->
+ <xsd:complexType name="type.6_1">
+ <xsd:complexContent>
+ <xsd:extension base="imp.type.base.derive.6">
+ <xsd:anyAttribute namespace="##local http://BAR" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!-- 6.2 If the set S does not include ·absent·, then a pair of not and ·absent·
+ must be the value. -->
+ <xsd:complexType name="type.6_2">
+ <xsd:complexContent>
+ <xsd:extension base="imp.type.base.derive.6">
+ <xsd:anyAttribute namespace="http://BAR http://DOO" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+</xsd:schema>
+
+
diff --git a/test/schemas/anyAttr-derive1_0.xml b/test/schemas/anyAttr-derive1_0.xml
new file mode 100644
index 0000000..de89f45
--- /dev/null
+++ b/test/schemas/anyAttr-derive1_0.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo
+ xmlns="http://FOO"
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:doo="http://DOO"
+ xmlns:import="http://IMPORT"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO anyAttr-derive1_0.xsd">
+
+ <derive.1_1 barA="o" bar:barB="o" foo:barC="o"/>
+ <derive.1_4 barA="o" bar:barB="o" foo:barC="o"/>
+ <derive.2_1 barA="o" bar:barB="o" foo:barC="o" doo:barD="o" />
+ <derive.3_1 barA="o" foo:barC="o" doo:barD="o" />
+ <derive.4_1 bar:barB="o" foo:barC="o" doo:barD="o"/>
+
+ <derive.5_1_a barA="o" bar:barB="o" foo:barC="o" doo:barD="o" />
+ <derive.5_1_b barA="o" bar:barB="o" foo:barC="o" doo:barD="o" />
+
+ <derive.5_2_a bar:barB="o" foo:barC="o" doo:barD="o" />
+ <derive.5_2_b bar:barB="o" foo:barC="o" doo:barD="o" />
+
+ <derive.5_4_a bar:barB="o" doo:barD="o" />
+ <derive.5_4_b bar:barB="o" doo:barD="o" />
+
+ <derive.6_1 barA="o" bar:barB="o" foo:barC="o" doo:barD="o"/>
+ <derive.6_2 bar:barB="o" foo:barC="o" doo:barD="o"/>
+</foo>
+
+
diff --git a/test/schemas/anyAttr-derive1_0.xsd b/test/schemas/anyAttr-derive1_0.xsd
new file mode 100644
index 0000000..bc14d99
--- /dev/null
+++ b/test/schemas/anyAttr-derive1_0.xsd
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsd:schema xmlns:foo="http://FOO" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import="http://IMPORT"
+ targetNamespace="http://FOO" elementFormDefault="qualified">
+ <xsd:import namespace="http://IMPORT" schemaLocation="anyAttr.importA.1_0.xsd"/>
+ <xsd:import schemaLocation="anyAttr.importB.1_0.xsd"/>
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- Attribute Wildcard Union -->
+ <xsd:element name="derive.1_1" type="foo:type.1_1"/>
+ <xsd:element name="derive.1_4" type="foo:type.1_4"/>
+
+ <xsd:element name="derive.2_1" type="foo:type.2_1"/>
+
+ <xsd:element name="derive.3_1" type="foo:type.3_1"/>
+
+ <xsd:element name="derive.4_1" type="foo:type.4_1"/>
+
+ <xsd:element name="derive.5_1_a" type="foo:type.5_1_a"/>
+ <xsd:element name="derive.5_1_b" type="foo:type.5_1_b"/>
+ <xsd:element name="derive.5_2_a" type="foo:type.5_2_a"/>
+ <xsd:element name="derive.5_2_b" type="foo:type.5_2_b"/>
+ <xsd:element name="derive.5_4_a" type="foo:type.5_4_a"/>
+ <xsd:element name="derive.5_4_b" type="foo:type.5_4_b"/>
+ <xsd:element name="derive.6_1" type="foo:type.6_1"/>
+ <xsd:element name="derive.6_2" type="foo:type.6_2"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Attribute Wildcard Union -->
+
+ <!-- 1. If O1 and O2 are the same value, then that value must be the value. -->
+ <xsd:complexType name="type.1_1">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.1_1">
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.1_1">
+ <xsd:attributeGroup ref="foo:attrGr.1_1"/>
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.1_1">
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:attributeGroup>
+
+ <xsd:complexType name="type.1_4">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.1_4">
+ <xsd:anyAttribute namespace="http://BAR ##local http://FOO" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.1_4">
+ <xsd:attributeGroup ref="foo:attrGr.1_4"/>
+ <xsd:anyAttribute namespace="##local http://BAR ##targetNamespace " processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.1_4">
+ <xsd:anyAttribute namespace=" http://FOO http://BAR ##local"/>
+ </xsd:attributeGroup>
+
+ <!-- 2. If either O1 or O2 is any, then any must be the value. -->
+ <xsd:complexType name="type.2_1">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.2_1">
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.2_1">
+ <xsd:attributeGroup ref="foo:attrGr.2_1"/>
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.2_1">
+ <xsd:anyAttribute namespace="##local ##targetNamespace"/>
+ </xsd:attributeGroup>
+
+ <!-- 3. If both O1 and O2 are sets of (namespace names or ·absent·),
+ then the union of those sets must be the value. -->
+ <xsd:complexType name="type.3_1">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.3_1">
+ <xsd:anyAttribute namespace="##targetNamespace http://DOO" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.3_1">
+ <xsd:attributeGroup ref="foo:attrGr.3_1"/>
+ <xsd:anyAttribute namespace="##local" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.3_1">
+ <xsd:anyAttribute namespace="##local ##targetNamespace http://BAR"/>
+ </xsd:attributeGroup>
+ <!-- 4 If the two are negations of different values (namespace
+ names or ·absent·), then a pair of not and ·absent· must be the value. -->
+ <xsd:complexType name="type.4_1">
+ <xsd:complexContent>
+ <xsd:extension base="imp.type.base.derive.4_1">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!-- 5 If either O1 or O2 is a pair of not and a namespace name and
+ the other is a set of (namespace names or ·absent·) (call this set S),
+ then The appropriate case among the following must be true: -->
+ <!-- 5.1 If the set S includes both the negated namespace name and
+ ·absent·, then any must be the value. -->
+ <xsd:complexType name="type.5_1_a">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_1_a">
+ <xsd:anyAttribute namespace="##local ##targetNamespace" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_1_a">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="type.5_1_b">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_1_b">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_1_b">
+ <xsd:anyAttribute namespace="##local ##targetNamespace" processContents="lax"/>
+ </xsd:complexType>
+
+ <!-- 5.2 If the set S includes the negated namespace name but not ·absent·,
+ then a pair of not and ·absent· must be the value. -->
+ <xsd:complexType name="type.5_2_a">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_2_a">
+ <xsd:anyAttribute namespace="##targetNamespace http://BAR" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_2_a">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="type.5_2_b">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_2_b">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_2_b">
+ <xsd:anyAttribute namespace="##targetNamespace http://BAR" processContents="lax"/>
+ </xsd:complexType>
+ <!-- 5.3 If the set S includes ·absent· but not the negated namespace name,
+ then the union is not expressible. -->
+ <!--
+ <xsd:complexType name="type.5_3_a">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_3_a">
+ <xsd:anyAttribute namespace="##local http://BAR" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_3_a">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="type.5_3_b">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_3_b">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_3_b">
+ <xsd:anyAttribute namespace="##local http://BAR" processContents="lax"/>
+ </xsd:complexType>
+ -->
+ <!-- 5.4 If the set S does not include either the negated namespace name
+ or ·absent·, then whichever of O1 or O2 is a pair of not and a namespace
+ name must be the value. -->
+ <xsd:complexType name="type.5_4_a">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_4_a">
+ <xsd:anyAttribute namespace="http://BAR" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_4_a">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="type.5_4_b">
+ <xsd:complexContent>
+ <xsd:extension base="foo:type.base.5_4_b">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="type.base.5_4_b">
+ <xsd:anyAttribute namespace="http://BAR" processContents="lax"/>
+ </xsd:complexType>
+ <!-- 6 If either O1 or O2 is a pair of not and ·absent· and the other is a
+ set of (namespace names or ·absent·) (again, call this set S), then The
+ appropriate case among the following must be true: -->
+ <!-- 6.1 If the set S includes ·absent·, then any must be the value. -->
+ <xsd:complexType name="type.6_1">
+ <xsd:complexContent>
+ <xsd:extension base="imp.type.base.derive.6">
+ <xsd:anyAttribute namespace="##local http://BAR" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!-- 6.2 If the set S does not include ·absent·, then a pair of not and ·absent·
+ must be the value. -->
+ <xsd:complexType name="type.6_2">
+ <xsd:complexContent>
+ <xsd:extension base="imp.type.base.derive.6">
+ <xsd:anyAttribute namespace="http://BAR http://DOO" processContents="lax"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+</xsd:schema>
+
+
diff --git a/test/schemas/anyAttr-derive2_0.xml b/test/schemas/anyAttr-derive2_0.xml
new file mode 100644
index 0000000..c90cb88
--- /dev/null
+++ b/test/schemas/anyAttr-derive2_0.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+-->
+<foo xmlns="http://FOO" xmlns:foo="http://FOO" xmlns:bar="http://BAR" xmlns:boo="http://BOO" xmlns:doo="http://DOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO attrGroup-wildcard1_0.xsd"
+ foo:bar="o" doo:bar="o"/>
+
+
diff --git a/test/schemas/anyAttr-derive2_0.xsd b/test/schemas/anyAttr-derive2_0.xsd
new file mode 100644
index 0000000..3a74d68
--- /dev/null
+++ b/test/schemas/anyAttr-derive2_0.xsd
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO" elementFormDefault="qualified" attributeFormDefault="qualified">
+
+ <element name="foo">
+ <complexType>
+ <complexContent>
+ <extension base="foo:type.A">
+ <anyAttribute namespace="http://DOO" processContents="skip"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <complexType name="type.A">
+ <attributeGroup ref="foo:attrGr.A_1"/>
+ <attributeGroup ref="foo:attrGr.A_2"/>
+ <anyAttribute namespace="http://FOO" processContents="skip"/>
+ </complexType>
+
+ <attributeGroup name="attrGr.A_1">
+ <anyAttribute namespace="http://FOO http://BOO" processContents="skip"/>
+ </attributeGroup>
+
+ <attributeGroup name="attrGr.A_2">
+ <anyAttribute namespace="http://BAR http://DOO http://FOO" processContents="skip"/>
+ </attributeGroup>
+
+
+</schema>
diff --git a/test/schemas/anyAttr-errors1_0.xml b/test/schemas/anyAttr-errors1_0.xml
new file mode 100644
index 0000000..769a5bb
--- /dev/null
+++ b/test/schemas/anyAttr-errors1_0.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo
+ xmlns="http://FOO"
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:import="http://IMPORT"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO file:///c:/dev/libxml2/patches/2004-05-17/anyAttr-errors1_0.xsd">
+
+ <!-- not allowed: foo:barC -->
+ <basic.B foo:barC="o"/>
+ <!-- not allowed: foo:barC -->
+ <basic.C foo:barC="o"/>
+ <!-- not allowed: barA, bar:barB -->
+ <basic.D barA="o" bar:barB="o"/>
+ <!-- not allowed: bar:barB -->
+ <inters.2_1 barA="o" bar:barB="o" foo:barC="o"/>
+ <!-- not allowed: barA, foo:barC -->
+ <inters.3_1 barA="o" bar:barB="o" foo:barC="o"/>
+ <!-- not allowed: bar:barB -->
+ <inters.4_1 barA="o" bar:barB="o" foo:barC="o"/>
+ <!-- not allowed: barA, foo:barC -->
+ <inters.6_1 barA="o" bar:barB="o" foo:barC="o"/>
+</foo>
+
+
diff --git a/test/schemas/anyAttr-processContents-err1_0.xml b/test/schemas/anyAttr-processContents-err1_0.xml
new file mode 100644
index 0000000..a0122f4
--- /dev/null
+++ b/test/schemas/anyAttr-processContents-err1_0.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo
+ xmlns="http://FOO"
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO anyAttr-processContents1_0.xsd">
+ <elem.lax foo:bar="o o"/>
+ <elem.strict foo:barB="GB"/>
+</foo>
+
diff --git a/test/schemas/anyAttr-processContents-err1_0.xsd b/test/schemas/anyAttr-processContents-err1_0.xsd
new file mode 100644
index 0000000..cc2a0fd
--- /dev/null
+++ b/test/schemas/anyAttr-processContents-err1_0.xsd
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsd:schema xmlns:foo="http://FOO"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ targetNamespace="http://FOO">
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="elem.lax" type="foo:type.lax"/>
+ <xsd:element name="elem.strict" type="foo:type.strict"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:attribute name="bar" type="xsd:language" />
+
+ <xsd:complexType name="type.lax">
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:complexType name="type.strict">
+ <xsd:anyAttribute namespace="##any" processContents="strict"/>
+ </xsd:complexType>
+
+</xsd:schema>
+
diff --git a/test/schemas/anyAttr-processContents1_0.xml b/test/schemas/anyAttr-processContents1_0.xml
new file mode 100644
index 0000000..f821089
--- /dev/null
+++ b/test/schemas/anyAttr-processContents1_0.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo
+ xmlns="http://FOO"
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO anyAttr-processContents1_0.xsd">
+ <elem.lax.A foo:barA_1="PL"/>
+ <elem.lax.B foo:barA_2="o"/>
+ <elem.strict foo:barB="FR"/>
+ <elem.skip foo:barC="o"/>
+</foo>
+
diff --git a/test/schemas/anyAttr-processContents1_0.xsd b/test/schemas/anyAttr-processContents1_0.xsd
new file mode 100644
index 0000000..a468702
--- /dev/null
+++ b/test/schemas/anyAttr-processContents1_0.xsd
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsd:schema xmlns:foo="http://FOO"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ targetNamespace="http://FOO">
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="elem.lax.A" type="foo:type.lax"/>
+ <xsd:element name="elem.lax.B" type="foo:type.lax"/>
+ <xsd:element name="elem.strict" type="foo:type.strict"/>
+ <xsd:element name="elem.skip" type="foo:type.skip"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:attribute name="barA" type="xsd:language" />
+ <xsd:attribute name="barB" type="xsd:language" />
+
+ <xsd:complexType name="type.lax">
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:complexType name="type.strict">
+ <xsd:anyAttribute namespace="##any"/>
+ </xsd:complexType>
+ <xsd:complexType name="type.skip">
+ <xsd:anyAttribute namespace="##any" processContents="skip"/>
+ </xsd:complexType>
+
+</xsd:schema>
+
diff --git a/test/schemas/anyAttr.importA.1_0.xsd b/test/schemas/anyAttr.importA.1_0.xsd
new file mode 100644
index 0000000..92e0bbe
--- /dev/null
+++ b/test/schemas/anyAttr.importA.1_0.xsd
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://IMPORT"
+ xmlns:imp="http://IMPORT" xmlns:boo="http://BOO">
+
+ <xsd:attributeGroup name="attrGr.inters.5_1">
+ <xsd:anyAttribute namespace="##other"/>
+ </xsd:attributeGroup>
+
+ <xsd:element name="imp.element"/>
+
+ <xsd:attribute name="imp.attribute" type="xsd:string"/>
+
+ <xsd:group name="imp.group">
+ <xsd:sequence>
+ <xsd:element ref="imp:imp.element"/>
+ </xsd:sequence>
+ </xsd:group>
+
+ <xsd:complexType name="imp.complexType">
+ <xsd:attribute ref="imp:imp.attribute"/>
+ </xsd:complexType>
+
+</xsd:schema>
+
diff --git a/test/schemas/anyAttr.importB.1_0.xsd b/test/schemas/anyAttr.importB.1_0.xsd
new file mode 100644
index 0000000..33eaba8
--- /dev/null
+++ b/test/schemas/anyAttr.importB.1_0.xsd
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:attributeGroup name="attrGr.inters.6_1">
+ <xsd:anyAttribute namespace="##other"/>
+ </xsd:attributeGroup>
+
+ <xsd:complexType name="imp.type.base.inters.4_1">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="imp.type.base.derive.4_1">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="imp.type.base.derive.6">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+</xsd:schema>
+
diff --git a/test/schemas/anyAttr1_0.xml b/test/schemas/anyAttr1_0.xml
new file mode 100644
index 0000000..50b5b16
--- /dev/null
+++ b/test/schemas/anyAttr1_0.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo
+ xmlns="http://FOO"
+ xmlns:foo="http://FOO"
+ xmlns:bar="http://BAR"
+ xmlns:boo="http://BOO"
+ xmlns:import="http://IMPORT"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO anyAttr1_0.xsd">
+ <import:imp.element/>
+ <imp.attribute import:imp.attribute="p"/>
+ <imp.group>
+ <import:imp.element/>
+ </imp.group>
+ <basic.A bar:barA="o"/>
+ <basic.B bar:barB="o"/>
+ <basic.C barC="o"/>
+ <basic.D foo:barD="o"/>
+ <basic.E barA="o" bar:barB="o" foo:barC="o"/>
+ <inters.1_1 barA="o" bar:barB="o" foo:barC="o"/>
+ <inters.1_2 bar:barB="o"/>
+ <inters.1_3 barA="o" foo:barC="o"/>
+ <inters.1_4 barA="o" bar:barB="o" foo:barC="o"/>
+ <inters.2_1 barA="o" foo:barC="o"/>
+ <inters.3_1 bar:barB="o"/>
+ <inters.4_1 barA="o" foo:barC="o"/>
+ <!--inters.5_1 barA="o" bar:barB="o" foo:barC="o"/-->
+ <inters.6_1 bar:barB="o"/>
+</foo>
+
+
diff --git a/test/schemas/anyAttr1_0.xsd b/test/schemas/anyAttr1_0.xsd
new file mode 100644
index 0000000..1fcf898
--- /dev/null
+++ b/test/schemas/anyAttr1_0.xsd
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsd:schema xmlns:foo="http://FOO" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import="http://IMPORT"
+ targetNamespace="http://FOO" elementFormDefault="qualified">
+ <xsd:import namespace="http://IMPORT" schemaLocation="anyAttr.importA.1_0.xsd"/>
+ <xsd:import schemaLocation="anyAttr.importB.1_0.xsd"/>
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- Import -->
+ <xsd:element ref="import:imp.element"/>
+ <xsd:element name="imp.attribute">
+ <xsd:complexType>
+ <xsd:attribute ref="import:imp.attribute"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="imp.group">
+ <xsd:complexType>
+ <xsd:group ref="import:imp.group"/>
+ </xsd:complexType>
+ </xsd:element>
+ <!-- Basic -->
+ <xsd:element name="basic.A" type="foo:type.basic.A"/>
+ <xsd:element name="basic.B" type="foo:type.basic.B"/>
+ <xsd:element name="basic.C" type="foo:type.basic.C"/>
+ <xsd:element name="basic.D" type="foo:type.basic.D"/>
+ <xsd:element name="basic.E" type="foo:type.basic.E"/>
+ <!-- Attribute Wildcard Intersection -->
+ <xsd:element name="inters.1_1" type="foo:type.inters.1_1"/>
+ <xsd:element name="inters.1_2" type="foo:type.inters.1_2"/>
+ <xsd:element name="inters.1_3" type="foo:type.inters.1_3"/>
+ <xsd:element name="inters.1_4" type="foo:type.inters.1_4"/>
+
+ <xsd:element name="inters.2_1" type="foo:type.inters.2_1"/>
+
+ <xsd:element name="inters.3_1" type="foo:type.inters.3_1"/>
+
+ <xsd:element name="inters.4_1" type="foo:type.inters.4_1"/>
+
+ <!--xsd:element name="inters.5_1" type="type.inters.5_1"/-->
+ <xsd:element name="inters.6_1" type="foo:type.inters.6_1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Basic -->
+ <xsd:complexType name="type.basic.A">
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:complexType name="type.basic.B">
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:complexType name="type.basic.C">
+ <xsd:anyAttribute namespace="##local" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:complexType name="type.basic.D">
+ <xsd:anyAttribute namespace="##targetNamespace" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:complexType name="type.basic.E">
+ <xsd:anyAttribute namespace="##targetNamespace ##local http://BAR" processContents="lax"/>
+ </xsd:complexType>
+ <!-- Attribute Wildcard Intersection -->
+
+ <!-- 1. If O1 and O2 are the same value, then that value must be the value. -->
+ <xsd:complexType name="type.inters.1_1">
+ <xsd:attributeGroup ref="foo:attrGr.inters.1_1"/>
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.inters.1_1">
+ <xsd:anyAttribute namespace="##any"/>
+ </xsd:attributeGroup>
+ <xsd:complexType name="type.inters.1_2">
+ <xsd:attributeGroup ref="foo:attrGr.inters.1_2"/>
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.inters.1_2">
+ <xsd:anyAttribute namespace="##other"/>
+ </xsd:attributeGroup>
+ <xsd:complexType name="type.inters.1_3">
+ <xsd:attributeGroup ref="foo:attrGr.inters.1_3"/>
+ <xsd:anyAttribute namespace="##local ##targetNamespace" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.inters.1_3">
+ <xsd:anyAttribute namespace="##local ##targetNamespace"/>
+ </xsd:attributeGroup>
+ <xsd:complexType name="type.inters.1_4">
+ <xsd:attributeGroup ref="foo:attrGr.inters.1_4"/>
+ <xsd:anyAttribute namespace="##local http://BAR ##targetNamespace " processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.inters.1_4">
+ <xsd:anyAttribute namespace=" ##targetNamespace http://BAR ##local"/>
+ </xsd:attributeGroup>
+
+ <!-- 2. If either O1 or O2 is any, then the other must be the value. -->
+ <xsd:complexType name="type.inters.2_1">
+ <xsd:attributeGroup ref="foo:attrGr.inters.2_1"/>
+ <xsd:anyAttribute namespace="##any" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.inters.2_1">
+ <xsd:anyAttribute namespace="##local ##targetNamespace"/>
+ </xsd:attributeGroup>
+ <!-- 3. If either O1 or O2 is a pair of not and a value (a namespace name or ·absent·)
+ and the other is a set of (namespace names or ·absent·), then that set, minus the
+ negated value if it was in the set, minus ·absent· if it was in the set, must be the value. -->
+ <xsd:complexType name="type.inters.3_1">
+ <xsd:attributeGroup ref="foo:attrGr.inters.3_1"/>
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.inters.3_1">
+ <xsd:anyAttribute namespace="##local ##targetNamespace http://BAR"/>
+ </xsd:attributeGroup>
+ <!-- 4. If both O1 and O2 are sets of (namespace names or ·absent·), then the
+ intersection of those sets must be the value. -->
+ <xsd:complexType name="type.inters.4_1">
+ <xsd:attributeGroup ref="foo:attrGr.inters.4_1"/>
+ <xsd:anyAttribute namespace="##local ##targetNamespace http://BAR" processContents="lax"/>
+ </xsd:complexType>
+ <xsd:attributeGroup name="attrGr.inters.4_1">
+ <xsd:anyAttribute namespace="##local ##targetNamespace"/>
+ </xsd:attributeGroup>
+ <!-- 5. If the two are negations of different namespace names,
+ then the intersection is not expressible. -->
+ <!--
+ <xsd:complexType name="type.inters.5_1">
+ <xsd:attributeGroup ref="import:attrGr.inters.5_1"/>
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+ -->
+ <!--6. If the one is a negation of a namespace name and the other is a negation of ·absent·,
+ then the one which is the negation of a namespace name must be the value.
+
+ This one uses an attribute group from an imported schema with no targetNamespace.
+ -->
+ <xsd:complexType name="type.inters.6_1">
+ <xsd:attributeGroup ref="attrGr.inters.6_1"/>
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:attributeGroup name="attrGrA">
+ <xsd:anyAttribute namespace="##targetNamespace"/>
+ </xsd:attributeGroup>
+
+</xsd:schema>
+
+
diff --git a/test/schemas/bug141312_0.xml b/test/schemas/bug141312_0.xml
new file mode 100644
index 0000000..7d7abb1
--- /dev/null
+++ b/test/schemas/bug141312_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo xmlns="http://FOO">lalala</foo>
diff --git a/test/schemas/bug141312_0.xsd b/test/schemas/bug141312_0.xsd
new file mode 100644
index 0000000..c9a7e2c
--- /dev/null
+++ b/test/schemas/bug141312_0.xsd
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<schema
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO">
+
+ <element name="foo" type="foo:fooType" nillable="false" />
+
+ <complexType name="fooType" mixed="true">
+ <simpleContent>
+ <extension base="string" />
+ </simpleContent>
+ </complexType>
+
+</schema>
+
diff --git a/test/schemas/bug141333.xml b/test/schemas/bug141333.xml
new file mode 100644
index 0000000..e14aa46
--- /dev/null
+++ b/test/schemas/bug141333.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.xsd b/test/schemas/bug141333.xsd
new file mode 100644
index 0000000..1b81a7b
--- /dev/null
+++ b/test/schemas/bug141333.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/bug143951.imp b/test/schemas/bug143951.imp
new file mode 100644
index 0000000..58420d3
--- /dev/null
+++ b/test/schemas/bug143951.imp
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<xs:schema targetNamespace="http://www.newport-networks.com/NNL"
+xmlns:nnl="http://www.newport-networks.com/NNL"
+xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+attributeFormDefault="unqualified" version="1.00">
+ <xs:group name="schema2group">
+ <xs:sequence>
+ <xs:element name="file" type="xs:string"
+default="$File$"/>
+ </xs:sequence>
+ </xs:group>
+</xs:schema>
diff --git a/test/schemas/bug143951_0.xml b/test/schemas/bug143951_0.xml
new file mode 100644
index 0000000..a742a0d
--- /dev/null
+++ b/test/schemas/bug143951_0.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<MenuDefinitionFile xmlns:nnl="http://www.newport-networks.com/NNL"
+xmlns="http://www.newport-networks.com/cli"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://www.newport-networks.com/cli bug143951_0.xsd">
+ <nnl:file>$File: //depot/NNL/R1.0_SandM_Dev/Projects/SandM/src/uisupport
+/xml/cliTestCommands.xml $</nnl:file>
+</MenuDefinitionFile>
+
diff --git a/test/schemas/bug143951_0.xsd b/test/schemas/bug143951_0.xsd
new file mode 100644
index 0000000..d5c9511
--- /dev/null
+++ b/test/schemas/bug143951_0.xsd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<xs:schema targetNamespace="http://www.newport-networks.com/cli"
+ xmlns:nnl="http://www.newport-networks.com/NNL"
+ xmlns:cli="http://www.newport-networks.com/cli"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified" attributeFormDefault="unqualified"
+ version="1.00">
+ <xs:import namespace="http://www.newport-networks.com/NNL" schemaLocation="bug143951.imp"/>
+ <xs:element name="MenuDefinitionFile">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:group ref="nnl:schema2group"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
+
diff --git a/test/schemas/cos-ct-extends-1-3_0.xml b/test/schemas/cos-ct-extends-1-3_0.xml
new file mode 100644
index 0000000..a0b8a59
--- /dev/null
+++ b/test/schemas/cos-ct-extends-1-3_0.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+-->
+<foo xmlns="http://FOO" xmlns:foo="http://FOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO cos-ct-extends-1-3_0.xsd">
+ <bar.A foo:bar="o"/>
+ <bar.B foo:bar="o"/>
+</foo>
diff --git a/test/schemas/cos-ct-extends-1-3_0.xsd b/test/schemas/cos-ct-extends-1-3_0.xsd
new file mode 100644
index 0000000..7655a8e
--- /dev/null
+++ b/test/schemas/cos-ct-extends-1-3_0.xsd
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ Schema Component Constraint: Derivation Valid (Extension)
+
+ 1.3 If it has an {attribute wildcard}, the complex type definition must
+ also have one, and the base type definition's {attribute wildcard}'s
+ {namespace constraint} must be a subset of the complex type definition's
+ {attribute wildcard}'s {namespace constraint}, as defined by Wildcard Subset (§3.10.6).
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO"
+ elementFormDefault="qualified">
+
+ <element name="foo">
+ <complexType>
+ <sequence>
+ <element name="bar.A" type="foo:type.A" />
+ <element name="bar.B" type="foo:type.B" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <complexType name="type.A">
+ <complexContent>
+ <!-- This is OK, since the complete wildcard
+ is the wildcard of the base type. -->
+ <extension base="foo:base.type.A" />
+ </complexContent>
+ </complexType>
+
+ <complexType name="base.type.A">
+ <anyAttribute namespace="##any" processContents="skip" />
+ </complexType>
+
+ <complexType name="type.B">
+ <complexContent>
+ <extension base="foo:base.type.B">
+ <!-- This is OK, since the complete wildcard is a union
+ of "##any" and "http://FOO" = "##any". Thus the complete
+ wildcard is equal to that one in the base class. -->
+ <anyAttribute namespace="http://FOO" processContents="skip" />
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="base.type.B">
+ <anyAttribute namespace="##any" processContents="skip" />
+ </complexType>
+
+</schema>
diff --git a/test/schemas/cos-st-restricts-1-2-err_0.xml b/test/schemas/cos-st-restricts-1-2-err_0.xml
new file mode 100644
index 0000000..6f60e5b
--- /dev/null
+++ b/test/schemas/cos-st-restricts-1-2-err_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 cos-st-restricts-1-2-err_0.xsd">1 2</foo>
diff --git a/test/schemas/cos-st-restricts-1-2-err_0.xsd b/test/schemas/cos-st-restricts-1-2-err_0.xsd
new file mode 100644
index 0000000..9d3fabf
--- /dev/null
+++ b/test/schemas/cos-st-restricts-1-2-err_0.xsd
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO" xmlns:foo="http://FOO">
+
+ <element name="foo" type="foo:type.A"/>
+
+ <simpleType name="type.A">
+ <restriction>
+ <simpleType>
+ <list itemType="integer"/>
+ </simpleType>
+ <length value="3"/>
+ </restriction>
+ </simpleType>
+
+ <!--restriction base="foo:type.base.A">
+
+ </restriction-->
+
+ <simpleType name="type.base.A">
+ <restriction>
+ <simpleType>
+ <list itemType="integer"/>
+ </simpleType>
+ </restriction>
+ </simpleType>
+
+
+
+</schema>
diff --git a/test/schemas/date_0.xml b/test/schemas/date_0.xml
index fbef1e5..6c677ed 100644
--- a/test/schemas/date_0.xml
+++ b/test/schemas/date_0.xml
@@ -12,6 +12,7 @@
<date1>2000-05-18Z</date1>
<dt1>2000-05-18T00:00:00</dt1>
<dt2>2002-05-19T21:30:00.99</dt2>
+ <dt1>1969-12-31T23:00:01-01:00</dt1>
<hol>--01-01</hol>
<hol>--07-04</hol>
<hol>--12-25</hol>
diff --git a/test/schemas/derivation-ok-extension-err_0.xml b/test/schemas/derivation-ok-extension-err_0.xml
new file mode 100644
index 0000000..ccfa348
--- /dev/null
+++ b/test/schemas/derivation-ok-extension-err_0.xml
@@ -0,0 +1,9 @@
+<?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 derivation-ok-extension-err_0.xsd"
+ barA_1="o" barA_2="o"/>
+
+
+
+
diff --git a/test/schemas/derivation-ok-extension-err_0.xsd b/test/schemas/derivation-ok-extension-err_0.xsd
new file mode 100644
index 0000000..89be581
--- /dev/null
+++ b/test/schemas/derivation-ok-extension-err_0.xsd
@@ -0,0 +1,22 @@
+<?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:extension base="typeA">
+ <xs:attribute name="barA_1" type="xs:string" use="optional"/>
+ <xs:attribute name="barA_2" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="typeA">
+ <xs:attribute name="barA_1" type="xs:string" use="required"/>
+ </xs:complexType>
+
+</xs:schema>
+
+
diff --git a/test/schemas/derivation-ok-extension_0.xml b/test/schemas/derivation-ok-extension_0.xml
new file mode 100644
index 0000000..0cf871e
--- /dev/null
+++ b/test/schemas/derivation-ok-extension_0.xml
@@ -0,0 +1,9 @@
+<?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 derivation-ok-extension_0.xsd"
+ barA_1="o" barA_2="o"/>
+
+
+
+
diff --git a/test/schemas/derivation-ok-extension_0.xsd b/test/schemas/derivation-ok-extension_0.xsd
new file mode 100644
index 0000000..b99065b
--- /dev/null
+++ b/test/schemas/derivation-ok-extension_0.xsd
@@ -0,0 +1,22 @@
+<?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:extension base="typeA">
+ <xs:attribute name="barA_2" type="xs:string" use="required"/>
+ <xs:attribute name="barA_1" type="xs:string" use="prohibited"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="typeA">
+ <xs:attribute name="barA_1" type="xs:string" use="required"/>
+ </xs:complexType>
+
+</xs:schema>
+
+
diff --git a/test/schemas/derivation-ok-restriction-2-1-1_0.xml b/test/schemas/derivation-ok-restriction-2-1-1_0.xml
new file mode 100644
index 0000000..a92fb0c
--- /dev/null
+++ b/test/schemas/derivation-ok-restriction-2-1-1_0.xml
@@ -0,0 +1,8 @@
+<?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 derivation-ok-restriction-2-1-1_0.xsd"/>
+
+
+
+
diff --git a/test/schemas/derivation-ok-restriction-2-1-1_0.xsd b/test/schemas/derivation-ok-restriction-2-1-1_0.xsd
new file mode 100644
index 0000000..e91fe43
--- /dev/null
+++ b/test/schemas/derivation-ok-restriction-2-1-1_0.xsd
@@ -0,0 +1,56 @@
+<?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_1" type="xs:string" use="optional"/>
+ <!-- OK -->
+ <xs:attribute name="barA_2" type="xs:string" use="required"/>
+ <!-- OK -->
+ <xs:attribute name="barA_3" type="xs:string" use="prohibited"/>
+ <!-- OK -->
+
+ <xs:attribute name="barB_1" type="xs:string" use="optional"/>
+ <!-- 2.1.1 inconsistent ( OR 3 ) -->
+ <xs:attribute name="barB_2" type="xs:string" use="required"/>
+ <!-- OK -->
+ <xs:attribute name="barB_3" type="xs:string" use="prohibited"/>
+ <!-- 3 -->
+
+ <xs:attribute name="barC_1" type="xs:string" use="optional"/>
+ <!-- 2.2 no match in base -->
+ <xs:attribute name="barC_2" type="xs:string" use="required"/>
+ <!-- 2.2 no match in base -->
+ <xs:attribute name="barC_3" type="xs:string" use="prohibited"/>
+ <!-- OK -->
+
+ <xs:attribute name="barD_1" type="xs:string" use="optional"/>
+ <!-- 2.2 no match in base -->
+ <xs:attribute name="barD_2" type="xs:string" use="required"/>
+ <!-- 2.2 no match in base -->
+ <xs:attribute name="barD_3" type="xs:string" use="prohibited"/>
+ <!-- OK -->
+
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="typeA">
+ <xs:attribute name="barA_1" type="xs:string" use="optional"/>
+ <xs:attribute name="barA_2" type="xs:string" use="optional"/>
+ <xs:attribute name="barA_3" type="xs:string" use="optional"/>
+ <xs:attribute name="barB_1" type="xs:string" use="required"/>
+ <xs:attribute name="barB_2" type="xs:string" use="required"/>
+ <xs:attribute name="barB_3" type="xs:string" use="required"/>
+ <xs:attribute name="barC_1" type="xs:string" use="prohibited"/>
+ <xs:attribute name="barC_2" type="xs:string" use="prohibited"/>
+ <xs:attribute name="barC_3" type="xs:string" use="prohibited"/>
+ </xs:complexType>
+
+</xs:schema>
+
+
diff --git a/test/schemas/derivation-ok-restriction-4-1-err_0.xml b/test/schemas/derivation-ok-restriction-4-1-err_0.xml
new file mode 100644
index 0000000..6021eb9
--- /dev/null
+++ b/test/schemas/derivation-ok-restriction-4-1-err_0.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo xmlns="http://FOO" xmlns:foo="http://FOO"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://FOO derivation-ok-restriction-4-1-err_0.xsd">
+ <bar.A />
+ <bar.B />
+ <bar.C />
+</foo>
diff --git a/test/schemas/derivation-ok-restriction-4-1-err_0.xsd b/test/schemas/derivation-ok-restriction-4-1-err_0.xsd
new file mode 100644
index 0000000..c7400ac
--- /dev/null
+++ b/test/schemas/derivation-ok-restriction-4-1-err_0.xsd
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ Schema Component Constraint: Derivation Valid (Restriction, Complex)
+
+ 4 If there is an {attribute wildcard}, all of the following must be true:
+
+ 4.1 The {base type definition} must also have one.
+
+ 4.2 The complex type definition's {attribute wildcard}'s {namespace constraint}
+ must be a subset of the {base type definition}'s {attribute wildcard}'s {namespace
+ constraint}, as defined by Wildcard Subset (§3.10.6).
+
+ 4.3 Unless the {base type definition} is the ·ur-type definition·, the complex type
+ definition's {attribute wildcard}'s {process contents} must be identical to or stronger
+ than the {base type definition}'s {attribute wildcard}'s {process contents},
+ where strict is stronger than lax is stronger than skip.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://FOO"
+ xmlns:foo="http://FOO"
+ >
+
+ <element name="foo">
+ <complexType>
+ <sequence>
+ <element name="bar.A" type="foo:type.A" />
+ <element name="bar.B" type="foo:type.B" />
+ <element name="bar.C" type="foo:type.C" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <complexType name="type.A">
+ <complexContent>
+ <restriction base="foo:base.type.A">
+ <anyAttribute namespace="##any" processContents="skip" />
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="base.type.A">
+ <attribute name="bar" type="string"/>
+ </complexType>
+
+ <complexType name="type.B">
+ <complexContent>
+ <restriction base="foo:base.type.B">
+ <anyAttribute namespace="##any" processContents="skip" />
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="base.type.B">
+ <anyAttribute namespace="http://FOO" processContents="skip" />
+ </complexType>
+
+ <complexType name="type.C">
+ <complexContent>
+ <restriction base="foo:base.type.C">
+ <anyAttribute namespace="##any" processContents="skip" />
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="base.type.C">
+ <anyAttribute namespace="##any" processContents="lax" />
+ </complexType>
+
+</schema>
diff --git a/test/schemas/derivation-restriction-anyAttr_0.xml b/test/schemas/derivation-restriction-anyAttr_0.xml
new file mode 100644
index 0000000..66e7d3f
--- /dev/null
+++ b/test/schemas/derivation-restriction-anyAttr_0.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo
+ xmlns:f="http://FOO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:bar="http://BAR"
+ xsi:noNamespaceSchemaLocation="file:///c:/dev/libxml2/patches/2004-05-17/derivation-restriction-anyAttr_0.xsd"
+ >
+ <bar barA="ooo" />
+</foo>
+
+
+
+
diff --git a/test/schemas/derivation-restriction-anyAttr_0.xsd b/test/schemas/derivation-restriction-anyAttr_0.xsd
new file mode 100644
index 0000000..f72c316
--- /dev/null
+++ b/test/schemas/derivation-restriction-anyAttr_0.xsd
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="unqualified">
+
+ <xs:element name="foo">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="bar" type="typeA"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attrGrA">
+ <xs:anyAttribute namespace="##targetNamespace"/>
+ </xs:attributeGroup>
+
+ <xs:complexType name="typeA">
+ <xs:attributeGroup ref="attrGrA" />
+ <xs:anyAttribute namespace="##targetNamespace" processContents="lax"/>
+ </xs:complexType>
+
+</xs:schema>
+
+
diff --git a/test/schemas/derivation-restriction-anyType.xml b/test/schemas/derivation-restriction-anyType.xml
new file mode 100644
index 0000000..c86c50a
--- /dev/null
+++ b/test/schemas/derivation-restriction-anyType.xml
@@ -0,0 +1,9 @@
+<?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 file:///c:/dev/libxml2/patches/2004-05-17/derivation-restriction-anyType.xsd"
+ barA_2="xxx"/>
+
+
+
+
diff --git a/test/schemas/derivation-restriction-anyType.xsd b/test/schemas/derivation-restriction-anyType.xsd
new file mode 100644
index 0000000..ec217d2
--- /dev/null
+++ b/test/schemas/derivation-restriction-anyType.xsd
@@ -0,0 +1,22 @@
+<?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:extension base="xs:anyType">
+ <xs:attribute name="barA_1" type="xs:string" use="optional"/>
+ <!-- OK -->
+ <xs:attribute name="barA_2" type="xs:string" use="required"/>
+ <!-- OK -->
+ <xs:attribute name="barA_3" type="xs:string" use="prohibited"/>
+ <!-- OK -->
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
+
+
diff --git a/test/schemas/facet-unionST-err1_0.xml b/test/schemas/facet-unionST-err1_0.xml
new file mode 100644
index 0000000..aa96e20
--- /dev/null
+++ b/test/schemas/facet-unionST-err1_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 facet-unionST-err1_0.xsd">large</foo>
+
diff --git a/test/schemas/facet-unionST-err1_0.xsd b/test/schemas/facet-unionST-err1_0.xsd
new file mode 100644
index 0000000..476668b
--- /dev/null
+++ b/test/schemas/facet-unionST-err1_0.xsd
@@ -0,0 +1,27 @@
+<?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" type="foo:fooType.B"/>
+
+ <xsd:simpleType name="fooType.B">
+ <xsd:restriction base="foo:fooType.A">
+ <xsd:enumeration value="medium"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="fooType.A">
+ <xsd:union>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="small"/>
+ <xsd:enumeration value="medium"/>
+ <xsd:enumeration value="large"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+
+
+
+</xsd:schema>
diff --git a/test/schemas/scc-no-xmlns_0.xml b/test/schemas/scc-no-xmlns_0.xml
new file mode 100644
index 0000000..b85cdcb
--- /dev/null
+++ b/test/schemas/scc-no-xmlns_0.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://foo"/>
+
diff --git a/test/schemas/scc-no-xmlns_0.xsd b/test/schemas/scc-no-xmlns_0.xsd
new file mode 100644
index 0000000..731c81b
--- /dev/null
+++ b/test/schemas/scc-no-xmlns_0.xsd
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- C.4 Schema Component Constraints: no-xmlns -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="foo">
+ <complexType>
+ <attribute name="xmlns" type="string" />
+ </complexType>
+ </element>
+
+</schema>
diff --git a/test/schemas/scc-no-xsi_0.xml b/test/schemas/scc-no-xsi_0.xml
new file mode 100644
index 0000000..b85cdcb
--- /dev/null
+++ b/test/schemas/scc-no-xsi_0.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://foo"/>
+
diff --git a/test/schemas/scc-no-xsi_0.xsd b/test/schemas/scc-no-xsi_0.xsd
new file mode 100644
index 0000000..388b6a9
--- /dev/null
+++ b/test/schemas/scc-no-xsi_0.xsd
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.6 Schema Component Constraint: xsi: Not Allowed -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2001/XMLSchema-instance">
+
+ <element name="foo">
+ <complexType>
+ <attribute name="bar" form="qualified" type="string"/>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/test/schemas/src-attribute1_0.xml b/test/schemas/src-attribute1_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute1_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute1_0.xsd b/test/schemas/src-attribute1_0.xsd
new file mode 100644
index 0000000..dba8b48
--- /dev/null
+++ b/test/schemas/src-attribute1_0.xsd
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 1
+ default and fixed must not both be present
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="foo">
+ <complexType>
+ <attribute name="bar" type="string" default="moo" fixed="true"/>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/test/schemas/src-attribute2_0.xml b/test/schemas/src-attribute2_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute2_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute2_0.xsd b/test/schemas/src-attribute2_0.xsd
new file mode 100644
index 0000000..d10cc81
--- /dev/null
+++ b/test/schemas/src-attribute2_0.xsd
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 2
+ If default and use are both present, use must have the ·actual value· optional
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="foo">
+ <complexType>
+ <attribute name="bar" type="string" use="required" default="moo" />
+ </complexType>
+ </element>
+
+</schema>
diff --git a/test/schemas/src-attribute3-1_0.xml b/test/schemas/src-attribute3-1_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute3-1_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute3-1_0.xsd b/test/schemas/src-attribute3-1_0.xsd
new file mode 100644
index 0000000..28e003c
--- /dev/null
+++ b/test/schemas/src-attribute3-1_0.xsd
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3.1
+ One of ref or name must be present, but not both
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="foo">
+ <complexType>
+ <attribute name="bar" ref="foo:bar" />
+ </complexType>
+ </element>
+
+ <attribute name="bar" type="string" />
+
+</schema>
diff --git a/test/schemas/src-attribute3-2-form_0.xml b/test/schemas/src-attribute3-2-form_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute3-2-form_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute3-2-form_0.xsd b/test/schemas/src-attribute3-2-form_0.xsd
new file mode 100644
index 0000000..0c7cc23
--- /dev/null
+++ b/test/schemas/src-attribute3-2-form_0.xsd
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3.2
+ If ref is present, then all of <simpleType>, form and type must be absent
+ This one tests "form"
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="foo">
+ <complexType>
+ <attribute ref="foo:bar" form="qualified"/>
+ </complexType>
+ </element>
+
+ <attribute name="bar" type="string"/>
+
+</schema>
diff --git a/test/schemas/src-attribute3-2-st_0.xml b/test/schemas/src-attribute3-2-st_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute3-2-st_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute3-2-st_0.xsd b/test/schemas/src-attribute3-2-st_0.xsd
new file mode 100644
index 0000000..f256381
--- /dev/null
+++ b/test/schemas/src-attribute3-2-st_0.xsd
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3.2
+ If ref is present, then all of <simpleType>, form and type must be absent
+ This one tests <simpleType>
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="foo">
+ <complexType>
+ <attribute ref="foo:bar">
+ <simpleType>
+ <restriction base="string">
+ <maxLength value="20"/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <attribute name="bar" type="string" />
+
+</schema>
diff --git a/test/schemas/src-attribute3-2-type_0.xml b/test/schemas/src-attribute3-2-type_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute3-2-type_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute3-2-type_0.xsd b/test/schemas/src-attribute3-2-type_0.xsd
new file mode 100644
index 0000000..54f1973
--- /dev/null
+++ b/test/schemas/src-attribute3-2-type_0.xsd
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3.2
+ If ref is present, then all of <simpleType>, form and type must be absent
+ This one tests "type"
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="foo">
+ <complexType>
+ <attribute ref="foo:bar" type="string"/>
+ </complexType>
+ </element>
+
+ <attribute name="bar" type="string"/>
+
+</schema>
diff --git a/test/schemas/src-attribute4_0.xml b/test/schemas/src-attribute4_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute4_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute4_0.xsd b/test/schemas/src-attribute4_0.xsd
new file mode 100644
index 0000000..cc9d8ac
--- /dev/null
+++ b/test/schemas/src-attribute4_0.xsd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3.2
+ type and <simpleType> must not both be present
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <attribute name="bar" type="string">
+ <simpleType>
+ <restriction base="string">
+ <maxLength value="20"/>
+ </restriction>
+ </simpleType>
+ </attribute>
+
+ <element name="foo"/>
+
+</schema>
diff --git a/test/schemas/src-element1_0.xml b/test/schemas/src-element1_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-element1_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-element1_0.xsd b/test/schemas/src-element1_0.xsd
new file mode 100644
index 0000000..ffd8d57
--- /dev/null
+++ b/test/schemas/src-element1_0.xsd
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 1
+ default and fixed must not both be present
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="foo" type="string" default="Joni" fixed="Mitchel"/>
+
+</schema>
diff --git a/test/schemas/src-element2-1_0.xml b/test/schemas/src-element2-1_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-element2-1_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-element2-1_0.xsd b/test/schemas/src-element2-1_0.xsd
new file mode 100644
index 0000000..61c2edf
--- /dev/null
+++ b/test/schemas/src-element2-1_0.xsd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 2.1
+ One of ref or name must be present, but not both.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="bar" type="string"/>
+
+ <element name="foo">
+ <complexType>
+ <sequence>
+ <element name="bar" ref="foo:bar"/>
+ </sequence>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/test/schemas/src-element2-2_0.xml b/test/schemas/src-element2-2_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-element2-2_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-element2-2_0.xsd b/test/schemas/src-element2-2_0.xsd
new file mode 100644
index 0000000..a70740a
--- /dev/null
+++ b/test/schemas/src-element2-2_0.xsd
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 2.2
+ If ref is present, then all of <complexType>, <simpleType>, <key>, <keyref>, <unique>,
+ nillable, default, fixed, form, block and type must be absent, i.e. only minOccurs, maxOccurs,
+ id are allowed in addition to ref, along with <annotation>.
+
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="bar" type="string"/>
+
+ <element name="foo">
+ <complexType>
+ <choice>
+
+ <!-- The good ones. -->
+ <element ref="foo:bar" minOccurs="0"/>
+ <element ref="foo:bar" maxOccurs="0"/>
+ <element ref="foo:bar" id="myomy"/>
+
+ <!-- The bad ones. -->
+ <element ref="foo:bar">
+ <complexType>
+ <attribute name="bar" type="string"/>
+ </complexType>
+ </element>
+
+ <element ref="foo:bar">
+ <simpleType>
+ <restriction base="string">
+ <maxLength value="20"/>
+ </restriction>
+ </simpleType>
+ </element>
+
+ <element ref="foo:bar" type="string"/>
+ <element ref="foo:bar" nillable="true"/>
+ <element ref="foo:bar" default="Joni"/>
+ <element ref="foo:bar" fixed="Mitchel"/>
+ <element ref="foo:bar" form="unqualified"/>
+ <element ref="foo:bar" block="restriction"/>
+
+ </choice>
+ </complexType>
+ </element>
+
+
+</schema>
diff --git a/test/schemas/src-element3_0.xml b/test/schemas/src-element3_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-element3_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-element3_0.xsd b/test/schemas/src-element3_0.xsd
new file mode 100644
index 0000000..28b69d8
--- /dev/null
+++ b/test/schemas/src-element3_0.xsd
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3
+ type and either <simpleType> or <complexType> are mutually exclusive
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+
+ <element name="foo" type="foo:someType">
+ <complexType>
+ <sequence>
+ <element name="bar" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="bar" type="foo:someType">
+ <simpleType>
+ <restriction base="string">
+ <maxLength value="20"/>
+ </restriction>
+ </simpleType>
+ </element>
+
+ <complexType name="someType">
+ <sequence>
+ <element name="bar" type="string"/>
+ </sequence>
+ </complexType>
+
+</schema>
diff --git a/test/schemas/xsd-simpleType-varieties_0.xml b/test/schemas/xsd-simpleType-varieties_0.xml
new file mode 100644
index 0000000..83a0b2a
--- /dev/null
+++ b/test/schemas/xsd-simpleType-varieties_0.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- This is the test data for the check of the implementation of varieties of xsd:simpleType element. -->
+<foo xmlns="http://FOO">
+ <barA>fajita</barA>
+ <barB>pub pub</barB>
+ <barC><![CDATA[tequilla]]></barC>
+</foo>
+
diff --git a/test/schemas/xsd-simpleType-varieties_0.xsd b/test/schemas/xsd-simpleType-varieties_0.xsd
new file mode 100644
index 0000000..e4ed6ac
--- /dev/null
+++ b/test/schemas/xsd-simpleType-varieties_0.xsd
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!-- 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">
+
+ <element name="foo">
+ <complexType>
+ <sequence maxOccurs="unbounded">
+ <element name="barA">
+ <simpleType>
+ <union memberTypes="foo:typeA foo:typeB"/>
+ </simpleType>
+ </element>
+ <element name="barB">
+ <simpleType>
+ <list itemType="foo:typeA"/>
+ </simpleType>
+ </element>
+ <element name="barC">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="tequilla"/>
+ </restriction>
+ </simpleType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+
+ <simpleType name="typeA">
+ <restriction base="string">
+ <enumeration value="pub"/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="typeB">
+ <restriction base="string">
+ <enumeration value="fajita"/>
+ </restriction>
+ </simpleType>
+
+</schema>
diff --git a/test/valid/t10.xml b/test/valid/t10.xml
new file mode 100644
index 0000000..de066f9
--- /dev/null
+++ b/test/valid/t10.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE root [
+<!ELEMENT root (cont1, (cont1, cont2?)+)>
+ <!ELEMENT cont1 EMPTY>
+ <!ELEMENT cont2 EMPTY>
+]>
+<root>
+ <cont1/>
+ <cont1/>
+ <cont1/>
+ <cont1/>
+</root>