[xml] Userdata filling
- From: Marco Stipek <stipek triplex de>
- To: xml gnome org
- Subject: [xml] Userdata filling
- Date: Thu, 27 Sep 2001 15:13:12 +0200
Hello,
Bonjour Daniel,
we have some trouble implementing our apache mod_xslt. We would like to
print out the errors during parsing and transformation to the clients.
Problem:
1. We are in apache process space
2. We are multithreaded
3. we don't like to reimplement the xmlParseFile xmlSaxParseFile
functions (don't like to reinvent wheels)
4. We want to have error callbacks which implements the error
formating/printing and sending. We need our own context
(e.g. apache request context), which we probably could deliver via
the userdata filled in the parser context.
5. The userdata context could not be set using the xmlParseFile
function.
5. xmlGenericErrorContext is not available, because it's not in a
specific context, it's a global var, so it is not thread save.
We need thread specific.
Possible solutions:
1. xmlSAXParseFile as wrapper which retrieve an additional userdata
(void) pointer. This data could be linked to the parser context.
The error callbacks retrieve already the parser ctx.
2. xmlSetGenericErrorFunc will be rewritten to be thread safe in
parser context instead of using a global var.
or alternatively: putting a callback into the parameterlist of the
parseFile functions.
We already know that you don't like to change the api in most cases.
But maybe wrapping these things and adding some more functions is a
possible solution in this case.
BTW: If you need more info you get it this time :)
regards,
Marco
--
Marco Stipek
Technischer Leiter / Projektleiter
Entwicklung & Programmierung
Hosting & Providing
triplex neue medien GmbH
herzog-heinrich-strasse 11-13
80336 muenchen
tel: +49-89-209 138-23
fax: +49-89-209 138-10
mailto:marco stipek triplex de
http://www.triplex.de
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]