summaryrefslogtreecommitdiff
path: root/test/threads
diff options
context:
space:
mode:
Diffstat (limited to 'test/threads')
-rw-r--r--test/threads/.memdump4
-rw-r--r--test/threads/a.example.org.xml6
-rw-r--r--test/threads/a/a.dtd1
-rw-r--r--test/threads/abc.dtd7
-rw-r--r--test/threads/abc.xml7
-rw-r--r--test/threads/acb.dtd7
-rw-r--r--test/threads/acb.xml7
-rw-r--r--test/threads/b.example.org.xml6
-rw-r--r--test/threads/b/b.dtd2
-rw-r--r--test/threads/bac.dtd7
-rw-r--r--test/threads/bac.xml7
-rw-r--r--test/threads/bca.dtd7
-rw-r--r--test/threads/bca.xml7
-rw-r--r--test/threads/c.example.org.xml6
-rw-r--r--test/threads/c/c.dtd1
-rw-r--r--test/threads/cab.dtd7
-rw-r--r--test/threads/cab.xml7
-rw-r--r--test/threads/cba.dtd7
-rw-r--r--test/threads/cba.xml7
-rw-r--r--test/threads/complex.xml6
-rw-r--r--test/threads/example.org.xml9
-rw-r--r--test/threads/invalid.xml2
-rw-r--r--test/threads/res80
23 files changed, 207 insertions, 0 deletions
diff --git a/test/threads/.memdump b/test/threads/.memdump
new file mode 100644
index 0000000..706dd2f
--- /dev/null
+++ b/test/threads/.memdump
@@ -0,0 +1,4 @@
+ 12:33:11 PM
+
+ MEMORY ALLOCATED : 0, MAX was 15480
+BLOCK NUMBER SIZE TYPE
diff --git a/test/threads/a.example.org.xml b/test/threads/a.example.org.xml
new file mode 100644
index 0000000..3de2c45
--- /dev/null
+++ b/test/threads/a.example.org.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+<rewriteSystem systemIdStartString="http://example.org/a" rewritePrefix="a"/>
+<nextCatalog catalog="c.example.org.xml"/>
+</catalog>
diff --git a/test/threads/a/a.dtd b/test/threads/a/a.dtd
new file mode 100644
index 0000000..b298085
--- /dev/null
+++ b/test/threads/a/a.dtd
@@ -0,0 +1 @@
+<!ELEMENT a (#PCDATA)>
diff --git a/test/threads/abc.dtd b/test/threads/abc.dtd
new file mode 100644
index 0000000..b7a08fe
--- /dev/null
+++ b/test/threads/abc.dtd
@@ -0,0 +1,7 @@
+<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
+%a;
+<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
+%b;
+<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
+%c;
+<!ELEMENT abc (a, b, c)>
diff --git a/test/threads/abc.xml b/test/threads/abc.xml
new file mode 100644
index 0000000..ee98144
--- /dev/null
+++ b/test/threads/abc.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE abc SYSTEM "http://example.org/abc.dtd">
+<abc>
+ <a>Let's use predefined entites &amp; &lt; &gt;</a>
+ <b>Let's use a DTD defined entity &bent;</b>
+ <c/>
+</abc>
+
diff --git a/test/threads/acb.dtd b/test/threads/acb.dtd
new file mode 100644
index 0000000..9fc77c5
--- /dev/null
+++ b/test/threads/acb.dtd
@@ -0,0 +1,7 @@
+<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
+%a;
+<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
+%c;
+<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
+%b;
+<!ELEMENT acb (a, c, b)>
diff --git a/test/threads/acb.xml b/test/threads/acb.xml
new file mode 100644
index 0000000..a14e362
--- /dev/null
+++ b/test/threads/acb.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE acb SYSTEM "http://example.org/acb.dtd">
+<acb>
+ <a>Let's use predefined entites &amp; &lt; &gt;</a>
+ <c/>
+ <b>Let's use a DTD defined entity &bent;</b>
+</acb>
+
diff --git a/test/threads/b.example.org.xml b/test/threads/b.example.org.xml
new file mode 100644
index 0000000..2dfe5fc
--- /dev/null
+++ b/test/threads/b.example.org.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+<rewriteSystem systemIdStartString="http://example.org/b" rewritePrefix="b"/>
+<nextCatalog catalog="c.example.org.xml"/>
+</catalog>
diff --git a/test/threads/b/b.dtd b/test/threads/b/b.dtd
new file mode 100644
index 0000000..59de88e
--- /dev/null
+++ b/test/threads/b/b.dtd
@@ -0,0 +1,2 @@
+<!ELEMENT b (#PCDATA)>
+<!ENTITY bent "the b entity">
diff --git a/test/threads/bac.dtd b/test/threads/bac.dtd
new file mode 100644
index 0000000..d36a4e6
--- /dev/null
+++ b/test/threads/bac.dtd
@@ -0,0 +1,7 @@
+<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
+%b;
+<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
+%a;
+<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
+%c;
+<!ELEMENT bac (b, a, c)>
diff --git a/test/threads/bac.xml b/test/threads/bac.xml
new file mode 100644
index 0000000..63d6efc
--- /dev/null
+++ b/test/threads/bac.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE bac SYSTEM "http://example.org/bac.dtd">
+<bac>
+ <b>Let's use a DTD defined entity &bent;</b>
+ <a>Let's use predefined entites &amp; &lt; &gt;</a>
+ <c/>
+</bac>
+
diff --git a/test/threads/bca.dtd b/test/threads/bca.dtd
new file mode 100644
index 0000000..239192a
--- /dev/null
+++ b/test/threads/bca.dtd
@@ -0,0 +1,7 @@
+<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
+%b;
+<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
+%c;
+<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
+%a;
+<!ELEMENT bca (b, c, a)>
diff --git a/test/threads/bca.xml b/test/threads/bca.xml
new file mode 100644
index 0000000..ce60d01
--- /dev/null
+++ b/test/threads/bca.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE bca SYSTEM "http://example.org/bca.dtd">
+<bca>
+ <b>Let's use a DTD defined entity &bent;</b>
+ <c/>
+ <a>Let's use predefined entites &amp; &lt; &gt;</a>
+</bca>
+
diff --git a/test/threads/c.example.org.xml b/test/threads/c.example.org.xml
new file mode 100644
index 0000000..41348b1
--- /dev/null
+++ b/test/threads/c.example.org.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+<rewriteSystem systemIdStartString="http://example.org/c" rewritePrefix="c"/>
+<rewriteSystem systemIdStartString="http://example.org/" rewritePrefix="./"/>
+</catalog>
diff --git a/test/threads/c/c.dtd b/test/threads/c/c.dtd
new file mode 100644
index 0000000..7248a5b
--- /dev/null
+++ b/test/threads/c/c.dtd
@@ -0,0 +1 @@
+<!ELEMENT c EMPTY>
diff --git a/test/threads/cab.dtd b/test/threads/cab.dtd
new file mode 100644
index 0000000..0a62e91
--- /dev/null
+++ b/test/threads/cab.dtd
@@ -0,0 +1,7 @@
+<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
+%c;
+<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
+%a;
+<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
+%b;
+<!ELEMENT cab (c, a, b)>
diff --git a/test/threads/cab.xml b/test/threads/cab.xml
new file mode 100644
index 0000000..a1631d0
--- /dev/null
+++ b/test/threads/cab.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE cab SYSTEM "http://example.org/cab.dtd">
+<cab>
+ <c/>
+ <a>Let's use predefined entites &amp; &lt; &gt;</a>
+ <b>Let's use a DTD defined entity &bent;</b>
+</cab>
+
diff --git a/test/threads/cba.dtd b/test/threads/cba.dtd
new file mode 100644
index 0000000..71b96b4
--- /dev/null
+++ b/test/threads/cba.dtd
@@ -0,0 +1,7 @@
+<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
+%c;
+<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
+%b;
+<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
+%a;
+<!ELEMENT cba (c, b, a)>
diff --git a/test/threads/cba.xml b/test/threads/cba.xml
new file mode 100644
index 0000000..78708e4
--- /dev/null
+++ b/test/threads/cba.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE cba SYSTEM "http://example.org/cba.dtd">
+<cba>
+ <c/>
+ <b>Let's use a DTD defined entity &bent;</b>
+ <a>Let's use predefined entites &amp; &lt; &gt;</a>
+</cba>
+
diff --git a/test/threads/complex.xml b/test/threads/complex.xml
new file mode 100644
index 0000000..0174e90
--- /dev/null
+++ b/test/threads/complex.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+<delegateSystem systemIdStartString="http://example.org/"
+ catalog="example.org.xml"/>
+</catalog>
diff --git a/test/threads/example.org.xml b/test/threads/example.org.xml
new file mode 100644
index 0000000..21c2602
--- /dev/null
+++ b/test/threads/example.org.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+<delegateSystem systemIdStartString="http://example.org/a"
+ catalog="a.example.org.xml"/>
+<delegateSystem systemIdStartString="http://example.org/b"
+ catalog="b.example.org.xml"/>
+<nextCatalog catalog="c.example.org.xml"/>
+</catalog>
diff --git a/test/threads/invalid.xml b/test/threads/invalid.xml
new file mode 100644
index 0000000..9123275
--- /dev/null
+++ b/test/threads/invalid.xml
@@ -0,0 +1,2 @@
+<!-- Well formed but invalid -->
+<doc/>
diff --git a/test/threads/res b/test/threads/res
new file mode 100644
index 0000000..3dad6fe
--- /dev/null
+++ b/test/threads/res
@@ -0,0 +1,80 @@
+Adding document catalog complex.xml
+Local resolve: sysID http://example.org/bac.dtd
+Parsing catalog complex.xml
+complex.xml added to file hash
+example.org.xml not found in file hash
+Parsing catalog example.org.xml
+example.org.xml added to file hash
+Trying system delegate example.org.xml
+b.example.org.xml not found in file hash
+Parsing catalog b.example.org.xml
+b.example.org.xml added to file hash
+Trying system delegate b.example.org.xml
+Using rewriting rule http://example.org/b
+Local resolve: sysID http://example.org/b/b.dtd
+Trying system delegate example.org.xml
+Trying system delegate b.example.org.xml
+Using rewriting rule http://example.org/b
+Local resolve: sysID http://example.org/a/a.dtd
+Trying system delegate example.org.xml
+a.example.org.xml not found in file hash
+Parsing catalog a.example.org.xml
+a.example.org.xml added to file hash
+Trying system delegate a.example.org.xml
+Using rewriting rule http://example.org/a
+Local resolve: sysID http://example.org/c/c.dtd
+Trying system delegate example.org.xml
+c.example.org.xml not found in file hash
+Parsing catalog c.example.org.xml
+c.example.org.xml added to file hash
+Using rewriting rule http://example.org/c
+<?xml version="1.0"?>
+<?oasis-xml-catalog catalog="complex.xml"?>
+<!DOCTYPE bac SYSTEM "http://example.org/bac.dtd">
+<bac>
+ <b/>
+ <a/>
+ <c/>
+</bac>
+Adding document catalog complex.xml
+Local resolve: sysID http://example.org/abc.dtd
+Found complex.xml in file hash
+Trying system delegate example.org.xml
+Trying system delegate a.example.org.xml
+Using rewriting rule http://example.org/a
+Local resolve: sysID http://example.org/a/a.dtd
+Trying system delegate example.org.xml
+Trying system delegate a.example.org.xml
+Using rewriting rule http://example.org/a
+Local resolve: sysID http://example.org/b/b.dtd
+Trying system delegate example.org.xml
+Trying system delegate b.example.org.xml
+Using rewriting rule http://example.org/b
+Local resolve: sysID http://example.org/c/c.dtd
+Trying system delegate example.org.xml
+Using rewriting rule http://example.org/c
+Free catalog entry complex.xml
+<?xml version="1.0"?>
+<?oasis-xml-catalog catalog="complex.xml"?>
+<!DOCTYPE abc SYSTEM "http://example.org/abc.dtd">
+<abc>
+ <a/>
+ <b/>
+ <c/>
+</abc>
+Catalogs cleanup
+Free catalog entry http://example.org/c
+Free catalog entry http://example.org/
+Free catalog entry c.example.org.xml
+Free catalog entry http://example.org/
+Free catalog entry complex.xml
+Free catalog entry http://example.org/a
+Free catalog entry http://example.org/b
+Free catalog entry c.example.org.xml
+Free catalog entry example.org.xml
+Free catalog entry http://example.org/a
+Free catalog entry c.example.org.xml
+Free catalog entry a.example.org.xml
+Free catalog entry http://example.org/b
+Free catalog entry c.example.org.xml
+Free catalog entry b.example.org.xml