Re: [xml] document() and import() handlers

On Sun, 11 Mar 2001, Daniel Veillard wrote:

On Sun, Mar 11, 2001 at 11:31:41AM +0000, Matt Sergeant wrote:
OK, so I've got XML parsing and output working to my satisfaction. What I
need now is to be able to have libxslt callback to my application for
document() and xsl:import/include.


I haven't seen any examples of how to do this, and Daniel indicated that
it might be possible to do by messing with the IO stuff, but didn't tell
me anything too precise... So I'm looking for more pointers.

   You can register new handlers, based on the URI string they can intercept
the default I/O routines of libxml:
    use xmlRegisterInputCallbacks ()
    again it works with a set of 4 callbacks:

OK, should this return 0 or 1 for a valid match?

I assume returning "false" (whichever of 0 or 1 that is), means that
libxml uses the default callbacks?


   If you want to be able to catch entities if you implement a catalog
based on their PUBLIC identifier (libxml don't) then you also need to
register an entity loader:

Yep, that's already implemented.


    /||    ** Founder and CTO  **  **     **
   //||    ** Ltd   **  ** XML Application Serving **
  // ||    ** **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources:  **
    //  \\

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