From a78d584a69897465c6d80df41a97ed4dfe703968 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Tue, 15 Jan 2002 11:02:11 +0000 Subject: [PATCH] fixed bug #68751 added a specific example in the regression tests Daniel * libxslt/templates.c: fixed bug #68751 * tests/docs/Makefile.am tests/docs/bug-68.xml tests/general/Makefile.am tests/general/bug-68.*: added a specific example in the regression tests Daniel --- ChangeLog | 7 +++++++ libxslt/templates.c | 3 +++ tests/docs/Makefile.am | 1 + tests/docs/bug-68.xml | 1 + tests/general/Makefile.am | 1 + tests/general/bug-68.out | 1 + tests/general/bug-68.xsl | 8 ++++++++ 7 files changed, 22 insertions(+) create mode 100644 tests/docs/bug-68.xml create mode 100644 tests/general/bug-68.out create mode 100644 tests/general/bug-68.xsl diff --git a/ChangeLog b/ChangeLog index d822cb48..cf1df53a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Jan 15 12:00:18 CET 2002 Daniel Veillard + + * libxslt/templates.c: fixed bug #68751 + * tests/docs/Makefile.am tests/docs/bug-68.xml + tests/general/Makefile.am tests/general/bug-68.*: added a + specific example in the regression tests + Tue Jan 15 10:40:41 CET 2002 Daniel Veillard * libxslt/transform.c xsltproc/xsltproc.c: fixed a couple of diff --git a/libxslt/templates.c b/libxslt/templates.c index a5dccc9c..ea44a1d4 100644 --- a/libxslt/templates.c +++ b/libxslt/templates.c @@ -217,6 +217,9 @@ xsltAttrTemplateValueProcess(xsltTransformContextPtr ctxt, const xmlChar *str) { xmlChar *expr, *val; if (str == NULL) return(NULL); + if (*str == 0) + return(xmlStrndup("", 0)); + cur = str; while (*cur != 0) { if (*cur == '{') { diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index cffb234b..86f7d12a 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -68,6 +68,7 @@ EXTRA_DIST = \ bug-64.xml \ bug-65.xml \ bug-66.xml \ + bug-68.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-68.xml b/tests/docs/bug-68.xml new file mode 100644 index 00000000..69d62f2c --- /dev/null +++ b/tests/docs/bug-68.xml @@ -0,0 +1 @@ + diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index c501108f..ccbf4b78 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -71,6 +71,7 @@ EXTRA_DIST = \ bug-64.out bug-64.xsl \ bug-65.ent bug-65.out bug-65.xsl \ bug-66.out bug-66.xsl \ + bug-68.out bug-68.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-68.out b/tests/general/bug-68.out new file mode 100644 index 00000000..3e571402 --- /dev/null +++ b/tests/general/bug-68.out @@ -0,0 +1 @@ + diff --git a/tests/general/bug-68.xsl b/tests/general/bug-68.xsl new file mode 100644 index 00000000..23fc5b0a --- /dev/null +++ b/tests/general/bug-68.xsl @@ -0,0 +1,8 @@ + + + + + + +