enhanced previous fix to bug #120684, using excellent suggestion by Daniel
authorWilliam M. Brack <wbrack@src.gnome.org>
Wed, 3 Sep 2003 01:22:15 +0000 (01:22 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Wed, 3 Sep 2003 01:22:15 +0000 (01:22 +0000)
* transform.c: enhanced previous fix to bug #120684, using
  excellent suggestion by Daniel
* attributes.c: fixed bug #119583, merging attribute sets
  from imported stylesheets.
* tests/docs/Makefile.am tests/docs/bug-131.xml
  tests/general/Makefile.am tests/docs/bug-131*: added tests
  to the regression suite for bug #120684.

libxslt/transform.c

index 279842d..727fbf2 100644 (file)
@@ -1128,11 +1128,8 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node,
                     "xsltDefaultProcessOneNode: copy text %s\n",
                        cur->content);
 #endif
-               copy = xmlCopyNode(cur, 0);
-               if (copy != NULL) {
-                   xmlAddChild(ctxt->insert, copy);
-                   ctxt->lasttext = NULL;      /* AddChild may truncate buf */
-               } else {
+               copy = xsltCopyText(ctxt, ctxt->insert, cur);
+               if (copy == NULL) {
                    xsltTransformError(ctxt, NULL, node,
                     "xsltDefaultProcessOneNode: text copy failed\n");
                }