modified to assure XML_CDATA_SECTION_NODE's do not have xmlStringTextNoenc
authorWilliam M. Brack <wbrack@src.gnome.org>
Mon, 8 Dec 2003 15:38:22 +0000 (15:38 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Mon, 8 Dec 2003 15:38:22 +0000 (15:38 +0000)
* libxslt/transform.c, libxslt/xslt.c: modified to assure
  XML_CDATA_SECTION_NODE's do not have xmlStringTextNoenc
  set into node name.  This modification arises from
  bug #128520, and avoids unnecessary work in libxml2.

ChangeLog
libxslt/transform.c
libxslt/xslt.c

index 65824e0..2f8b46c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Dec  8 23:34:32 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+       * libxslt/transform.c, libxslt/xslt.c: modified to assure
+         XML_CDATA_SECTION_NODE's do not have xmlStringTextNoenc
+         set into node name.  This modification arises from
+         bug #128520, and avoids unnecessary work in libxml2.
+         
 Mon Dec  1 16:41:27 CET 2003 Daniel Veillard <daniel@veillard.com>
 
        * libxslt/*.h *.h.in: updated the metadata informations in the headers
index 441617b..5f907f4 100644 (file)
@@ -2456,7 +2456,7 @@ xsltCopy(xsltTransformContextPtr ctxt, xmlNodePtr node,
  */
 void
 xsltText(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED,
-           xmlNodePtr inst, xsltStylePreCompPtr comp) {
+           xmlNodePtr inst, xsltStylePreCompPtr comp ATTRIBUTE_UNUSED) {
     if ((inst->children != NULL) && (comp != NULL)) {
        xmlNodePtr text = inst->children;
        xmlNodePtr copy;
@@ -2469,7 +2469,7 @@ xsltText(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED,
                break;
            }
            copy = xmlNewDocText(ctxt->output, text->content);
-           if ((comp->noescape) || (text->type != XML_CDATA_SECTION_NODE)) {
+           if (text->type != XML_CDATA_SECTION_NODE) {
 #ifdef WITH_XSLT_DEBUG_PARSING
                xsltGenericDebug(xsltGenericDebugContext,
                     "Disable escaping: %s\n", text->content);
index e65793b..b94fe3d 100644 (file)
@@ -1435,7 +1435,7 @@ xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ) {
                            if (style != NULL) style->errors++;
                            break;
                        }
-                       if (noesc)
+                       if ((noesc) && (text->type != XML_CDATA_SECTION_NODE))
                            text->name = xmlStringTextNoenc;
                        text = text->next;
                    }