[xslt] Reentrance with libxslt



Hello all,
if I want to use libxslt in an environment in which several, possibly 
competing threads use libxslt, I have the following
problem: The style-sheets I use normally contain some call to the 
'document'-function with some kind of
URI, and this document function I not only want to provide by myself, 
but I want to ensure that every thread is allowed to
use its own version of this function. Also, because in my environment 
this document function needs access to several services to
perform its work, I need to be able to specify additional arguments to 
this function, which are provided if it is called from the XSLT-
processor. So, to conclude, I have looked for some variation of the 
following kind of API to libxslt:

typedef node_set document_function(const char *uri, void* additional_args);

struct document_function_def {
        document_function actual_func,
        void *additional_args   };

xmlDocPtr applyStyleSheet(
        xmlStyleSheetPtr style_sheet,
        xmlDocPtr original_doc,
        document_function_def * my_document_func_def);

but, till now, I was not able to find it in the documentation.
Could somebody please help me out.

With regards,
Andreas Bille




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