fixed problem with parserOptions not being set before loading a new
authorWilliam M. Brack <wbrack@src.gnome.org>
Wed, 19 Jan 2005 02:21:23 +0000 (02:21 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Wed, 19 Jan 2005 02:21:23 +0000 (02:21 +0000)
* transform.c: fixed problem with parserOptions not being
  set before loading a new document (bug 164530)

ChangeLog
libxslt/transform.c

index 95e95ae..328d05e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 19 10:21:37 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+       * transform.c: fixed problem with parserOptions not being
+         set before loading a new document (bug 164530)
+
 Mon Jan 17 16:50:02 CET 2005 Daniel Veillard <daniel@veillard.com>
 
        * configure.in libxslt/Makefile.am libxslt/xsltwin32config.h
index 273af3a..2565ba9 100644 (file)
@@ -442,6 +442,11 @@ xsltNewTransformContext(xsltStylesheetPtr style, xmlDocPtr doc) {
      */
     if (xslDebugStatus == XSLT_DEBUG_NONE)
         xmlXPathOrderDocElems(doc);
+    /*
+     * Must set parserOptions before calling xsltNewDocument
+     * (bug 164530)
+     */
+    cur->parserOptions = XSLT_PARSE_OPTIONS;
     docu = xsltNewDocument(cur, doc);
     if (docu == NULL) {
        xsltTransformError(cur, NULL, (xmlNodePtr)doc,
@@ -454,12 +459,10 @@ xsltNewTransformContext(xsltStylesheetPtr style, xmlDocPtr doc) {
     docu->main = 1;
     cur->document = docu;
     cur->inst = NULL;
-    cur->xinclude = xsltDoXIncludeDefault;
     cur->outputFile = NULL;
     cur->sec = xsltGetDefaultSecurityPrefs();
     cur->debugStatus = xslDebugStatus;
     cur->traceCode = (unsigned long*) &xsltDefaultTrace;
-    cur->parserOptions = XSLT_PARSE_OPTIONS;
 
     cur->dict = xmlDictCreateSub(style->dict);
 #ifdef WITH_XSLT_DEBUG