Re: [xml] when to call initGenericErrorDefaultFunc()



Hi hi,

Thanks for all the replies. Now I use :

  xsltSetGenericErrorFunc(self,(xmlGenericErrorFunc)xsltErrorHandler);

and it works as expected.
Danile: what about fixing the API documentation. it is not very clear at this point.

Stefan


hi,
since I didn't use it till now, I can't tell how to use the error handling
functionality of libxml, but I would like to remark, that


initGenericErrorDefaultFunc(gitk_libxml_error_func);


is implicitly converted to:


  initGenericErrorDefaultFunc(&gitk_libxml_error_func);


these two calls are semantically identical. The problem is rather that
initGenericErrorDefaultFunc takes a pointer to a function pointer as an
argument and directs this pointer to the default error handling function:

xmlerror.h:
typedef void (*xmlGenericErrorFunc) (void *ctx,
                                 const char *msg,
                                 ...);

error.c:
void
initGenericErrorDefaultFunc(xmlGenericErrorFunc * handler)
{
    if (handler == NULL)
        xmlGenericError = xmlGenericErrorDefaultFunc;
    else
        (*handler) = xmlGenericErrorDefaultFunc;
}

Cheers,
  Marcus
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml




--
      \|/            Stefan Kost
     <@ @>           private            business
+-oOO-(_)-OOo------------------------------------------------------ - - -  -   -
|       __  Address  Simildenstr. 5     HTWK Leipzig, Fb IMN, Postfach 300066
|      ///           04277 Leipzig      04277 Leipzig
| __  ///            Germany            Germany
| \\\///    Phone    +49341 2253538     +49341 30766101
|  \__/     EMail    st_kost gmx net    kost imn htwk-leipzig de
|           WWW      www.sonicpulse.de  www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - -  -    -




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