summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2005-07-12 19:58:48 +0000
committerMike Hommey <glandium@debian.org>2005-07-12 19:58:48 +0000
commit112cb5bb5475afec1c1cbf1d6728ce4880d0fee8 (patch)
tree6c34596134f8665ebc180f29b50915dc70bbe5c1 /test
parent0fc063df3ab2ad380d532d210dd1001de473e51b (diff)
downloadlibxml2-upstream/2.6.20.tar.gz
Load /tmp/tmp.zfIyNk/libxml2-2.6.20 intoupstream/2.6.20
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'test')
-rw-r--r--test/HTML/repeat.html1
-rw-r--r--test/XPath/docs/.memdump4
-rw-r--r--test/XPath/docs/lang13
-rw-r--r--test/XPath/docs/mixed10
-rw-r--r--test/XPath/tests/langsimple5
-rw-r--r--test/XPath/tests/mixedpat7
-rw-r--r--test/errors/attr3.xml6
-rw-r--r--test/errors/cdata.xml2
-rw-r--r--test/namespaces/reconcile/tests-to-c.xsl275
-rw-r--r--test/namespaces/reconcile/tests.xml249
-rw-r--r--test/nsclean.xml9
-rw-r--r--test/relaxng/compare0.rng8
-rw-r--r--test/relaxng/compare0_0.xml3
-rw-r--r--test/relaxng/docbook.rng2
-rw-r--r--test/relaxng/docbook_0.xml1
-rw-r--r--test/relaxng/spec.rng2
-rw-r--r--test/relaxng/spec_0.xml4
-rw-r--r--test/schemas/bug145246_0.xml2
-rw-r--r--test/schemas/bug145246_0.xsd2
-rw-r--r--test/schemas/bug303566_1.xml19
-rw-r--r--test/schemas/bug303566_1.xsd63
-rw-r--r--test/schemas/bug306806_0.xml111
-rw-r--r--test/schemas/bug306806_1.xsd544
-rw-r--r--test/schemas/bug309338_0.xml4
-rw-r--r--test/schemas/bug309338_1.xsd13
-rw-r--r--test/schemas/changelog093_0.xml14
-rw-r--r--test/schemas/changelog093_1.xsd253
-rw-r--r--test/schemas/empty-value_0.xml2
-rw-r--r--test/schemas/empty-value_1.xml2
-rw-r--r--test/schemas/empty-value_1.xsd24
-rw-r--r--test/schemas/union2_1.xml6
-rw-r--r--test/schemas/union2_1.xsd21
-rw-r--r--test/schemas/vdv-complexTypes.xsd2
-rw-r--r--test/schemas/vdv-first0_0.xml2
-rw-r--r--test/schemas/vdv-first1_0.xml2
-rw-r--r--test/schemas/vdv-first2_0.xml2
-rw-r--r--test/schemas/vdv-first2_0.xsd2
-rw-r--r--test/schemas/vdv-first3_0.xml2
-rw-r--r--test/schemas/vdv-first3_0.xsd2
-rw-r--r--test/schemas/vdv-first4_0.xml2
-rwxr-xr-x[-rw-r--r--]test/schemas/vdv-first4_0.xsd2
-rw-r--r--test/schemas/vdv-first4_1.xml2
-rw-r--r--test/schemas/vdv-first4_2.xml2
-rw-r--r--test/schemas/vdv-first5_0.xml2
-rw-r--r--test/schemas/vdv-first5_0.xsd2
-rw-r--r--test/schemas/vdv-simpleTypes.xsd2
-rw-r--r--test/winblanks.xml5
-rw-r--r--test/xsdtest/.memdump4
48 files changed, 1696 insertions, 22 deletions
diff --git a/test/HTML/repeat.html b/test/HTML/repeat.html
new file mode 100644
index 0000000..d6d6f97
--- /dev/null
+++ b/test/HTML/repeat.html
@@ -0,0 +1 @@
+<td><td><!-- <a><b> -->
diff --git a/test/XPath/docs/.memdump b/test/XPath/docs/.memdump
new file mode 100644
index 0000000..dfcf628
--- /dev/null
+++ b/test/XPath/docs/.memdump
@@ -0,0 +1,4 @@
+ 06:32:11 PM
+
+ MEMORY ALLOCATED : 0, MAX was 14195
+BLOCK NUMBER SIZE TYPE
diff --git a/test/XPath/docs/lang b/test/XPath/docs/lang
new file mode 100644
index 0000000..abfe1d6
--- /dev/null
+++ b/test/XPath/docs/lang
@@ -0,0 +1,13 @@
+<doc>
+ <x>1</x>
+ <b xml:lang="en">
+ <x>en</x>
+ <x>3</x>
+ </b>
+ <x>4</x>
+ <para xml:lang="en"/>
+ <div xml:lang="en"><para/></div>
+ <para xml:lang="EN"/>
+ <para xml:lang="en-us"/>
+ <para xml:lang="EN-US"/>
+</doc>
diff --git a/test/XPath/docs/mixed b/test/XPath/docs/mixed
new file mode 100644
index 0000000..3b457bc
--- /dev/null
+++ b/test/XPath/docs/mixed
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<root>
+ <s p="root"/>
+ <p1>
+ <s p="p1"/>
+ </p1>
+ <p2>
+ <s p="p2"/>
+ </p2>
+</root>
diff --git a/test/XPath/tests/langsimple b/test/XPath/tests/langsimple
new file mode 100644
index 0000000..f71a321
--- /dev/null
+++ b/test/XPath/tests/langsimple
@@ -0,0 +1,5 @@
+//*[lang('en')]
+//*[lang('en-us')]
+//*[lang('en-gb')]
+//*[lang('fr')]
+//*[lang('')]
diff --git a/test/XPath/tests/mixedpat b/test/XPath/tests/mixedpat
new file mode 100644
index 0000000..c212f6c
--- /dev/null
+++ b/test/XPath/tests/mixedpat
@@ -0,0 +1,7 @@
+s
+s|p1/s
+s|/root/p1/s
+/root/p1/s|s
+//s
+//s|p1
+p1|//s
diff --git a/test/errors/attr3.xml b/test/errors/attr3.xml
new file mode 100644
index 0000000..e2567f5
--- /dev/null
+++ b/test/errors/attr3.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+<!ATTLIST doc a1 CDATA "v1">
+<!ATTLIST doc a1 CDATA "z1">
+]>
+<doc></doc>
diff --git a/test/errors/cdata.xml b/test/errors/cdata.xml
new file mode 100644
index 0000000..8f2bc09
--- /dev/null
+++ b/test/errors/cdata.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<A><![CDATA[Cár]]></A>
diff --git a/test/namespaces/reconcile/tests-to-c.xsl b/test/namespaces/reconcile/tests-to-c.xsl
new file mode 100644
index 0000000..9a0d1c6
--- /dev/null
+++ b/test/namespaces/reconcile/tests-to-c.xsl
@@ -0,0 +1,275 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="text"/>
+
+ <xsl:template match="/">
+ <xsl:text><![CDATA[
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+]]>
+</xsl:text>
+ <xsl:call-template name="serializer"/>
+ <xsl:apply-templates select="tests/test"/>
+ <xsl:text>
+
+int main(int argc, char **argv) {&#xA;</xsl:text>
+ <xsl:apply-templates select="tests/test" mode="call"/>
+ <xsl:text>
+ /* printf("finished.\n"); */
+ return (0);
+}
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="tests/test" mode="call">
+ <xsl:text> nsTest_</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>();&#xA;</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="xml-text">
+ <xsl:param name="text"/>
+ <xsl:call-template name="replace-string">
+ <!-- Substitute #10 for " -->
+ <xsl:with-param name="from" select="'&#10;'"/>
+ <xsl:with-param name="to" select="'&quot;&#10;&quot;'"/>
+ <xsl:with-param name="text">
+ <xsl:call-template name="replace-string">
+ <!-- Substitute " for \" -->
+ <xsl:with-param name="from" select="'&quot;'"/>
+ <xsl:with-param name="to" select="'\&quot;'"/>
+ <xsl:with-param name="text">
+ <xsl:call-template name="replace-string">
+ <!-- Remove tabs. -->
+ <xsl:with-param name="from" select="'&#9;'"/>
+ <xsl:with-param name="to" select="''"/>
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ </xsl:template>
+
+ <xsl:template match="doc" mode="define">
+ <xsl:text> xmlDocPtr </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>;&#xA;</xsl:text>
+ <xsl:text> const char * </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>_str = "</xsl:text>
+ <xsl:call-template name="xml-text">
+ <xsl:with-param name="text" select="."/>
+ </xsl:call-template>
+ <xsl:text>";&#xA;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="expected" mode="define">
+ <xsl:text> const char * </xsl:text>
+ <xsl:text>exp_str = "</xsl:text>
+ <xsl:call-template name="xml-text">
+ <xsl:with-param name="text" select="."/>
+ </xsl:call-template>
+ <xsl:text>";&#xA;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="doc">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text> = xmlReadDoc(BAD_CAST </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>_str, NULL, NULL, 0);&#xA;</xsl:text>
+
+ <xsl:apply-templates select="following-sibling::*[1]"/>
+
+ <xsl:text> xmlFreeDoc(</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>);&#xA;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="xpath">
+ </xsl:template>
+
+ <xsl:template match="var" mode="define">
+ <xsl:text> xmlNodePtr </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>;&#xA;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="var">
+ <xsl:if test="xpath">
+ <!-- Create XPath context. -->
+ <xsl:text> /* Selecting node "</xsl:text><xsl:value-of select="@name"/><xsl:text>". */&#xA;</xsl:text>
+ <xsl:text> xp = xmlXPathNewContext(</xsl:text>
+ <xsl:value-of select="xpath/@doc"/>
+ <xsl:text>);&#xA;</xsl:text>
+ <!-- Register namespaces. -->
+ <xsl:for-each select="xpath/reg-ns">
+ <xsl:text> xmlXPathRegisterNs(xp, BAD_CAST "</xsl:text>
+ <xsl:value-of select="@prefix"/>
+ <xsl:text>", BAD_CAST "</xsl:text>
+ <xsl:value-of select="@ns"/>
+ <xsl:text>");&#xA;</xsl:text>
+ </xsl:for-each>
+ <!-- Evaluate. -->
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text> = nsSelectNode(xp, "</xsl:text>
+ <xsl:value-of select="xpath/@select-node"/>
+ <xsl:text>");&#xA;</xsl:text>
+ <xsl:text> xmlXPathFreeContext(xp);&#xA;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates select="following-sibling::*[1]"/>
+ </xsl:template>
+
+ <xsl:template match="reconcile-ns">
+ <xsl:text> /* Reconcile node "</xsl:text><xsl:value-of select="@ref"/><xsl:text>". */&#xA;</xsl:text>
+ <xsl:text> xmlDOMWrapReconcileNamespaces(NULL, </xsl:text>
+ <xsl:value-of select="@node"/>
+ <xsl:text>, 0);&#xA;</xsl:text>
+ <xsl:apply-templates select="following-sibling::*[1]"/>
+ </xsl:template>
+
+ <xsl:template match="remove">
+ <xsl:text> xmlDOMWrapRemoveNode(NULL, </xsl:text>
+ <xsl:value-of select="@node"/>
+ <xsl:text>->doc, </xsl:text>
+ <xsl:value-of select="@node"/>
+ <xsl:text>, 0);&#xA;</xsl:text>
+ <xsl:apply-templates select="following-sibling::*[1]"/>
+ </xsl:template>
+
+ <xsl:template match="adopt">
+ <xsl:text> /* Adopt "</xsl:text><xsl:value-of select="@node"/><xsl:text>". */&#xA;</xsl:text>
+ <xsl:text> xmlDOMWrapAdoptNode(NULL, </xsl:text>
+ <xsl:value-of select="@node"/>
+ <xsl:text>->doc, </xsl:text>
+ <xsl:value-of select="@node"/>
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="@dest-doc"/>
+ <xsl:text>, </xsl:text>
+ <xsl:choose>
+ <xsl:when test="@dest-parent">
+ <xsl:value-of select="@dest-parent"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>NULL</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>, 0);&#xA;</xsl:text>
+ <xsl:apply-templates select="following-sibling::*[1]"/>
+ </xsl:template>
+
+ <xsl:template match="append-child">
+ <xsl:text> xmlAddChild(</xsl:text>
+ <xsl:value-of select="@parent"/>
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="@child"/>
+ <xsl:text>);&#xA;</xsl:text>
+ <xsl:apply-templates select="following-sibling::*[1]"/>
+ </xsl:template>
+
+ <xsl:template match="expected">
+ <xsl:text> /* Serialize "</xsl:text><xsl:value-of select="@doc"/><xsl:text>". */&#xA;</xsl:text>
+ <xsl:text> result_str = nsSerializeNode(xmlDocGetRootElement(</xsl:text>
+ <xsl:value-of select="@doc"/>
+ <xsl:text>));&#xA;</xsl:text>
+ <xsl:text> /* Compare result. */
+ if (! xmlStrEqual(BAD_CAST result_str, BAD_CAST exp_str)) {
+ printf("FAILED\n");
+ printf("%s\n", (const char *) result_str);
+ printf("- - -\n");
+ printf("Expected:\n%s\n", exp_str);
+ printf("= = =\n");
+ }
+ xmlFree(result_str);&#xA;</xsl:text>
+ </xsl:template>
+
+ <!--********
+ * TEST *
+ ********-->
+ <xsl:template match="test">
+ <xsl:text>void nsTest_</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>(void) {
+ xmlChar * result_str;
+ xmlXPathContextPtr xp;
+ int memory;&#xA;</xsl:text>
+ <xsl:apply-templates select="*" mode="define"/>
+ <xsl:text>
+ memory = xmlMemUsed();
+ xmlInitParser();&#xA;&#xA;</xsl:text>
+ <xsl:apply-templates select="child::*[1]"/>
+ <xsl:text>
+ xmlCleanupParser();
+ memory = xmlMemUsed() - memory;
+
+ if (memory != 0) {
+ printf("## '%s' MEMORY leak: %d\n", "</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>", memory);
+ }
+}
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="serializer">
+ <xsl:text>
+
+xmlChar * nsSerializeNode(xmlNodePtr node) {
+ xmlChar * ret;
+
+ xmlOutputBufferPtr buf;
+ buf = xmlAllocOutputBuffer(NULL);
+ xmlNodeDumpOutput(buf, node->doc, node, 0, 0, NULL);
+ xmlOutputBufferFlush(buf);
+ ret = (xmlChar *) buf->buffer->content;
+ buf->buffer->content = NULL;
+ (void) xmlOutputBufferClose(buf);
+ return (ret);
+}
+
+xmlNodePtr nsSelectNode(xmlXPathContextPtr xp, const char * xpath) {
+ xmlXPathObjectPtr xpres;
+ xmlNodePtr ret;
+
+ xpres = xmlXPathEval(BAD_CAST xpath, xp);
+ ret = xpres->nodesetval->nodeTab[0];
+ xmlXPathFreeObject(xpres);
+ return (ret);
+}
+
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="replace-string">
+ <xsl:param name="text"/>
+ <xsl:param name="from"/>
+ <xsl:param name="to"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($text, $from)">
+
+ <xsl:variable name="before" select="substring-before($text, $from)"/>
+ <xsl:variable name="after" select="substring-after($text, $from)"/>
+ <xsl:variable name="prefix" select="concat($before, $to)"/>
+
+ <xsl:value-of select="$before"/>
+ <xsl:value-of select="$to"/>
+ <xsl:call-template name="replace-string">
+ <xsl:with-param name="text" select="$after"/>
+ <xsl:with-param name="from" select="$from"/>
+ <xsl:with-param name="to" select="$to"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+</xsl:stylesheet>
diff --git a/test/namespaces/reconcile/tests.xml b/test/namespaces/reconcile/tests.xml
new file mode 100644
index 0000000..c6f8c54
--- /dev/null
+++ b/test/namespaces/reconcile/tests.xml
@@ -0,0 +1,249 @@
+<?xml version="1.0"?>
+<tests>
+ <test name="adopt_recon_default">
+
+ <doc name="doc1"><![CDATA[<p1 xmlns="urn:test:AAA"><a/></p1>]]></doc>
+ <doc name="doc2"><![CDATA[<p1 xmlns="urn:test:BBB"><b/></p1>]]></doc>
+ <doc name="doc3"><![CDATA[<p2 xmlns="urn:test:ZZZ"/>]]></doc>
+ <var name="a">
+ <xpath doc="doc1" select-node="/a:p1/a:a">
+ <reg-ns prefix="a" ns="urn:test:AAA"/>
+ </xpath>
+ </var>
+ <var name="b" >
+ <xpath doc="doc2" select-node="/b:p1/b:b">
+ <reg-ns prefix="b" ns="urn:test:BBB"/>
+ </xpath>
+ </var>
+ <var name="p2">
+ <xpath doc="doc3" select-node="/z:p2">
+ <reg-ns prefix="z" ns="urn:test:ZZZ"/>
+ </xpath>
+ </var>
+
+ <remove node="a"/>
+ <adopt dest-doc="doc3" node="a"/>
+ <append-child parent="p2" child="a"/>
+
+ <!-- This time without a previous removing. -->
+ <adopt dest-doc="doc3" node="b"/>
+ <append-child parent="p2" child="b"/>
+
+ <reconcile-ns node="p2"/>
+ <expected doc="doc3"><![CDATA[<p2 xmlns="urn:test:ZZZ"><a xmlns="urn:test:AAA"/><b xmlns="urn:test:BBB"/></p2>]]></expected>
+ </test>
+
+ <test name="adopt_recon">
+ <doc name="doc1"><![CDATA[<a:p1 xmlns:a="urn:test:AAA"><a:a/></a:p1>]]></doc>
+ <doc name="doc2"><![CDATA[<a:p2 xmlns:a="urn:test:AAA"/>]]></doc>
+ <var name="a">
+ <xpath doc="doc1" select-node="/a:p1/a:a">
+ <reg-ns prefix="a" ns="urn:test:AAA"/>
+ </xpath>
+ </var>
+ <var name="p2">
+ <xpath doc="doc2" select-node="/a:p2">
+ <reg-ns prefix="a" ns="urn:test:AAA"/>
+ </xpath>
+ </var>
+ <adopt dest-doc="doc2" node="a"/>
+ <append-child parent="p2" child="a"/>
+ <reconcile-ns node="a"/>
+ <expected doc="doc2"><![CDATA[<a:p2 xmlns:a="urn:test:AAA"><a:a/></a:p2>]]></expected>
+ </test>
+
+ <test name="adopt_recon_attr">
+ <doc name="doc1"><![CDATA[<p1 xmlns:b="urn:test:BBB" b:attr="marvin"/>]]></doc>
+ <doc name="doc2"><![CDATA[<a:p2 xmlns:a="urn:test:AAA"/>]]></doc>
+ <var name="attr">
+ <xpath doc="doc1" select-node="/p1/@b:attr">
+ <reg-ns prefix="b" ns="urn:test:BBB"/>
+ </xpath>
+ </var>
+ <var name="p2">
+ <xpath doc="doc2" select-node="/a:p2">
+ <reg-ns prefix="a" ns="urn:test:AAA"/>
+ </xpath>
+ </var>
+ <adopt dest-doc="doc2" node="attr" />
+ <append-child parent="p2" child="attr"/>
+ <reconcile-ns node="p2"/>
+ <expected doc="doc2"><![CDATA[<a:p2 xmlns:a="urn:test:AAA" xmlns:b="urn:test:BBB" b:attr="marvin"/>]]></expected>
+ </test>
+
+ <test name="adopt_recon_attr_2">
+ <!-- Here we will specify a destination-parent for adoption. -->
+ <doc name="doc1"><![CDATA[<p1 xmlns:b="urn:test:BBB" b:attr="marvin"/>]]></doc>
+ <doc name="doc2"><![CDATA[<a:p2 xmlns:a="urn:test:AAA"/>]]></doc>
+ <var name="attr">
+ <xpath doc="doc1" select-node="/p1/@b:attr">
+ <reg-ns prefix="b" ns="urn:test:BBB"/>
+ </xpath>
+ </var>
+ <var name="p2">
+ <xpath doc="doc2" select-node="/a:p2">
+ <reg-ns prefix="a" ns="urn:test:AAA"/>
+ </xpath>
+ </var>
+ <adopt dest-doc="doc2" dest-parent="p2" node="attr" />
+ <append-child parent="p2" child="attr"/>
+ <reconcile-ns node="p2"/>
+ <expected doc="doc2"><![CDATA[<a:p2 xmlns:a="urn:test:AAA" xmlns:b="urn:test:BBB" b:attr="marvin"/>]]></expected>
+ </test>
+
+ <test name="adopt_recon_attr_3">
+ <!-- Conflicting ns-prefixes for the added attribute. -->
+ <doc name="doc1"><![CDATA[<p1 xmlns:a="urn:test:AAA" a:attr="marvin"/>]]></doc>
+ <doc name="doc2"><![CDATA[<a:p2 xmlns:a="urn:test:aaa"/>]]></doc>
+ <var name="attr">
+ <xpath doc="doc1" select-node="/p1/@a:attr">
+ <reg-ns prefix="a" ns="urn:test:AAA"/>
+ </xpath>
+ </var>
+ <var name="p2">
+ <xpath doc="doc2" select-node="/a:p2">
+ <reg-ns prefix="a" ns="urn:test:aaa"/>
+ </xpath>
+ </var>
+ <adopt dest-doc="doc2" node="attr" />
+ <append-child parent="p2" child="attr"/>
+ <reconcile-ns node="p2"/>
+ <expected doc="doc2"><![CDATA[<a:p2 xmlns:a="urn:test:aaa" xmlns:a1="urn:test:AAA" a1:attr="marvin"/>]]></expected>
+ </test>
+
+ <test name="adopt_recon_attr_4">
+ <!-- Qualified attribute added to default namespaced elem. -->
+ <doc name="doc1"><![CDATA[<p1 xmlns:a="urn:test:AAA" a:attr="marvin"/>]]></doc>
+ <doc name="doc2"><![CDATA[<p2 xmlns="urn:test:AAA"/>]]></doc>
+ <var name="attr">
+ <xpath doc="doc1" select-node="/p1/@a:attr">
+ <reg-ns prefix="a" ns="urn:test:AAA"/>
+ </xpath>
+ </var>
+ <var name="p2">
+ <xpath doc="doc2" select-node="/a:p2">
+ <reg-ns prefix="a" ns="urn:test:AAA"/>
+ </xpath>
+ </var>
+ <adopt dest-doc="doc2" node="attr" />
+ <append-child parent="p2" child="attr"/>
+ <reconcile-ns node="p2"/>
+ <expected doc="doc2"><![CDATA[<p2 xmlns="urn:test:AAA" xmlns:a="urn:test:AAA" a:attr="marvin"/>]]></expected>
+ </test>
+
+ <test name="adopt_recon_attr_5">
+ <!-- Shadowed and conflicting prefix. dest-parent IS given. -->
+ <doc name="doc1"><![CDATA[<p1 xmlns:a="urn:test:AAA" a:attr="marvin"/>]]></doc>
+ <doc name="doc2"><![CDATA[<p2 xmlns:a="urn:test:AAA"><a:p3 xmlns:a="urn:test:ZZZ"/></p2>]]></doc>
+ <var name="attr">
+ <xpath doc="doc1" select-node="/p1/@a:attr">
+ <reg-ns prefix="a" ns="urn:test:AAA"/>
+ </xpath>
+ </var>
+ <var name="p3">
+ <xpath doc="doc2" select-node="/p2/a:p3">
+ <reg-ns prefix="a" ns="urn:test:ZZZ"/>
+ </xpath>
+ </var>
+ <adopt dest-doc="doc2" node="attr" dest-parent="p3"/>
+ <append-child parent="p3" child="attr"/>
+ <!-- Note that we don't need to reconcile here, since done during
+ adoption. -->
+ <expected doc="doc2"><![CDATA[
+<p2 xmlns:a="urn:test:AAA">
+ <a:p3 xmlns:a="urn:test:ZZZ" xmlns:a1="urn:test:AAA" a1:attr="marvin"/>
+</p2>]]></expected>
+ </test>
+
+ <test name="adopt_recon_attr_6">
+ <!-- Shadowed and conflicting prefix. dest-parent NOT given. -->
+ <doc name="doc1"><![CDATA[<p1 xmlns:a="urn:test:AAA" a:attr="marvin"/>]]></doc>
+ <doc name="doc2"><![CDATA[<p2 xmlns:a="urn:test:AAA"><a:p3 xmlns:a="urn:test:ZZZ"/></p2>]]></doc>
+ <var name="attr">
+ <xpath doc="doc1" select-node="/p1/@a:attr">
+ <reg-ns prefix="a" ns="urn:test:AAA"/>
+ </xpath>
+ </var>
+ <var name="p3">
+ <xpath doc="doc2" select-node="/p2/a:p3">
+ <reg-ns prefix="a" ns="urn:test:ZZZ"/>
+ </xpath>
+ </var>
+ <adopt dest-doc="doc2" node="attr"/>
+ <append-child parent="p3" child="attr"/>
+ <reconcile-ns node="p3"/>
+ <expected doc="doc2"><![CDATA[
+<p2 xmlns:a="urn:test:AAA">
+ <a:p3 xmlns:a="urn:test:ZZZ" xmlns:a1="urn:test:AAA" a1:attr="marvin"/>
+</p2>]]></expected>
+ </test>
+
+ <test name="shadow_1">
+
+ <doc name="doc"><![CDATA[
+<foo xmlns:foo="urn:test:mine">
+ <p xmlns:bar="urn:test:mine"/>
+ <a1>
+ <a2 xmlns:bar="urn:test:OTHER">
+ <foo:a3/>
+ </a2>
+ </a1>
+</foo>
+]]></doc>
+ <var name="a1">
+ <xpath doc="doc" select-node="/foo/a1"/>
+ </var>
+ <var name="p" >
+ <xpath doc="doc" select-node="/foo/p"/>
+ </var>
+ <remove node="a1"/>
+ <append-child parent="p" child="a1"/>
+ <reconcile-ns node="a1"/>
+ <expected doc="doc"><![CDATA[
+<foo xmlns:foo="urn:test:mine">
+ <p xmlns:bar="urn:test:mine">
+ <a1>
+ <a2 xmlns:bar="urn:test:OTHER">
+ <foo:a3/>
+ </a2>
+ </a1>
+ </p>
+</foo>
+]]></expected>
+ </test>
+
+ <test name="norm_1">
+
+ <doc name="doc"><![CDATA[
+<foo>
+ <p1 xmlns:a="urn:test:A" xmlns:b="urn:test:B" xmlns:c="urn:test:C">
+ <a:a>
+ <b:b a:attr="dont" c:attr="panic"/>
+ </a:a>
+ </p1>
+ <p2/>
+</foo>
+]]></doc>
+ <var name="a">
+ <xpath doc="doc" select-node="/foo/p1/a:a">
+ <reg-ns prefix="a" ns="urn:test:A"/>
+ </xpath>
+ </var>
+ <var name="p2" >
+ <xpath doc="doc" select-node="/foo/p2"/>
+ </var>
+ <remove node="a"/>
+ <append-child parent="p2" child="a"/>
+ <reconcile-ns node="a"/>
+ <expected doc="doc"><![CDATA[
+<foo>
+ <p1 xmlns:a="urn:test:A" xmlns:b="urn:test:B" xmlns:c="urn:test:C"/>
+ <p2>
+ <a:a xmlns:a="urn:test:A">
+ <b:b xmlns:b="urn:test:B" xmlns:c="urn:test:C" a:attr="dont" c:attr="panic"/>
+ </a:a>
+ </p2>
+</foo>
+]]></expected>
+ </test>
+</tests>
diff --git a/test/nsclean.xml b/test/nsclean.xml
new file mode 100644
index 0000000..c293ddb
--- /dev/null
+++ b/test/nsclean.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<article xmlns="tag:foofoofoofoofoofoofoofoo"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:dcterms="http://purl.org/dc/terms/">
+<foop:content xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:foop="tag:foofoofoofoofoofoofoofoo">
+</foop:content>
+</article>
+
diff --git a/test/relaxng/compare0.rng b/test/relaxng/compare0.rng
new file mode 100644
index 0000000..a0446c8
--- /dev/null
+++ b/test/relaxng/compare0.rng
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<element name="number" xmlns="http://relaxng.org/ns/structure/1.0"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <attribute name="att1">
+ <value type="integer"> 1 </value>
+ </attribute>
+</element>
+
diff --git a/test/relaxng/compare0_0.xml b/test/relaxng/compare0_0.xml
new file mode 100644
index 0000000..6a74b2f
--- /dev/null
+++ b/test/relaxng/compare0_0.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" ?>
+<number att1="x"></number>
+
diff --git a/test/relaxng/docbook.rng b/test/relaxng/docbook.rng
index 996e800..85a6aed 100644
--- a/test/relaxng/docbook.rng
+++ b/test/relaxng/docbook.rng
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Id: docbook.rng,v 1.1 2003/03/19 21:02:28 veillard Exp $ -->
+<!-- $Id: docbook.rng,v 1.5 2001/10/23 05:56:47 jjc Exp $ -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
diff --git a/test/relaxng/docbook_0.xml b/test/relaxng/docbook_0.xml
index 6fe6253..963d8e7 100644
--- a/test/relaxng/docbook_0.xml
+++ b/test/relaxng/docbook_0.xml
@@ -4,6 +4,7 @@
<!ENTITY version "1.0.53">
<!ENTITY mdash "--">
<!ENTITY hellip "...">
+<!ENTITY copy "&#x00A9;"> <!-- COPYRIGHT SIGN -->
<!-- replace version above with actual application version number-->
<!-- Template Version: 1.0.1 (do not remove this line) -->
diff --git a/test/relaxng/spec.rng b/test/relaxng/spec.rng
index 0852546..9650f71 100644
--- a/test/relaxng/spec.rng
+++ b/test/relaxng/spec.rng
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Id: spec.rng,v 1.1 2003/03/19 21:02:29 veillard Exp $ -->
+<!-- $Id: spec.rng,v 1.3 2001/10/23 05:54:24 jjc Exp $ -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns:p="http://relaxng.org/ns/proofsystem">
diff --git a/test/relaxng/spec_0.xml b/test/relaxng/spec_0.xml
index 733eb6e..cb8f7be 100644
--- a/test/relaxng/spec_0.xml
+++ b/test/relaxng/spec_0.xml
@@ -11,7 +11,7 @@
<article status="Committee Specification" xmlns:p="http://relaxng.org/ns/proofsystem">
<articleinfo>
-<releaseinfo>$Id: spec_0.xml,v 1.1 2003/03/19 21:02:29 veillard Exp $</releaseinfo>
+<releaseinfo>$Id: spec.xml,v 1.159 2001/12/02 12:12:12 jjc Exp $</releaseinfo>
<title>RELAX NG Specification</title>
<authorgroup>
<editor>
@@ -29,7 +29,7 @@
</authorgroup>
<pubdate>3 December 2001</pubdate>
<releaseinfo role="meta">
-$Id: spec_0.xml,v 1.1 2003/03/19 21:02:29 veillard Exp $
+$Id: spec.xml,v 1.159 2001/12/02 12:12:12 jjc Exp $
</releaseinfo>
<copyright><year>2001</year><holder>OASIS</holder></copyright>
diff --git a/test/schemas/bug145246_0.xml b/test/schemas/bug145246_0.xml
index 6e53ac4..09050c6 100644
--- a/test/schemas/bug145246_0.xml
+++ b/test/schemas/bug145246_0.xml
@@ -1,6 +1,6 @@
<?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 $
+<!-- $Id: gitkTemplate_message.xml.in,v 1.11 2004/01/07 14:21:17 ensonic Exp $
* @file gitkTemplate_message.xml
* @author Stefan Kost <ensonic@users.sf.net>
* @date Thu Jan 17 11:22:38 2002
diff --git a/test/schemas/bug145246_0.xsd b/test/schemas/bug145246_0.xsd
index f51520d..9cfe8c6 100644
--- a/test/schemas/bug145246_0.xsd
+++ b/test/schemas/bug145246_0.xsd
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<!--
- * $Id: bug145246_0.xsd,v 1.1 2004/08/10 14:17:33 veillard Exp $
+ * $Id: giml.xsd,v 1.3 2004/06/25 09:03:53 ensonic Exp $
* @file giml.xsd
* @author Stefan Kost <ensonic@users.sf.net>
* @date Thu Jun 24 17:28:26 MEST 2004
diff --git a/test/schemas/bug303566_1.xml b/test/schemas/bug303566_1.xml
new file mode 100644
index 0000000..1bf56dc
--- /dev/null
+++ b/test/schemas/bug303566_1.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<Test
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="bug303566_1.xsd">
+ <Country code="D">
+ <City name="Berlin"
+ code="B">
+ <Part country="D"/>
+ <Part country="B"/>
+ </City>
+ </Country>
+ <Country code="F">
+ <City name="Paris" code="P">
+ <Part country="F"/>
+ <Part country="F"/>
+ </City>
+ </Country>
+</Test>
+
diff --git a/test/schemas/bug303566_1.xsd b/test/schemas/bug303566_1.xsd
new file mode 100644
index 0000000..fee99f7
--- /dev/null
+++ b/test/schemas/bug303566_1.xsd
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:simpleType name="codeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="[A-Z]+"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="Test">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Country"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Country">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="City"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="code"
+ type="codeType"
+ use="required"/>
+ </xsd:complexType>
+ <xsd:key name="CountryDummyKey">
+ <xsd:selector xpath="."/>
+ <xsd:field xpath="@code"/>
+ </xsd:key>
+ <xsd:keyref name="PartRefCountryDummy"
+ refer="CountryDummyKey">
+ <xsd:selector xpath=".//Part"/>
+ <xsd:field xpath="@country"/>
+ </xsd:keyref>
+ </xsd:element>
+
+ <xsd:element name="City">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Part"
+ minOccurs="2"
+ maxOccurs="2"/>
+ </xsd:sequence>
+ <xsd:attribute name="name"
+ type="xsd:string"
+ use="required"/>
+ <xsd:attribute name="code"
+ type="xsd:string"
+ use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Part">
+ <xsd:complexType>
+ <xsd:attribute name="country"
+ type="codeType"
+ use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/bug306806_0.xml b/test/schemas/bug306806_0.xml
new file mode 100644
index 0000000..90c55e1
--- /dev/null
+++ b/test/schemas/bug306806_0.xml
@@ -0,0 +1,111 @@
+<?xml version = '1.0'?>
+<targetGeometry
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:noNamespaceSchemaLocation='bug306806_1.xsd'>
+ <!-- type 1 cylinder (original) -->
+ <component name="1502">
+ <description>/all/turbine/r.turbshaft</description>
+ <cylinder name="s.turbshaft">
+ <radius dimension='L' Length='inch'> 1.375 </radius>
+ <length dimension='L' Length='inch'> 30.250 </length>
+ <cyl-transform>
+ <translation dimension='L' Length='inch'> -13.125 0.000 0.000</translation>
+ <rotation dimension='L' Length='degree'> -0.000 90.000 0.000</rotation>
+ </cyl-transform>
+ <description>/all/turbine/r.turbshaft/s.turbshaft</description>
+ </cylinder>
+ </component>
+
+<geometryGroup name='g0'>
+ <!-- type 2 cylinder (new, version2) -->
+ <component name="1502">
+ <description>/all/turbine/r.turbshaft</description>
+ <cylinder name="s.turbshaft">
+ <radius dimension='L' Length='inch'> 1.375 </radius>
+ <base1 dimension='L' Length='inch'> 0 0 0 </base1>
+ <base2 dimension='L' Length='inch'> 1.1 1.1 1.1 </base2>
+ <description>/all/turbine/r.turbshaft/s.turbshaft</description>
+ </cylinder>
+ </component>
+
+<geometryGroup name='g1'>
+ <!-- type 2 cylinder (new, version2) -->
+ <component name="1502">
+ <description>/all/turbine/r.turbshaft</description>
+ <cylinder name="s.turbshaft">
+ <radius dimension='L' Length='inch'> 1.375 </radius>
+ <base1 dimension='L' Length='inch'> 0 0 0 </base1>
+ <base2 dimension='L' Length='inch'> 1.1 1.1 1.1 </base2>
+ <description>/all/turbine/r.turbshaft/s.turbshaft</description>
+ </cylinder>
+ </component>
+</geometryGroup>
+
+ <!-- type 2 cylinder (new, version2) -->
+ <component name="1502">
+ <description>/all/turbine/r.turbshaft</description>
+ <cylinder name="s.turbshaft">
+ <radius dimension='L' Length='inch'> 1.375 </radius>
+ <base1 dimension='L' Length='inch'> 0 0 0 </base1>
+ <base2 dimension='L' Length='inch'> 1.1 1.1 1.1 </base2>
+ <description>/all/turbine/r.turbshaft/s.turbshaft</description>
+ </cylinder>
+ </component>
+
+ <!-- type 2 cylinder (new, version2) -->
+ <component name="1502">
+ <description>/all/turbine/r.turbshaft</description>
+ <cylinder name="s.turbshaft">
+ <radius dimension='L' Length='inch'> 1.375 </radius>
+ <base1 dimension='L' Length='inch'> 0 0 0 </base1>
+ <base2 dimension='L' Length='inch'> 1.1 1.1 1.1 </base2>
+ <description>/all/turbine/r.turbshaft/s.turbshaft</description>
+ </cylinder>
+ </component>
+</geometryGroup>
+
+ <!-- type 2 cylinder (new, version2) -->
+ <component name="1502">
+ <description>/all/turbine/r.turbshaft</description>
+ <cylinder name="s.turbshaft">
+ <radius dimension='L' Length='inch'> 1.375 </radius>
+ <base1 dimension='L' Length='inch'> 0 0 0 </base1>
+ <base2 dimension='L' Length='inch'> 1.1 1.1 1.1 </base2>
+ <description>/all/turbine/r.turbshaft/s.turbshaft</description>
+ </cylinder>
+ </component>
+
+ <!-- type 2 cylinder (new, version2) -->
+ <component name="1502">
+ <description>/all/turbine/r.turbshaft</description>
+ <cylinder name="s.turbshaft">
+ <radius dimension='L' Length='inch'> 1.375 </radius>
+ <base1 dimension='L' Length='inch'> 0 0 0 </base1>
+ <base2 dimension='L' Length='inch'> 1.1 1.1 1.1 </base2>
+ <description>/all/turbine/r.turbshaft/s.turbshaft</description>
+ </cylinder>
+ </component>
+
+ <!-- type 2 cylinder (new, version2) -->
+ <component name="1502">
+ <description>/all/turbine/r.turbshaft</description>
+ <cylinder name="s.turbshaft">
+ <radius dimension='L' Length='inch'> 1.375 </radius>
+ <base1 dimension='L' Length='inch'> 0 0 0 </base1>
+ <base2 dimension='L' Length='inch'> 1.1 1.1 1.1 </base2>
+ <description>/all/turbine/r.turbshaft/s.turbshaft</description>
+ </cylinder>
+ </component>
+
+ <!-- type 2 cylinder (new, version2) -->
+ <component name="1502">
+ <description>/all/turbine/r.turbshaft</description>
+ <cylinder name="s.turbshaft">
+ <radius dimension='L' Length='inch'> 1.375 </radius>
+ <base1 dimension='L' Length='inch'> 0 0 0 </base1>
+ <base2 dimension='L' Length='inch'> 1.1 1.1 1.1 </base2>
+ <description>/all/turbine/r.turbshaft/s.turbshaft</description>
+ </cylinder>
+ </component>
+
+</targetGeometry>
diff --git a/test/schemas/bug306806_1.xsd b/test/schemas/bug306806_1.xsd
new file mode 100644
index 0000000..edc805d
--- /dev/null
+++ b/test/schemas/bug306806_1.xsd
@@ -0,0 +1,544 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:element name="targetGeometry">
+ <xs:complexType>
+ <xs:group minOccurs="0" maxOccurs="unbounded" ref="geometry-element"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="geometryGroup" type="geometryGroup-content"/>
+ <xs:complexType name="geometryGroup-content">
+ <xs:group maxOccurs="unbounded" ref="geometry-element"/>
+ <xs:attribute name="name" use="required" type="xs:token"/>
+ </xs:complexType>
+ <xs:group name="geometry-element">
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="component"/>
+ <xs:element ref="geometryGroup"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:group>
+ <xs:element name="component">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="description"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="cylinder"/>
+ <xs:element ref="ellipsoid"/>
+ <xs:element ref="faceSet"/>
+ <xs:element ref="tube"/>
+ <xs:element ref="sphere"/>
+ <xs:element ref="box"/>
+ <xs:element ref="extrusion"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attributeGroup ref="name-attribute"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="translation">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="three-doubles-list">
+ <xs:attributeGroup ref="dimension-attribute"/>
+ <xs:attributeGroup ref="Length-attribute"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="rotation">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="three-doubles-list">
+ <xs:attributeGroup ref="dimension-attribute"/>
+ <xs:attributeGroup ref="Length-attribute"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="about">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="three-doubles-list">
+ <xs:attributeGroup ref="dimension-attribute"/>
+ <xs:attributeGroup ref="Length-attribute"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="length">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:restriction base="xs:anyType">
+ <xs:simpleType>
+ <xs:restriction base="xs:double">
+ <xs:minExclusive value="0"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attributeGroup ref="dimension-attribute"/>
+ <xs:attributeGroup ref="Length-attribute"/>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="radius">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:restriction base="xs:anyType">
+ <xs:simpleType>
+ <xs:restriction base="xs:double">
+ <xs:minExclusive value="0"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attributeGroup ref="dimension-attribute"/>
+ <xs:attributeGroup ref="Length-attribute"/>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="base1">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="three-doubles-list">
+ <xs:attributeGroup ref="dimension-attribute"/>
+ <xs:attributeGroup ref="Length-attribute"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="base2">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="three-doubles-list">
+ <xs:attributeGroup ref="dimension-attribute"/>
+ <xs:attributeGroup ref="Length-attribute"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="transform">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="translation"/>
+ <xs:element minOccurs="0" ref="rotation"/>
+ <xs:element minOccurs="0" ref="about"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="cyl-transform">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="translation"/>
+ <xs:element minOccurs="0" ref="rotation"/>
+ <xs:element minOccurs="0" ref="about"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="cylinder">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="radius"/>
+ <xs:choice>
+ <xs:choice>
+ <xs:element ref="length"/>
+ <xs:element ref="cyl-transform"/>
+ </xs:choice>
+ <xs:choice>
+ <xs:element ref="base1"/>
+ <xs:element ref="base2"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="transform"/>
+ </xs:choice>
+ </xs:choice>
+ <xs:element ref="description"/>
+ <xs:element ref="vMaterial"/>
+ </xs:choice>
+ <xs:attributeGroup ref="name-attribute"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="ellipsoid">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="radius">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="three-doubles-list">
+ <xs:attributeGroup ref="length-attribute"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element ref="vMaterial"/>
+ <xs:element ref="transform"/>
+ </xs:choice>
+ <xs:attributeGroup ref="name-attribute"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="faceSet">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="description"/>
+ <xs:element ref="vertex_normals"/>
+ <xs:element ref="vertices"/>
+ <xs:element ref="facets"/>
+ <xs:group ref="optional-content"/>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:token"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="facets" type="facets-content"/>
+ <xs:simpleType name="facets-content">
+ <xs:restriction base="integer-list"/>
+ </xs:simpleType>
+ <xs:element name="vertex_normals" type="vertex_normals-content"/>
+ <xs:complexType name="vertex_normals-content">
+ <xs:simpleContent>
+ <xs:restriction base="xs:anyType">
+ <xs:simpleType>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ <xs:minLength value="9"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attributeGroup ref="length-attribute"/>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:element name="vertices" type="vertices-content"/>
+ <xs:complexType name="vertices-content">
+ <xs:simpleContent>
+ <xs:restriction base="xs:anyType">
+ <xs:simpleType>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ <xs:minLength value="9"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attributeGroup ref="length-attribute"/>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:element name="tube" type="tube-content"/>
+ <xs:complexType name="tube-content">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="spine"/>
+ <xs:element ref="radius"/>
+ <xs:group ref="optional-content"/>
+ </xs:choice>
+ <xs:attributeGroup ref="name-attribute"/>
+ </xs:complexType>
+ <xs:element name="spine" type="spine-content"/>
+ <xs:complexType name="spine-content">
+ <xs:simpleContent>
+ <xs:restriction base="xs:anyType">
+ <xs:simpleType>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ <xs:minLength value="6"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attributeGroup ref="length-attribute"/>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:element name="sphere" type="sphere-content"/>
+ <xs:complexType name="sphere-content">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="radius"/>
+ <xs:element ref="position"/>
+ </xs:choice>
+ <xs:attributeGroup ref="name-attribute"/>
+ </xs:complexType>
+ <xs:element name="position" type="position-content"/>
+ <xs:complexType name="position-content">
+ <xs:simpleContent>
+ <xs:extension base="three-doubles-list">
+ <xs:attributeGroup ref="length-attribute"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:element name="box" type="box-content"/>
+ <xs:complexType name="box-content">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="size"/>
+ <xs:choice>
+ <xs:element ref="position"/>
+ <xs:element ref="transform"/>
+ </xs:choice>
+ </xs:choice>
+ <xs:attributeGroup ref="name-attribute"/>
+ </xs:complexType>
+ <xs:element name="size" type="size-content"/>
+ <xs:complexType name="size-content">
+ <xs:simpleContent>
+ <xs:extension base="three-doubles-list">
+ <xs:attributeGroup ref="length-attribute"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:element name="extrusion" type="extrusion-content"/>
+ <xs:complexType name="extrusion-content">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="spine"/>
+ <xs:element ref="scale"/>
+ <xs:element ref="crossSection"/>
+ <xs:group ref="optional-content"/>
+ </xs:choice>
+ <xs:attributeGroup ref="name-attribute"/>
+ </xs:complexType>
+ <xs:element name="scale" type="scale-content"/>
+ <xs:simpleType name="scale-content">
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double"/>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ <xs:minLength value="2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:element name="crossSection" type="crossSection-content"/>
+ <xs:complexType name="crossSection-content">
+ <xs:simpleContent>
+ <xs:restriction base="xs:anyType">
+ <xs:simpleType>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ <xs:minLength value="9"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attributeGroup ref="length-attribute"/>
+ <xs:attributeGroup ref="closed-attribute"/>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:attributeGroup name="closed-attribute">
+ <xs:attribute name="closed" use="required" type="xs:boolean"/>
+ </xs:attributeGroup>
+ <xs:group name="optional-content">
+ <xs:annotation>
+ <xs:documentation>global #############</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="transform"/>
+ <xs:element ref="vMaterial"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:group>
+ <xs:element name="description" type="xs:string"/>
+ <xs:attributeGroup name="length-attribute">
+ <xs:attributeGroup ref="dimension-attribute"/>
+ <xs:attributeGroup ref="Length-attribute"/>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="dimension-attribute">
+ <xs:attribute name="dimension" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="L"/>
+ <xs:enumeration value="F"/>
+ <xs:enumeration value="M"/>
+ <xs:enumeration value="T"/>
+ <xs:enumeration value="F/L"/>
+ <xs:enumeration value="F/LL"/>
+ <xs:enumeration value="F/LLL"/>
+ <xs:enumeration value="F/T"/>
+ <xs:enumeration value="F/TT"/>
+ <xs:enumeration value="F/TTT"/>
+ <xs:enumeration value="L/T"/>
+ <xs:enumeration value="L/TT"/>
+ <xs:enumeration value="LLLLL"/>
+ <xs:enumeration value="D/D"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="Length-attribute">
+ <xs:attribute name="Length" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="meter"/>
+ <xs:enumeration value="m"/>
+ <xs:enumeration value="foot"/>
+ <xs:enumeration value="f"/>
+ <xs:enumeration value="inch"/>
+ <xs:enumeration value="in"/>
+ <xs:enumeration value="centimeter"/>
+ <xs:enumeration value="cm"/>
+ <xs:enumeration value="decimeter"/>
+ <xs:enumeration value="dm"/>
+ <xs:enumeration value="millimeter"/>
+ <xs:enumeration value="mm"/>
+ <xs:enumeration value="degree"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="Time-attribute">
+ <xs:attribute name="Time" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="second"/>
+ <xs:enumeration value="s"/>
+ <xs:enumeration value="sec"/>
+ <xs:enumeration value="minute"/>
+ <xs:enumeration value="min"/>
+ <xs:enumeration value="hour"/>
+ <xs:enumeration value="hr"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="Force-attribute">
+ <xs:attribute name="Force" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="newton"/>
+ <xs:enumeration value="n"/>
+ <xs:enumeration value="pound"/>
+ <xs:enumeration value="grain"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="Mass-attribute">
+ <xs:attribute name="Mass" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="kilogram"/>
+ <xs:enumeration value="kg"/>
+ <xs:enumeration value="gram"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="Dimensionless-attribute">
+ <xs:attribute name="Dimensionless" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="radian"/>
+ <xs:enumeration value="rad"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:simpleType name="three-doubles-list">
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:double xs:double xs:double"/>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ <xs:length value="3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="integer-list">
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:integer xs:integer"/>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ <xs:minLength value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attributeGroup name="name-attribute">
+ <xs:attribute name="name" use="required" type="xs:token"/>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="description-attribute">
+ <xs:attribute name="description" use="required"/>
+ </xs:attributeGroup>
+ <xs:element name="vMaterial">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="diffuseColor"/>
+ <xs:element minOccurs="0" ref="emissiveColor"/>
+ <xs:element minOccurs="0" ref="specularColor"/>
+ <xs:element minOccurs="0" ref="shininess"/>
+ <xs:element minOccurs="0" ref="transparency"/>
+ <xs:element minOccurs="0" ref="ambientIntensity"/>
+ <xs:element minOccurs="0" ref="DEF"/>
+ <xs:element minOccurs="0" ref="USE"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="diffuseColor" type="xs:string"/>
+ <xs:element name="emissiveColor" type="xs:string"/>
+ <xs:element name="specularColor" type="xs:string"/>
+ <xs:element name="shininess" type="xs:string"/>
+ <xs:element name="transparency" type="xs:string"/>
+ <xs:element name="ambientIntensity" type="xs:string"/>
+ <xs:element name="DEF" type="xs:string"/>
+ <xs:element name="USE" type="xs:string"/>
+</xs:schema>
diff --git a/test/schemas/bug309338_0.xml b/test/schemas/bug309338_0.xml
new file mode 100644
index 0000000..33cbf95
--- /dev/null
+++ b/test/schemas/bug309338_0.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<foo xmlns="urn:test:foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:test:foo bug309338.xsd">2000.00</foo>
diff --git a/test/schemas/bug309338_1.xsd b/test/schemas/bug309338_1.xsd
new file mode 100644
index 0000000..0aa586c
--- /dev/null
+++ b/test/schemas/bug309338_1.xsd
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:f="urn:test:foo"
+ targetNamespace="urn:test:foo">
+ <xsd:element name="foo" type="f:fooType"/>
+
+ <xsd:simpleType name="fooType">
+ <xsd:restriction base="xsd:decimal">
+ <xsd:minExclusive value="0"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/changelog093_0.xml b/test/schemas/changelog093_0.xml
new file mode 100644
index 0000000..4b49612
--- /dev/null
+++ b/test/schemas/changelog093_0.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<changelog
+ xmlns="http://www.blackperl.com/XML/ChangeLog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.blackperl.com/XML/ChangeLog changelog093.xsd">
+ <description lang="PL"/>
+ <description lang="PL"/>
+ <release version="1" date="2005-04-08T21:12:00">
+ <item>
+ <file path="abc"/>
+ <description lang="FR"/>
+ </item>
+ </release>
+</changelog>
diff --git a/test/schemas/changelog093_1.xsd b/test/schemas/changelog093_1.xsd
new file mode 100644
index 0000000..cf2bcc6
--- /dev/null
+++ b/test/schemas/changelog093_1.xsd
@@ -0,0 +1,253 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.blackperl.com/XML/ChangeLog"
+ targetNamespace="http://www.blackperl.com/XML/ChangeLog"
+ elementFormDefault="qualified" attributeFormDefault="unqualified"
+ version="0.93" id="changelog0.93">
+ <!--
+ Refer to this schema using the following namespace:
+ http://www.blackperl.com/XML/ChangeLog
+ -->
+ <xsd:annotation>
+ <xsd:documentation>
+ A description of an XML application which itemizes changes over the
+ life-span of a software project. Changes are tracked by releases, with a
+ granularity of individual items made up of files that were affected.
+ </xsd:documentation>
+ <xsd:appinfo xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <dc:creator>Randy J. Ray (rjray@blackperl.com)</dc:creator>
+ <dc:date>2004-11-22</dc:date>
+ <dc:subject>changelog,xml,schema</dc:subject>
+ <dc:description>
+ An XML Schema declaration describing an XML expression of software
+ project change-logs.
+ </dc:description>
+ </xsd:appinfo>
+ <xsd:appinfo>
+ <rdf:RDF xmlns:cc="http://web.resource.org/cc/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <cc:Work rdf:about="">
+ <dc:title>XML Schema for Changelogs</dc:title>
+ <dc:description>
+ An XML Schema declaration describing an XML expression of software
+ project change-logs.
+ </dc:description>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Randy J. Ray</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>Randy J. Ray</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
+ <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+ </cc:Work>
+ <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+ <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:requires rdf:resource="http://web.resource.org/cc/Attribution" />
+ <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </xsd:appinfo>
+ </xsd:annotation>
+
+ <xsd:complexType id="informationType" name="informationType"
+ mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ An open-ended container type for including version-control information
+ at various levels within the changelog structure. This is the only
+ type which explicitly permits content from foreign namespaces.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence maxOccurs="unbounded" minOccurs="0">
+ <xsd:any processContents="lax" />
+ </xsd:sequence>
+ <xsd:attribute name="source" type="xsd:anyURI" />
+ <xsd:anyAttribute namespace="##other" processContents="lax" />
+ </xsd:complexType>
+
+ <xsd:complexType id="descriptionType" name="descriptionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ A description block is used to document everything from specific change
+ items to the release as a whole.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute default="en-US" name="lang" type="xsd:language" />
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType id="versionString" name="versionString">
+ <xsd:annotation>
+ <xsd:documentation>
+ The versionString type is applied to attributes that describe simple
+ revision-number strings. It only supports CVS (RCS) styled version
+ numbers.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="\d+(\.\d+)*" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType id="fileType" name="fileType">
+ <xsd:annotation>
+ <xsd:documentation>
+ The fileType definition is used for the file element, a part of the
+ itemType declaration. It is defined separately so that it can be
+ referred to from multiple places.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence maxOccurs="1" minOccurs="0">
+ <xsd:element name="description" type="tns:descriptionType"
+ minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element maxOccurs="1" minOccurs="0" name="vc-information"
+ type="tns:informationType" nillable="true" />
+ </xsd:sequence>
+ <xsd:attribute name="path" type="xsd:string" use="required" />
+ <xsd:attribute name="revision" type="tns:versionString" use="optional"/>
+ <xsd:attribute name="author" type="xsd:NMTOKEN" use="optional" />
+ <xsd:attribute name="action" use="optional">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="ADD" />
+ <xsd:enumeration value="DELETE" />
+ <xsd:enumeration value="RESTORE" />
+ <xsd:enumeration value="MOVE" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="note" type="xsd:string" use="optional" />
+ </xsd:complexType>
+
+ <xsd:element id="file" name="file" nillable="true" type="tns:fileType">
+ <xsd:annotation>
+ <xsd:documentation>
+ A file element contains a single block representing a fileType.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:unique name="fileDescriptionLangConstraint">
+ <xsd:selector xpath="tns:description" />
+ <xsd:field xpath="@lang" />
+ </xsd:unique>
+ </xsd:element>
+
+ <xsd:complexType id="itemType" name="itemType">
+ <xsd:annotation>
+ <xsd:documentation>
+ These element blocks define a single change-item within the scope of a
+ given release. A change-item consists of one or more files that were
+ affected, and a description of the change itself.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element maxOccurs="1" minOccurs="0" name="vc-information"
+ type="tns:informationType" nillable="true" />
+ <xsd:choice minOccurs="1" maxOccurs="1">
+ <xsd:element ref="tns:file" />
+ <xsd:element name="fileset" nillable="false">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element maxOccurs="1" minOccurs="0" name="vc-information"
+ type="tns:informationType" nillable="true" />
+ <xsd:element maxOccurs="unbounded" minOccurs="1" ref="tns:file" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:element name="description" type="tns:descriptionType"
+ minOccurs="1" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID" />
+ </xsd:complexType>
+
+ <xsd:element id="item" name="item" nillable="false" type="tns:itemType">
+ <xsd:annotation>
+ <xsd:documentation>
+ An item element contains a single block representing an itemType.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:unique name="itemDescriptionLangConstraint">
+ <xsd:selector xpath="tns:description" />
+ <xsd:field xpath="@lang" />
+ </xsd:unique>
+ </xsd:element>
+
+ <xsd:complexType id="releaseType" name="releaseType">
+ <xsd:annotation>
+ <xsd:documentation>
+ The release is the primary piece of information that a changelog
+ collects and organizes. A release contains an optional description,
+ followed by one or more item blocks. The release element is also the
+ greatest user of attributes besides the file element. A release element
+ must have at least a "version" attribute, uniquely identifying the
+ release itself. Additionally, it may have "tag" to associate it with
+ a release-system tag and "date" to specify the date the release was
+ created.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description" type="tns:descriptionType"
+ minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="information"
+ type="tns:informationType" nillable="true" />
+ <xsd:element maxOccurs="1" minOccurs="0" name="vc-information"
+ type="tns:informationType" nillable="true" />
+ <xsd:element maxOccurs="unbounded" minOccurs="1" ref="tns:item" />
+ </xsd:sequence>
+ <xsd:attribute name="version" type="xsd:token" use="required" />
+ <xsd:attribute name="tag" type="xsd:NMTOKEN" />
+ <xsd:attribute name="date" type="xsd:token" use="required" /> <!-- type="xsd:dateTime" -->
+ </xsd:complexType>
+
+ <xsd:element id="release" name="release" nillable="false"
+ type="tns:releaseType">
+ <xsd:annotation>
+ <xsd:documentation>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:unique name="releaseDescriptionLangConstraint">
+ <xsd:selector xpath="tns:description" />
+ <xsd:field xpath="@lang" />
+ </xsd:unique>
+ </xsd:element>
+
+ <xsd:element id="changelog" name="changelog" nillable="false">
+ <xsd:annotation>
+ <xsd:documentation>
+ The changelog element is intended as the document root element. It
+ contains an overview element (identical in structure to the description
+ element, but named differently to prevent collision in XPath queries)
+ and one or more release blocks.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element maxOccurs="unbounded" minOccurs="1" name="description"
+ nillable="false" type="tns:descriptionType" />
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="information"
+ type="tns:informationType" nillable="true" />
+ <xsd:element maxOccurs="1" minOccurs="0" name="vc-information"
+ type="tns:informationType" nillable="true" />
+ <xsd:element maxOccurs="unbounded" minOccurs="1" ref="tns:release" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:unique name="changelogDescriptionLangConstraint">
+ <xsd:selector xpath="tns:description" />
+ <xsd:field xpath="@lang" />
+ </xsd:unique>
+ </xsd:element>
+
+</xsd:schema>
+
diff --git a/test/schemas/empty-value_0.xml b/test/schemas/empty-value_0.xml
new file mode 100644
index 0000000..e7058e2
--- /dev/null
+++ b/test/schemas/empty-value_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<element1/>
diff --git a/test/schemas/empty-value_1.xml b/test/schemas/empty-value_1.xml
new file mode 100644
index 0000000..674ba86
--- /dev/null
+++ b/test/schemas/empty-value_1.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<element2 att="test"/>
diff --git a/test/schemas/empty-value_1.xsd b/test/schemas/empty-value_1.xsd
new file mode 100644
index 0000000..5e17d5f
--- /dev/null
+++ b/test/schemas/empty-value_1.xsd
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+ <xs:simpleType name="myDouble">
+ <xs:union memberTypes="xs:double">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="\s*(N/A)?\s*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ <xs:element name="element1" type="myDouble"/>
+ <xs:element name="element2">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="myDouble">
+ <xs:attribute name="att" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/test/schemas/union2_1.xml b/test/schemas/union2_1.xml
new file mode 100644
index 0000000..e148080
--- /dev/null
+++ b/test/schemas/union2_1.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<ELEMENTS xmlns="urn:test:foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:test:foo union_1.xsd">
+ 5
+</ELEMENTS> \ No newline at end of file
diff --git a/test/schemas/union2_1.xsd b/test/schemas/union2_1.xsd
new file mode 100644
index 0000000..6d83726
--- /dev/null
+++ b/test/schemas/union2_1.xsd
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:test:foo">
+ <xsd:element name="ELEMENTS">
+ <xsd:simpleType>
+ <xsd:union>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:int">
+ <xsd:minInclusive value="10"/>
+ <xsd:maxInclusive value="20"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:int">
+ <xsd:minInclusive value="30"/>
+ <xsd:maxInclusive value="40"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ </xsd:element>
+</xsd:schema> \ No newline at end of file
diff --git a/test/schemas/vdv-complexTypes.xsd b/test/schemas/vdv-complexTypes.xsd
index c320e6d..cd40fb8 100644
--- a/test/schemas/vdv-complexTypes.xsd
+++ b/test/schemas/vdv-complexTypes.xsd
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-complexTypes.xsd,v 1.1 2003/11/25 15:38:59 veillard Exp $ -->
+<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/complexTypes.xsd,v 1.1 2001/11/26 13:27:07 vdv Exp $ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
diff --git a/test/schemas/vdv-first0_0.xml b/test/schemas/vdv-first0_0.xml
index 7d4e662..a12bcad 100644
--- a/test/schemas/vdv-first0_0.xml
+++ b/test/schemas/vdv-first0_0.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first0_0.xml,v 1.1 2003/11/22 20:37:51 veillard Exp $ -->
+<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/first.xml,v 1.2 2001/11/01 22:03:06 vdv Exp $ -->
<library>
<book id="b0836217462" available="true">
<isbn>0836217462</isbn>
diff --git a/test/schemas/vdv-first1_0.xml b/test/schemas/vdv-first1_0.xml
index 10f0409..a12bcad 100644
--- a/test/schemas/vdv-first1_0.xml
+++ b/test/schemas/vdv-first1_0.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first1_0.xml,v 1.1 2003/11/22 20:37:51 veillard Exp $ -->
+<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/first.xml,v 1.2 2001/11/01 22:03:06 vdv Exp $ -->
<library>
<book id="b0836217462" available="true">
<isbn>0836217462</isbn>
diff --git a/test/schemas/vdv-first2_0.xml b/test/schemas/vdv-first2_0.xml
index b652536..a12bcad 100644
--- a/test/schemas/vdv-first2_0.xml
+++ b/test/schemas/vdv-first2_0.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first2_0.xml,v 1.1 2003/11/22 20:37:51 veillard Exp $ -->
+<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/first.xml,v 1.2 2001/11/01 22:03:06 vdv Exp $ -->
<library>
<book id="b0836217462" available="true">
<isbn>0836217462</isbn>
diff --git a/test/schemas/vdv-first2_0.xsd b/test/schemas/vdv-first2_0.xsd
index 5e34e33..c768e97 100644
--- a/test/schemas/vdv-first2_0.xsd
+++ b/test/schemas/vdv-first2_0.xsd
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first2_0.xsd,v 1.1 2003/11/22 20:37:51 veillard Exp $ -->
+<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/first-user-dt.xsd,v 1.1 2001/11/01 12:27:47 vdv Exp $ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="string255">
diff --git a/test/schemas/vdv-first3_0.xml b/test/schemas/vdv-first3_0.xml
index 0b2d7e2..a12bcad 100644
--- a/test/schemas/vdv-first3_0.xml
+++ b/test/schemas/vdv-first3_0.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first3_0.xml,v 1.1 2003/11/22 20:37:51 veillard Exp $ -->
+<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/first.xml,v 1.2 2001/11/01 22:03:06 vdv Exp $ -->
<library>
<book id="b0836217462" available="true">
<isbn>0836217462</isbn>
diff --git a/test/schemas/vdv-first3_0.xsd b/test/schemas/vdv-first3_0.xsd
index 6fd44d6..18b1459 100644
--- a/test/schemas/vdv-first3_0.xsd
+++ b/test/schemas/vdv-first3_0.xsd
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first3_0.xsd,v 1.1 2003/11/22 20:37:51 veillard Exp $ -->
+<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/first-token.xsd,v 1.2 2001/11/01 12:27:47 vdv Exp $ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="name" type="xs:token"/>
diff --git a/test/schemas/vdv-first4_0.xml b/test/schemas/vdv-first4_0.xml
index b44164d..0b2d7e2 100644
--- a/test/schemas/vdv-first4_0.xml
+++ b/test/schemas/vdv-first4_0.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first4_0.xml,v 1.1 2003/11/24 13:04:35 veillard Exp $ -->
+<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first3_0.xml,v 1.1 2003/11/22 20:37:51 veillard Exp $ -->
<library>
<book id="b0836217462" available="true">
<isbn>0836217462</isbn>
diff --git a/test/schemas/vdv-first4_0.xsd b/test/schemas/vdv-first4_0.xsd
index 913a310..9e8e236 100644..100755
--- a/test/schemas/vdv-first4_0.xsd
+++ b/test/schemas/vdv-first4_0.xsd
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first4_0.xsd,v 1.1 2003/11/24 13:04:35 veillard Exp $ -->
+<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/first-complex-types.xsd,v 1.1 2001/11/12 20:54:00 vdv Exp $ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="string255">
diff --git a/test/schemas/vdv-first4_1.xml b/test/schemas/vdv-first4_1.xml
index 535b48f..1259ef2 100644
--- a/test/schemas/vdv-first4_1.xml
+++ b/test/schemas/vdv-first4_1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first4_1.xml,v 1.1 2003/11/24 13:04:35 veillard Exp $ -->
+<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first3_0.xml,v 1.1 2003/11/22 20:37:51 veillard Exp $ -->
<library>
<book id="b0836217462" available="true">
<isbn>0836217462</isbn>
diff --git a/test/schemas/vdv-first4_2.xml b/test/schemas/vdv-first4_2.xml
index 29b2c0e..c4acce6 100644
--- a/test/schemas/vdv-first4_2.xml
+++ b/test/schemas/vdv-first4_2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first4_2.xml,v 1.1 2003/11/24 13:04:35 veillard Exp $ -->
+<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first3_0.xml,v 1.1 2003/11/22 20:37:51 veillard Exp $ -->
<library>
<book id="b0836217462" available="true">
<isbn>0836217462</isbn>
diff --git a/test/schemas/vdv-first5_0.xml b/test/schemas/vdv-first5_0.xml
index 1404219..7d4e662 100644
--- a/test/schemas/vdv-first5_0.xml
+++ b/test/schemas/vdv-first5_0.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first5_0.xml,v 1.1 2003/11/25 15:38:59 veillard Exp $ -->
+<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first0_0.xml,v 1.1 2003/11/22 20:37:51 veillard Exp $ -->
<library>
<book id="b0836217462" available="true">
<isbn>0836217462</isbn>
diff --git a/test/schemas/vdv-first5_0.xsd b/test/schemas/vdv-first5_0.xsd
index bb9b7ef..6d5ffaa 100644
--- a/test/schemas/vdv-first5_0.xsd
+++ b/test/schemas/vdv-first5_0.xsd
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-first5_0.xsd,v 1.1 2003/11/25 15:38:59 veillard Exp $ -->
+<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/first-building-blocks.xsd,v 1.1 2001/11/26 13:27:07 vdv Exp $ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="vdv-simpleTypes.xsd"/>
diff --git a/test/schemas/vdv-simpleTypes.xsd b/test/schemas/vdv-simpleTypes.xsd
index 68f7c82..79f95fd 100644
--- a/test/schemas/vdv-simpleTypes.xsd
+++ b/test/schemas/vdv-simpleTypes.xsd
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /cvs/gnome/gnome-xml/test/schemas/vdv-simpleTypes.xsd,v 1.1 2003/11/25 15:38:59 veillard Exp $ -->
+<!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/simpleTypes.xsd,v 1.1 2001/11/26 13:27:08 vdv Exp $ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="string255">
diff --git a/test/winblanks.xml b/test/winblanks.xml
new file mode 100644
index 0000000..8f937f2
--- /dev/null
+++ b/test/winblanks.xml
@@ -0,0 +1,5 @@
+<a>
+ <B>
+ <C/>
+</B>
+</a> \ No newline at end of file
diff --git a/test/xsdtest/.memdump b/test/xsdtest/.memdump
index b4701ba..b7ff535 100644
--- a/test/xsdtest/.memdump
+++ b/test/xsdtest/.memdump
@@ -1,4 +1,4 @@
- 12:22:54 PM
+ 02:58:50 PM
- MEMORY ALLOCATED : 0, MAX was 592063
+ MEMORY ALLOCATED : 0, MAX was 649069
BLOCK NUMBER SIZE TYPE