fixing bug #111755 when a template is applied to an attribute added the
authorDaniel Veillard <veillard@src.gnome.org>
Wed, 30 Apr 2003 13:25:24 +0000 (13:25 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Wed, 30 Apr 2003 13:25:24 +0000 (13:25 +0000)
* 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

ChangeLog
NEWS
libxslt/transform.c
tests/docs/Makefile.am
tests/docs/bug-119.xml [new file with mode: 0644]
tests/general/Makefile.am
tests/general/bug-119.out [new file with mode: 0644]
tests/general/bug-119.xsl [new file with mode: 0644]

index 67fb18a..493594f 100644 (file)
--- 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 01973f6..19955bc 100644 (file)
--- 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:
index 6bba5b2..2dbec90 100644 (file)
@@ -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;
        }
index 5fa0069..258586e 100644 (file)
@@ -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 (file)
index 0000000..72cc3ec
--- /dev/null
@@ -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>
+
index df0f01f..5f31400 100644 (file)
@@ -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 (file)
index 0000000..dd5283e
--- /dev/null
@@ -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 (file)
index 0000000..72cc3ec
--- /dev/null
@@ -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>
+