Thank you very much. This is exactly the answer I wanted. 

My question came up because of this portion of the JavaDoc for the
Transformer Factory.

_____________________________________
abstract  Templates newTemplates(Source source) 
          Process the Source into a Templates object, which is a a compiled
representation of the source. 
_____________________________________

This says the Templates object is a compiled representation. 

So you are saying that I am misinterpreting what is in the JavaDoc?

Thanks for the clarification.

        easy,
        douglas d


-----Original Message-----
From: Shane Curcuru [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2002 6:22 PM
To: [EMAIL PROTECTED]
Subject: RE: Reusing style sheet more that 2 times raises exceptions


AAAAAAAAHHHHHH! Gotta hate webmail when your browser kills your message
half-way through...

OK: the Templates object has absolutely *nothing* to do with 'compiled
style sheets' when using xalan.jar by default.  Say that ten times
please.

If you're using Xalan by default, you should always use Templates when
you have multiple threads, and usually use Transformers if you only
have a single thread. Calling template.newTransformer() should be a
pretty cheap operation; some people even do that every time they
transform and then throw away the transformer.

Templates and Transformers are both interfaces defined by JAXP. 
Xalan's default implementation of both is the same high-quality general
purpose XSLT processor we've had for a couple of years now.

As a bonus, in the past year, the Xalan project has started shipping
two! separate implementations of the JAXP transform stuff.  The default
one is xalan 'mode' - what you used to get.  You can now optionally use
the xsltc processor, which comes in xsltc.jar.  It uses something
called 'translets', which sort-of are stylesheets compiled into java
bytecode.  How it does it under the covers is immaterial; you should
normally just use the JAXP calls anyways.  Note that unless you've
*explicitly* changed your app to use xsltc, you'll still be using the
good old xalan implementation.

Overall, the xsltc implementation does not pass as many of the
conformance tests as the xalan implementation does; currently in some
cases it's faster, and in a few cases it's slower. 

Does that make any sense?

- Shane

=====
<eof aka="mailto:[EMAIL PROTECTED]"
 "http://www.otnemem.com/"=.sig />

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

Reply via email to