summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-07-09 20:06:35 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-07-09 20:06:35 +0000
commit44881d780bd5a45450013e4f2ef321067eb3de86 (patch)
treecfac2b2814ac9bca0e13437c5aed46c5ad1bcc77
parent399ff26ba4e515ad84279edda8e173cb5f0b2543 (diff)
downloadlibxslt-44881d780bd5a45450013e4f2ef321067eb3de86.tar.gz
libxslt-44881d780bd5a45450013e4f2ef321067eb3de86.tar.bz2
libxslt-44881d780bd5a45450013e4f2ef321067eb3de86.zip
small fix for xsl:message by Stephane GUIBOU added a specific regression
* libxslt/xsltutils.c: small fix for xsl:message by Stephane GUIBOU * tests/documents/Makefile.am tests/documents/message.*: added a specific regression test * libxslt/transform.c: fixed an infinite loop * configure.in doc/Makefile.am: attempt to add --with-html-dir, this may work Daniel
-rw-r--r--ChangeLog9
-rw-r--r--configure.in2
-rw-r--r--doc/Makefile.am2
-rw-r--r--libxslt/transform.c1
-rw-r--r--libxslt/xsltutils.c2
-rw-r--r--tests/documents/Makefile.am4
-rw-r--r--tests/documents/message.result2
-rw-r--r--tests/documents/message.xml5
-rw-r--r--tests/documents/message.xsl19
9 files changed, 44 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 899d88ec..0a6a7548 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Mon Jul 9 22:02:40 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * libxslt/xsltutils.c: small fix for xsl:message by Stephane GUIBOU
+ * tests/documents/Makefile.am tests/documents/message.*: added
+ a specific regression test
+ * libxslt/transform.c: fixed an infinite loop
+ * configure.in doc/Makefile.am: attempt to add --with-html-dir,
+ this may work
+
Mon Jul 9 15:55:14 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* libxslt/transform.c libxslt/xslt.c libxslt/xsltInternals.h:
diff --git a/configure.in b/configure.in
index 12184622..aad38e2d 100644
--- a/configure.in
+++ b/configure.in
@@ -22,6 +22,8 @@ AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_MAINTAINER_MODE
+AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
+
dnl
dnl Check the environment
dnl
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 5fc5b77e..c8da04a4 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -9,7 +9,7 @@ DOC_MAIN_SGML_FILE=libxslt.sgml
# The directory containing the source code (if it contains documentation).
DOC_SOURCE_DIR=..
-HTML_DIR=$(prefix)/doc
+HTML_DIR=@HTML_DIR@
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)/html
diff --git a/libxslt/transform.c b/libxslt/transform.c
index 948585dd..7d709f4f 100644
--- a/libxslt/transform.c
+++ b/libxslt/transform.c
@@ -3215,6 +3215,7 @@ xsltApplyStylesheetInternal(xsltStylesheetPtr style, xmlDocPtr doc,
break;
if ((tmp->type == XML_TEXT_NODE) && (!xmlIsBlankNode(tmp)))
break;
+ tmp = tmp->next;
}
if (tmp == root) {
ctxt->type = XSLT_OUTPUT_HTML;
diff --git a/libxslt/xsltutils.c b/libxslt/xsltutils.c
index 88f3cd42..0c06c0d8 100644
--- a/libxslt/xsltutils.c
+++ b/libxslt/xsltutils.c
@@ -153,7 +153,7 @@ xsltMessage(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst) {
if (prop != NULL) {
if (xmlStrEqual(prop, (const xmlChar *)"yes")) {
terminate = 1;
- } else if (xmlStrEqual(prop, (const xmlChar *)"yes")) {
+ } else if (xmlStrEqual(prop, (const xmlChar *)"no")) {
terminate = 0;
} else {
xsltGenericError(xsltGenericErrorContext,
diff --git a/tests/documents/Makefile.am b/tests/documents/Makefile.am
index 72adeefb..67e6ce90 100644
--- a/tests/documents/Makefile.am
+++ b/tests/documents/Makefile.am
@@ -21,4 +21,8 @@ test tests: $(top_builddir)/libxslt/xsltproc
diff $(srcdir)/test.result result; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
rm -f result)
+ @($(top_builddir)/libxslt/xsltproc $(srcdir)/message.xsl $(srcdir)/message.xml > result 2>&1 ; \
+ diff $(srcdir)/message.result result; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
+ rm -f result)
diff --git a/tests/documents/message.result b/tests/documents/message.result
new file mode 100644
index 00000000..0dbde5b5
--- /dev/null
+++ b/tests/documents/message.result
@@ -0,0 +1,2 @@
+A simple message
+A fatal message
diff --git a/tests/documents/message.xml b/tests/documents/message.xml
new file mode 100644
index 00000000..5c193299
--- /dev/null
+++ b/tests/documents/message.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root>
+ <node>Node 1</node>
+</root>
diff --git a/tests/documents/message.xsl b/tests/documents/message.xsl
new file mode 100644
index 00000000..8c470679
--- /dev/null
+++ b/tests/documents/message.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="xml"
+ encoding="iso-8859-1"
+ indent="yes"/>
+
+<xsl:template match="/">
+ <xsl:message terminate="no">A simple message</xsl:message>
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="root|node">
+ <xsl:message terminate="yes">A fatal message</xsl:message>
+</xsl:template>
+
+</xsl:stylesheet>