fixed a problem when base path was "./xxx" 5 test results changed by
* uri.c: fixed a problem when base path was "./xxx"
* result/XInclude/*: 5 test results changed by above.
* Makefile.am: fixed a couple of spots where a new
result file used different flags that the testing one.
diff --git a/ChangeLog b/ChangeLog
index 16ae015..da7558d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Jun 25 13:38:57 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * uri.c: fixed a problem when base path was "./xxx"
+ * result/XInclude/*: 5 test results changed by above.
+ * Makefile.am: fixed a couple of spots where a new
+ result file used different flags that the testing one.
+
Thu Jun 24 16:27:44 HKT 2004 William Brack <wbrack@mmm.com.hk>
* valid.c: suppressed warnings from within xmlValidGetValidElements
diff --git a/Makefile.am b/Makefile.am
index b9f2479..fb26202 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -158,7 +158,7 @@
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
echo New test file $$name ; \
- $(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
+ $(CHECKER) $(top_builddir)/testHTML --push $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
else \
log=`$(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
@@ -191,7 +191,7 @@
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
echo New test file $$name ; \
- $(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
+ $(CHECKER) $(top_builddir)/testHTML --push --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
else \
log=`$(CHECKER) $(top_builddir)/testHTML --push --sax $$i 2>&1 > result.$$name.sax ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
@@ -483,7 +483,7 @@
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \
echo New test file $$name ; \
- $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --walker --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
+ $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name | grep -v 'failed to load external entity' ; \
@@ -523,7 +523,7 @@
if [ -f $$xml ] ; then \
if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
echo New test file $$name ; \
- $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i > $(srcdir)/result/catalogs/$$name ; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \
@@ -985,7 +985,7 @@
pkgconfig_DATA = libxml-2.0.pc
#
-# Instll the tests program sources as examples
+# Install the tests program sources as examples
#
BASE_DIR=$(datadir)/doc
DOC_MODULE=libxml2-$(VERSION)
diff --git a/result/XInclude/docids.xml b/result/XInclude/docids.xml
index 52a4614..ad8e6e6 100644
--- a/result/XInclude/docids.xml
+++ b/result/XInclude/docids.xml
@@ -11,7 +11,7 @@
<isid myid="dup"/>
</doc>
<!-- including another XML document with IDs -->
-<doc xml:base="../../../test/XInclude/ents/ids.xml">
+<doc xml:base="../ents/ids.xml">
<isid myid="dup"/>
<isid myid="foo"/>
<isid myid="bar"/>
diff --git a/result/XInclude/include.xml b/result/XInclude/include.xml
index 90296b4..3a9366d 100644
--- a/result/XInclude/include.xml
+++ b/result/XInclude/include.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
<!-- Simple test of including another XML document -->
- <doc xml:base="../../../test/XInclude/ents/something.xml">
+ <doc xml:base="../ents/something.xml">
<p>something</p>
<p>really</p>
<p>simple</p>
diff --git a/result/XInclude/nodes.xml b/result/XInclude/nodes.xml
index c4e93fa..48030d1 100644
--- a/result/XInclude/nodes.xml
+++ b/result/XInclude/nodes.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
<!-- Simple test of including a set of nodes from an XML document -->
- <p xml:base="../../../test/XInclude/ents/something.xml">something</p><p xml:base="../../../test/XInclude/ents/something.xml">really</p><p xml:base="../../../test/XInclude/ents/something.xml">simple</p>
+ <p xml:base="../ents/something.xml">something</p><p xml:base="../ents/something.xml">really</p><p xml:base="../ents/something.xml">simple</p>
</x>
diff --git a/result/XInclude/nodes2.xml b/result/XInclude/nodes2.xml
index 419f8b0..fac2d82 100644
--- a/result/XInclude/nodes2.xml
+++ b/result/XInclude/nodes2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2003/XInclude">
<!-- Simple test of including a set of nodes from an XML document -->
- <p xml:base="../../../test/XInclude/ents/something.xml">something</p><p xml:base="../../../test/XInclude/ents/something.xml">really</p><p xml:base="../../../test/XInclude/ents/something.xml">simple</p>
+ <p xml:base="../ents/something.xml">something</p><p xml:base="../ents/something.xml">really</p><p xml:base="../ents/something.xml">simple</p>
</x>
diff --git a/result/XInclude/recursive.xml b/result/XInclude/recursive.xml
index 25f993c..4af1738 100644
--- a/result/XInclude/recursive.xml
+++ b/result/XInclude/recursive.xml
@@ -1,3 +1,3 @@
<?xml version="1.0"?>
-<this><sub-inc xml:base="../../../test/XInclude/ents/sub-inc.ent">is a test
+<this><sub-inc xml:base="../ents/sub-inc.ent">is a test
</sub-inc></this>
diff --git a/uri.c b/uri.c
index fe75e78..f36eb9c 100644
--- a/uri.c
+++ b/uri.c
@@ -2068,7 +2068,11 @@
* First we compare the two strings and find where they first differ
*/
bptr = (xmlChar *)bas->path;
- if ((*bptr == '/') && (ref->path[0] != '/'))
+ if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/'))
+ pos += 2;
+ if ((*bptr == '.') && (bptr[1] == '/'))
+ bptr += 2;
+ else if ((*bptr == '/') && (ref->path[pos] != '/'))
bptr++;
while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0))
pos++;