fixed bug #61627 added a specific example in the regression tests added a
authorDaniel Veillard <veillard@src.gnome.org>
Sat, 6 Oct 2001 10:53:17 +0000 (10:53 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Sat, 6 Oct 2001 10:53:17 +0000 (10:53 +0000)
* 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
libxslt/pattern.c
tests/Makefile.am
tests/reports/Makefile.am
tests/reports/undefvar.err [new file with mode: 0644]
tests/reports/undefvar.out [new file with mode: 0644]
tests/reports/undefvar.xml [new file with mode: 0644]
tests/reports/undefvar.xsl [new file with mode: 0644]

index d06ff5e..400758b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Sat Oct  6 12:41:37 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+       * 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 <daniel@veillard.com>
 
        * configure.in xslt-config.in: trying to fix bug #60890
index 3a5438b..592650d 100644 (file)
@@ -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;
index 9c102d9..d2fcb29 100644 (file)
@@ -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:
 
index 8168249..9e7a4c0 100644 (file)
@@ -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 (file)
index 0000000..b505a1d
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
diff --git a/tests/reports/undefvar.xml b/tests/reports/undefvar.xml
new file mode 100644 (file)
index 0000000..7e600ee
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<eins>
+<content>content of one</content>
+</eins>
diff --git a/tests/reports/undefvar.xsl b/tests/reports/undefvar.xsl
new file mode 100644 (file)
index 0000000..4e3a66b
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" indent="yes" encoding="ISO-8859-1"/>
+  <xsl:variable name="two">abcde</xsl:variable>
+  <xsl:template match="*">
+    <xsl:value-of select="translate('hello','ABCDE',$one)"/>
+  </xsl:template>
+</xsl:stylesheet>