fixed problem with text node on stylesheet document without a dictionary
authorWilliam M. Brack <wbrack@src.gnome.org>
Wed, 16 Mar 2005 11:12:38 +0000 (11:12 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Wed, 16 Mar 2005 11:12:38 +0000 (11:12 +0000)
* libxslt/xslt.c: fixed problem with text node on stylesheet
  document without a dictionary (bug 170533)

ChangeLog
libxslt/xslt.c

index 63b86fa..c5708d4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 16 17:19:24 HKT 2005 William Brack (wbrack@mmm.com.hk)
+
+       * libxslt/xslt.c: fixed problem with text node on stylesheet
+         document without a dictionary (bug 170533)
+
 Sun Mar 13 20:08:34 CET 2005 Daniel Veillard <daniel@veillard.com>
 
        * NEWS configure.in doc/*: preparing 1.1.13, updated and rebuilt
index 30018d2..cae7a18 100644 (file)
@@ -1534,14 +1534,17 @@ xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ) {
                        while (text != NULL) {
                            if ((text->content != NULL) &&
                                (!xmlDictOwns(style->dict, text->content))) {
-                               xmlChar *old = (xmlChar *) text->content;
 
                                /*
                                 * internalize the text string
                                 */
-                               text->content = (xmlChar *)
-                                       xmlDictLookup(style->dict, old, -1);
-                               xmlFree(old);
+                               if (text->doc->dict != NULL) {
+                                   xmlChar *old = (xmlChar *) text->content;
+                                   text->content = 
+                                       (xmlChar *) xmlDictLookup(
+                                               text->doc->dict, old, -1);
+                                   xmlFree(old);
+                               }
                            }
 
                            next = text->next;