You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "G. Todd Miller - XML Tech Ctr - Development" <Gl...@Sun.COM> on 2001/05/10 15:02:58 UTC
Templates vs Transformer- simple question...
JAXP Experts,
One question:
"If I can get a Transformer directly from my TransformerFactory,
then when/why would I go through the extra step of getting a
Templates, and then getting a Transformer from my Templates object?"
Thanks for your help, just trying to get a clear understanding of this stuff...
Todd
=======================================================================
G. Todd Miller Sun Microsystems Computer Company
Software Systems Engineer 2 Network Drive, MS UBUR02-201
GE&IS XML Tech Center Burlington, MA 01803-0903
781 442-0176
781 442-1437 (fax)
todd.miller@east.sun.com
Re: Templates vs Transformer- simple question...
Posted by James Melton <ja...@cylogix.com>.
Yes, I would be very interested in how you did this.
jason heddings wrote:
>
> Todd-
>
> The templates object has a "compiled" version of the XSL document, and
> therefore calls to newTransformer do not need to take the extra time to
> parse your source. So if you need to have multiple Transformer objects
> that are using the same XSL source (say in concurrent threads), then
> using the Templates object may be a good idea.
>
> If you'd like some more detail about how I've used this, let me know
> and I'll be happy to share.
>
> HTH,
> --jah
>
____________________________________________________________
James Melton CyLogix
609.750.5190 609.750.5100
james.melton@cylogix.com www.cylogix.com
Re: Templates vs Transformer- simple question...
Posted by jason heddings <Ja...@Sun.COM>.
Todd-
The templates object has a "compiled" version of the XSL document, and
therefore calls to newTransformer do not need to take the extra time to
parse your source. So if you need to have multiple Transformer objects
that are using the same XSL source (say in concurrent threads), then
using the Templates object may be a good idea.
If you'd like some more detail about how I've used this, let me know
and I'll be happy to share.
HTH,
--jah
"G. Todd Miller - XML Tech Ctr - Development" wrote:
> One question:
> "If I can get a Transformer directly from my TransformerFactory,
> then when/why would I go through the extra step of getting a
> Templates, and then getting a Transformer from my Templates object?"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\\\|/// Jason Heddings ((
\\ ~ ~ // 303.272.5166 (x75166) C|~~|
(/ @ @ /) Jason.Heddings@Sun.COM `__'
~~oOOo~(_)~oOOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~