Re: [xml] Possible "buggette"



Hi Daniel; All,

I may be wrong here, due to my lack of understanding of 
libxml internals, but isn't this related to some problems with 
the ctxt pointer in SAX parsing, which were discussed short 
time ago?

Is this a common symptem of the ctxt pointer serving double duty:
- used internally by libxml
- used for user provided callbacks

Can there be a general solution by splitting this functionality into two ctxt 
pointer? To make this minimally painfull, I assume ctxt should always 
point to a "system context" (or derived structs) and the "system context" 
holds the pointer to the "user context".

Regards,
Peter Jacobi


Date sent:              Tue, 8 May 2001 03:39:21 -0400
From:                   Daniel Veillard <veillard redhat com>
To:                     Matt Sergeant <matt sergeant org>
Copies to:              xml gnome org
Subject:                Re: [xml] Possible "buggette"
Send reply to:          veillard redhat com

On Mon, May 07, 2001 at 09:30:00AM +0100, Matt Sergeant wrote:
Not really sure if I'm doing something wrong here, or if libxml is...

When running the docbook xslt stuff through XML::LibXML, the external
entity callback I've setup doesn't get the ctxt pointer I setup before
starting the parse. Instead it gets a completely different ctxt pointer.
The callback is called several times with the ctxt pointer I originally
setup, but at some point it switches to something else. The particular
entity it is loading is "../common/iso-lat1.ent".

Is this the expected behaviour? And if so, is there any way I can get
the ctxt pointer I created?

  Hum, might be non trivial to fix, but doable.
The xmlParseExternalEntity() function creates a new parser context
for handling the entity parsing. This is fine as long as processing
don't depends on using a specific context (entity processing ain't
simple :-\). I could possibly modify the parser to not use a new
context (I would need to save and restore a bunch of things but it
should be doable). Depending on how badly the "buggette" affects
you, I would do it sooner or later. I would appreciate if you could
enter the bug in the bugzilla.gnome.org database so I don't forget it :-)

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

_______________________________________________
xml mailing list
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml






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