You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Douglas Conklin <do...@nightfire.com> on 2002/02/05 19:21:59 UTC

RE: Reusing style sheet more that 2 times raises exceptions

I would love to use a template, but my understanding is that Templates are a
form of compiled style sheet. 

Since the compiled style sheets have several conformance issues and I need
all of my already shipped style sheets to work when I ship my infrastructure
using Xalan 2, I don't like taking on the risk of using Templates. 

Looking at the docs for TransformerFactory.newTransformer() there is no
mention of going through the compilation step to get the transformer. 

I asked this question in another thread but didn't get an answer. Does using
a Template suffer from the compiled style sheet conformance issues, and does
directly constructing a Transformer avoid these issues?

	easy,
	douglas d


-----Original Message-----
From: Shane Curcuru [mailto:shane_curcuru@yahoo.com]
Sent: Tuesday, February 05, 2002 8:58 AM
To: xalan-j-users@xml.apache.org
Subject: Re: Reusing stylesheet more that 2 times raises exceptions


I thought we had cleared up all the 'reusing transformer object causes
NPE/other bogus exception' problems in the latest CVS; if anyone could
re-verify with our current code that would be great.

One Important Note About Threading:
Transformer objects are definitely not threadsafe, and not intended to
be used across multiple threads.  I would strongly urge you to change
your design to use Templates, which are thread-safe, and then have each
thread call template.newTransformer() instead of synchronising.

http://xml.apache.org/xalan-j/usagepatterns.html#multithreading

- Shane

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com