Re: [xslt] Thread Safety Changes

On Tue, Jan 28, 2003 at 10:23:38PM -0800, Peter Jones wrote:
> 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.

  Makes sense, RFE it in bugzilla,

> 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.

  yes, same RFE,

> 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?

Changing the internal Stylesheet processing APIs are not the right solution
IMHO, I would rather add a new entry point for parsing a stylesheet where
an error function and context can be provided too. I.e. keeping the API
function oriented and trying to preserve data structures allocation and
content as private as possible.


Daniel Veillard      | Red Hat Network  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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