This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Suggestions to use Transformer concurrently
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Suggestions to use Transformer concurrently
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Tue, 11 Sep 2001 14:47:51 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Would anyone suggest how to use Transformer concurrently?
> I have read a O'Reilly and it suggests that one should use
> Template class to
> hold the xslt and then create a new instance of Transformer
> to every client.
Yes, that's what you should do. Compile the stylesheet once into a Templates
object, then use it to create a new Transformer for each transformation, in
a different thread if you want. In principle you can reuse the Transformer
once a transformation is finished, but I wouldn't recommend it. You are
certainly NOT allowed to run several transform() methods in different
threads using the same Transformer object.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list