Re: [xml] Possible "buggette"



On Tue, 8 May 2001, Daniel Veillard wrote:

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 :-)

What about copying over the _private entry to the new ctxt? Perhaps based
on some global flag which you could disable by default. That would be an
easy fix, it seems.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\





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