summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2006-12-09 23:18:21 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2006-12-09 23:18:21 +0000
commit79068441851f5fc363d75906a722c6482be0377a (patch)
treecbbb9ab3fecc1613fdcb945cf86e85a5df3d0eff /tests
parentb9ab5c35b5edd8c11777888246c8f64634c5fcd2 (diff)
downloadlibxslt-79068441851f5fc363d75906a722c6482be0377a.tar.gz
libxslt-79068441851f5fc363d75906a722c6482be0377a.tar.bz2
libxslt-79068441851f5fc363d75906a722c6482be0377a.zip
changed handling of function params to fix bug #381319 exposed
* libexslt/functions.c: changed handling of function params to fix bug #381319 * libxslt/transform.[ch]: exposed xsltLocalVariablePush and xsltLocalVariablePop as global entries so that they could be used from within libexslt/functions.c * tests/exslt/functions/function.9.[xsl,xml,out] added to regression tests
Diffstat (limited to 'tests')
-rw-r--r--tests/exslt/functions/Makefile.am3
-rw-r--r--tests/exslt/functions/function.9.out6
-rw-r--r--tests/exslt/functions/function.9.xml9
-rw-r--r--tests/exslt/functions/function.9.xsl22
4 files changed, 39 insertions, 1 deletions
diff --git a/tests/exslt/functions/Makefile.am b/tests/exslt/functions/Makefile.am
index d5dc12fc..d1787460 100644
--- a/tests/exslt/functions/Makefile.am
+++ b/tests/exslt/functions/Makefile.am
@@ -11,7 +11,8 @@ EXTRA_DIST = \
function.5.out function.5.xml function.5.xsl \
function.6.out function.6.xml function.6.xsl \
function.7.out function.7.xml function.7.xsl \
- function.8.out function.8.xml function.8.xsl
+ function.8.out function.8.xml function.8.xsl \
+ function.9.out function.9.xml function.9.xsl
all:
diff --git a/tests/exslt/functions/function.9.out b/tests/exslt/functions/function.9.out
new file mode 100644
index 00000000..1224d967
--- /dev/null
+++ b/tests/exslt/functions/function.9.out
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+
+
+ a
+
+
diff --git a/tests/exslt/functions/function.9.xml b/tests/exslt/functions/function.9.xml
new file mode 100644
index 00000000..6a3c717b
--- /dev/null
+++ b/tests/exslt/functions/function.9.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+ <table>
+ <tr>
+ <td align="center">a</td>
+ </tr>
+ </table>
+</root>
+
diff --git a/tests/exslt/functions/function.9.xsl b/tests/exslt/functions/function.9.xsl
new file mode 100644
index 00000000..72d9599c
--- /dev/null
+++ b/tests/exslt/functions/function.9.xsl
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:func="http://exslt.org/functions"
+ xmlns:math="http://exslt.org/math"
+ xmlns:mg="mg"
+ extension-element-prefixes="exsl func">
+
+ <xsl:template match="table">
+ <xsl:variable name="cols" select="mg:function(.)"/>
+ <xsl:value-of select="$cols"/>
+ </xsl:template>
+
+ <func:function name="mg:function">
+ <xsl:param name="table"/>
+ <xsl:param name="tr" select="$table/tr[1]"/>
+ <func:result select="$tr"/>
+ </func:function>
+</xsl:stylesheet>
+
+