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



On Sun, Mar 11, 2001 at 12:02:35PM +0000, Matt Sergeant wrote:
On Sun, 11 Mar 2001, Daniel Veillard wrote:
   You can register new handlers, based on the URI string they can intercept
the default I/O routines of libxml:
    use xmlRegisterInputCallbacks ()
    http://xmlsoft.org/html/libxml-xmlio.html#XMLREGISTERINPUTCALLBACKS
    again it works with a set of 4 callbacks:
    match()

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

  1 for a match I think

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

  no it means libxml will try next registered handler,
I have I think 3 default handlers HTTP, FTP and file access (or less
if say HTTP or FTP wan't compiled in).

    open()
    read()
    close()

   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:

  http://xmlsoft.org/xmlio.html#entities

Yep, that's already implemented.

  Okay :-)

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/




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