Hi,

This patch copies private user data from one XInclude context to a created "child context"; I missed this in my earlier patch that added support for passing private user data to the parsing context.

Cheers,

Michael

Index: xinclude.c
===================================================================
RCS file: /cvs/gnome/libxml2/xinclude.c,v
retrieving revision 1.85
diff -u -r1.85 xinclude.c
--- xinclude.c  29 Sep 2006 09:15:59 -0000      1.85
+++ xinclude.c  24 Nov 2006 07:12:34 -0000
@@ -673,6 +673,10 @@
     newctxt = xmlXIncludeNewContext(doc);
     if (newctxt != NULL) {
        /*
+        * Copy the private user data
+        */
+       newctxt->_private = ctxt->_private;       
+       /*
         * Copy the existing document set
         */
        newctxt->incMax = ctxt->incMax;
@@ -1930,6 +1934,7 @@
        newctxt = xmlXIncludeNewContext(ctxt->doc);
        if (newctxt == NULL)
            return (-1);
+       newctxt->_private = ctxt->_private;
newctxt->base = xmlStrdup(ctxt->base); /* Inherit the base from the existing context */
        xmlXIncludeSetFlags(newctxt, ctxt->parseFlags);
        ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children);

Index: xinclude.c
===================================================================
RCS file: /cvs/gnome/libxml2/xinclude.c,v
retrieving revision 1.85
diff -u -r1.85 xinclude.c
--- xinclude.c	29 Sep 2006 09:15:59 -0000	1.85
+++ xinclude.c	24 Nov 2006 07:12:34 -0000
@@ -673,6 +673,10 @@
     newctxt = xmlXIncludeNewContext(doc);
     if (newctxt != NULL) {
 	/*
+	 * Copy the private user data
+	 */
+	newctxt->_private = ctxt->_private;	
+	/*
 	 * Copy the existing document set
 	 */
 	newctxt->incMax = ctxt->incMax;
@@ -1930,6 +1934,7 @@
 	newctxt = xmlXIncludeNewContext(ctxt->doc);
 	if (newctxt == NULL)
 	    return (-1);
+	newctxt->_private = ctxt->_private;
 	newctxt->base = xmlStrdup(ctxt->base);	/* Inherit the base from the existing context */
 	xmlXIncludeSetFlags(newctxt, ctxt->parseFlags);
 	ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children);
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to