summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-04-30 13:25:24 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-04-30 13:25:24 +0000
commit95cc2c1cef534c378ff10b28d61eea3d59a6f6de (patch)
tree9e0069d73abcd8e11cf39f9c573621dfaede19cd
parentb06adb9f88c8922c141599001acc7203163405e3 (diff)
downloadlibxslt-95cc2c1cef534c378ff10b28d61eea3d59a6f6de.tar.gz
libxslt-95cc2c1cef534c378ff10b28d61eea3d59a6f6de.tar.bz2
libxslt-95cc2c1cef534c378ff10b28d61eea3d59a6f6de.zip
fixing bug #111755 when a template is applied to an attribute added the
* libxslt/transform.c: fixing bug #111755 when a template is applied to an attribute * tests/docs/Makefile.am tests/docs/bug-119.* tests/general/Makefile.am tests/general/bug-119*: added the example in the regression tests for that bug. Daniel
-rw-r--r--ChangeLog8
-rw-r--r--NEWS2
-rw-r--r--libxslt/transform.c4
-rw-r--r--tests/docs/Makefile.am1
-rw-r--r--tests/docs/bug-119.xml12
-rw-r--r--tests/general/Makefile.am7
-rw-r--r--tests/general/bug-119.out12
-rw-r--r--tests/general/bug-119.xsl12
8 files changed, 52 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 67fb18ae..493594fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Wed Apr 30 15:23:33 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * libxslt/transform.c: fixing bug #111755 when a template is
+ applied to an attribute
+ * tests/docs/Makefile.am tests/docs/bug-119.*
+ tests/general/Makefile.am tests/general/bug-119*: added the
+ example in the regression tests for that bug.
+
Tue Apr 29 15:18:31 CEST 2003 Daniel Veillard <daniel@veillard.com>
* doc/Makefile.am doc/libxslt.xml: upgraded to the XML/XSLT toolchain
diff --git a/NEWS b/NEWS
index 01973f63..19955bc6 100644
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,7 @@ for a really accurate description:
- bug fixes: Result Value Tree handling, XML IDs, keys(), extra namespace
declarations with xsl:elements.
- portability: python and trio fixes (Albert Chin), python on Solaris
- (Ben Phillips)
+ (Ben Phillips)
1.0.28: Mar 24 2003:
diff --git a/libxslt/transform.c b/libxslt/transform.c
index 6bba5b2a..2dbec90b 100644
--- a/libxslt/transform.c
+++ b/libxslt/transform.c
@@ -1134,8 +1134,8 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node) {
while (attrs != NULL) {
template = xsltGetTemplate(ctxt, (xmlNodePtr) attrs, NULL);
if (template) {
- xsltApplyOneTemplate(ctxt, node, template->content, template,
- NULL);
+ xsltApplyOneTemplate(ctxt, (xmlNodePtr) attrs,
+ template->content, template, NULL);
}
attrs = attrs->next;
}
diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am
index 5fa00699..258586ef 100644
--- a/tests/docs/Makefile.am
+++ b/tests/docs/Makefile.am
@@ -118,6 +118,7 @@ EXTRA_DIST = \
bug-116.xml \
bug-117.xml \
bug-118.xml \
+ bug-119.xml \
character.xml \
array.xml \
items.xml
diff --git a/tests/docs/bug-119.xml b/tests/docs/bug-119.xml
new file mode 100644
index 00000000..72cc3ecf
--- /dev/null
+++ b/tests/docs/bug-119.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+version="1.0">
+ <xsl:template match="/">
+ <xsl:apply-templates select="*" />
+ </xsl:template>
+
+ <xsl:template match="@match">
+ NAME <xsl:value-of select="name(.)" />
+ </xsl:template>
+</xsl:stylesheet>
+
diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
index df0f01fb..5f31400c 100644
--- a/tests/general/Makefile.am
+++ b/tests/general/Makefile.am
@@ -120,9 +120,10 @@ EXTRA_DIST = \
bug-113.out bug-113.xsl \
bug-114.out bug-114.xsl \
bug-115.out bug-115.xsl \
- bug-115.out bug-116.xsl \
- bug-115.out bug-117.xsl \
- bug-115.out bug-118.xsl \
+ bug-116.out bug-116.xsl \
+ bug-117.out bug-117.xsl \
+ bug-118.out bug-118.xsl \
+ bug-119.out bug-119.xsl \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
diff --git a/tests/general/bug-119.out b/tests/general/bug-119.out
new file mode 100644
index 00000000..dd5283ef
--- /dev/null
+++ b/tests/general/bug-119.out
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+
+
+ NAME match
+
+
+
+
+ NAME match
+ NAME
+
+
diff --git a/tests/general/bug-119.xsl b/tests/general/bug-119.xsl
new file mode 100644
index 00000000..72cc3ecf
--- /dev/null
+++ b/tests/general/bug-119.xsl
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+version="1.0">
+ <xsl:template match="/">
+ <xsl:apply-templates select="*" />
+ </xsl:template>
+
+ <xsl:template match="@match">
+ NAME <xsl:value-of select="name(.)" />
+ </xsl:template>
+</xsl:stylesheet>
+