From 62abb583a6f88e8e0574153d68a3cbd9d2d690cf Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Sat, 6 Oct 2001 10:53:17 +0000 Subject: [PATCH] fixed bug #61627 added a specific example in the regression tests added a * libxslt/pattern.c: fixed bug #61627 * tests/docs/Makefile.am tests/docs/bug-64.xml tests/general/Makefile.am tests/general/bug-64.*: added a specific example in the regression tests * tests/docs/Makefile.am tests/docs/bug-63.xml tests/general/Makefile.am tests/general/bug-63.*: added a specific example in the regression tests for bug #61291 (fixed in libxml2 module) * tests/reports/Makefile.am tests/reports/undefvar.*: added a test for handling undefined variables Daniel --- ChangeLog | 13 +++++++++++++ libxslt/pattern.c | 3 +++ tests/Makefile.am | 2 +- tests/reports/Makefile.am | 3 ++- tests/reports/undefvar.err | 6 ++++++ tests/reports/undefvar.out | 0 tests/reports/undefvar.xml | 4 ++++ tests/reports/undefvar.xsl | 8 ++++++++ 8 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 tests/reports/undefvar.err create mode 100644 tests/reports/undefvar.out create mode 100644 tests/reports/undefvar.xml create mode 100644 tests/reports/undefvar.xsl diff --git a/ChangeLog b/ChangeLog index d06ff5e..400758b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Sat Oct 6 12:41:37 CEST 2001 Daniel Veillard + + * libxslt/pattern.c: fixed bug #61627 + * tests/docs/Makefile.am tests/docs/bug-64.xml + tests/general/Makefile.am tests/general/bug-64.*: added a + specific example in the regression tests + * tests/docs/Makefile.am tests/docs/bug-63.xml + tests/general/Makefile.am tests/general/bug-63.*: added a + specific example in the regression tests for bug #61291 + (fixed in libxml2 module) + * tests/reports/Makefile.am tests/reports/undefvar.*: added + a test for handling undefined variables + Thu Oct 4 15:49:57 CEST 2001 Daniel Veillard * configure.in xslt-config.in: trying to fix bug #60890 diff --git a/libxslt/pattern.c b/libxslt/pattern.c index 3a5438b..592650d 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -1944,6 +1944,7 @@ xsltGetTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node, if (xsltTestCompMatch(ctxt, list, node, ctxt->mode, ctxt->modeURI)) { ret = list->template; + priority = list->priority; break; } list = list->next; @@ -1959,6 +1960,7 @@ xsltGetTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node, if (xsltTestCompMatch(ctxt, list, node, ctxt->mode, ctxt->modeURI)) { ret = list->template; + priority = list->priority; break; } list = list->next; @@ -1972,6 +1974,7 @@ xsltGetTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node, if (xsltTestCompMatch(ctxt, list, node, ctxt->mode, ctxt->modeURI)) { ret = list->template; + priority = list->priority; break; } list = list->next; diff --git a/tests/Makefile.am b/tests/Makefile.am index 9c102d9..d2fcb29 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in SUBDIRS=docs REC1 REC2 REC general namespaces numbers documents \ - extensions reports xmlspec multiple XSLTMark docbook exslt + extensions reports xmlspec multiple XSLTMark docbook exslt all: diff --git a/tests/reports/Makefile.am b/tests/reports/Makefile.am index 8168249..9e7a4c0 100644 --- a/tests/reports/Makefile.am +++ b/tests/reports/Makefile.am @@ -5,7 +5,8 @@ $(top_builddir)/xsltproc/xsltproc: EXTRA_DIST = \ tst-1.xml tst-1.xsl tst-1.out tst-1.err \ - tst-2.xml tst-2.xsl tst-2.out tst-2.err + tst-2.xml tst-2.xsl tst-2.out tst-2.err \ + undefvar-2.xml undefvar-2.xsl undefvar-2.out undefvar-2.err all: test diff --git a/tests/reports/undefvar.err b/tests/reports/undefvar.err new file mode 100644 index 0000000..b505a1d --- /dev/null +++ b/tests/reports/undefvar.err @@ -0,0 +1,6 @@ +runtime error: file ./undefvar.xsl line 6 element value-of +unregistered variable one +xmlXPathRunEval: parameter error +xmlXPathEval: 1 object left on the stack +runtime error: file ./undefvar.xsl line 6 element value-of +xsltValueOf: text copy failed diff --git a/tests/reports/undefvar.out b/tests/reports/undefvar.out new file mode 100644 index 0000000..e69de29 diff --git a/tests/reports/undefvar.xml b/tests/reports/undefvar.xml new file mode 100644 index 0000000..7e600ee --- /dev/null +++ b/tests/reports/undefvar.xml @@ -0,0 +1,4 @@ + + +content of one + diff --git a/tests/reports/undefvar.xsl b/tests/reports/undefvar.xsl new file mode 100644 index 0000000..4e3a66b --- /dev/null +++ b/tests/reports/undefvar.xsl @@ -0,0 +1,8 @@ + + + + abcde + + + + -- 2.7.4