summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-08-21 12:57:59 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-08-21 12:57:59 +0000
commit6433954692abb5620ed4e554a2979ef4ecdc6871 (patch)
tree4bd6f2473e7df978ff92bae8d2b38692b1a994f6
parentcda969218bdda1d3dd8d3c4417f3dc100d076024 (diff)
downloadlibxml2-6433954692abb5620ed4e554a2979ef4ecdc6871.tar.gz
fixed nextCatalog started adding a small regression test Daniel
* catalog.c: fixed nextCatalog * result/catalogs/docbook test/catalogs/*: started adding a small regression test Daniel
-rw-r--r--ChangeLog6
-rw-r--r--catalog.c4
-rw-r--r--result/catalogs/docbook4
-rw-r--r--test/catalogs/docbook.script3
-rw-r--r--test/catalogs/docbook.xml14
-rw-r--r--test/catalogs/stylesheet.xml12
6 files changed, 42 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 851b8494..43e152f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Aug 21 14:56:18 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: fixed nextCatalog
+ * result/catalogs/docbook test/catalogs/*: started adding
+ a small regression test
+
Tue Aug 21 12:52:38 CEST 2001 Daniel Veillard <daniel@veillard.com>
* Makefile.am catalog.c xmlcatalog.c include/libxml/catalog.h:
diff --git a/catalog.c b/catalog.c
index d645d887..21270d44 100644
--- a/catalog.c
+++ b/catalog.c
@@ -1018,7 +1018,9 @@ xmlCatalogXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
xmlFetchXMLCatalogFile(cur);
}
if (cur->children != NULL) {
- xmlCatalogListXMLResolve(cur->children, pubID, sysID);
+ ret = xmlCatalogListXMLResolve(cur->children, pubID, sysID);
+ if (ret != NULL)
+ return(ret);
}
}
cur = cur->next;
diff --git a/result/catalogs/docbook b/result/catalogs/docbook
new file mode 100644
index 00000000..a5ab6a73
--- /dev/null
+++ b/result/catalogs/docbook
@@ -0,0 +1,4 @@
+> /usr/share/xml/docbook/xml/4.1.2/dbpoolx.mod
+> http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod
+> file:///usr/share/xml/toto/toto.dtd
+> \ No newline at end of file
diff --git a/test/catalogs/docbook.script b/test/catalogs/docbook.script
new file mode 100644
index 00000000..1c606c08
--- /dev/null
+++ b/test/catalogs/docbook.script
@@ -0,0 +1,3 @@
+resolve toto http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod
+public "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN"
+resolve toto toto
diff --git a/test/catalogs/docbook.xml b/test/catalogs/docbook.xml
new file mode 100644
index 00000000..c8dd2bf3
--- /dev/null
+++ b/test/catalogs/docbook.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+<public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/>
+<public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/dbnotnx.mod"/>
+<public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod"/>
+<public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod"/>
+<public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/dbhierx.mod"/>
+<public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/dbgenent.mod"/>
+<public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" uri="http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd"/>
+<public publicId="-//OASIS//DTD DocBook MathML Module V1.0//EN" uri="http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd"/>
+<nextCatalog catalog="stylesheet.xml"/>
+<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/" rewritePrefix="/usr/share/xml/docbook/"/>
+</catalog>
diff --git a/test/catalogs/stylesheet.xml b/test/catalogs/stylesheet.xml
new file mode 100644
index 00000000..4b611e11
--- /dev/null
+++ b/test/catalogs/stylesheet.xml
@@ -0,0 +1,12 @@
+<!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"
+ prefer="public">
+
+<!-- Circumvent relative URI in spec.xsl that doesn't work online -->
+<uri name="http://www.oasis-open.org/committes/tr.xsl"
+ uri="http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"/>
+<public publicId="toto" uri="file:///usr/share/xml/toto/toto.dtd"/>
+</catalog>
+