[xslt] Thread Safety Changes



Hey listers. I saw that there were some talks about thread safety and
libxslt a while back. There is even a bug open (102365). I would like to
volunteer to make a few small changes that I think will give libxslt a
push toward thread safety.

1. xsltInit() in xslt.c should be public, not static.

2. _xsltStylesheet should have a xmlGenericErrorFunc member so that when
any function calls xsltTransformError with a NULL context, but valid
xsltStylesheetPtr, it can use that instead of xsltGenericError.

3. xsltParseStylesheetProcess may need to be slightly changed so that
client code can call it with a custom xsltStylesheetPtr (one with an
error handler set). Right now we call xsltParseStylesheetDoc, which does
not give us control over the xsltStylesheetPtr. It does not appear that
a call to xsltParseStylesheetProcess is directly supported because
xsltParseStylesheetDoc makes calls to xsltGatherNamespaces (which is
static) and xsltResolveStylesheetAttributeSet.

Any comments? Are there other known issues that I am missing here?

-- 
Peter Jones <unix;c++;crypto;xml;vi;4wd;geek> [ http://pmade.org ]
PGP Fingerprint: 27AD 7922 D3BC 46A3 3627 D7B4 4240 46C3 A41E 844A



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