[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [xml] Using xmlParserNodeInfo



On Fri, Feb 21, 2003 at 11:40:23AM -0800, Glenn W. Bach wrote:
> I finally managed to get a custom setup that I could debug.
> 
> On my xml file, the function:
> 
>   xmlParseExternalEntityPrivate
> 
> at parser.c:9655 is being called. This function makes a new context that 
> does not inherit the record_info value of the original. This may be what 
> the problem is. If a lot of processing is done with this context, it 
> could also be that the list of nodes wouldn't be copied back to the 
> original context.
> 
> I may be totally off base here, but this is where I saw the value of 
> record_info suddenly become 0.

  Hum, right this bit should be inherited in the child context !
The enclosed patch should fix this,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Index: parser.c
===================================================================
RCS file: /cvs/gnome/gnome-xml/parser.c,v
retrieving revision 1.245
diff -c -r1.245 parser.c
*** parser.c	19 Feb 2003 14:49:59 -0000	1.245
--- parser.c	21 Feb 2003 19:55:28 -0000
***************
*** 9685,9690 ****
--- 9685,9691 ----
  	ctxt->loadsubset = oldctxt->loadsubset;
  	ctxt->validate = oldctxt->validate;
  	ctxt->external = oldctxt->external;
+ 	ctxt->record_info = oldctxt->record_info;
      } else {
  	/*
  	 * Doing validity checking on chunk without context


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]