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/01/25 21:02:37 UTC

Getting a transformer from a translet.

I am attempting to use the XSLTC API to apply compiled style sheets to XML.

Some instances of my component will want to use a compiled stylesheet, and
some a plain text style sheet. For this reason I would like to cache a
Transformer in each instance for the transformation to employ as much code
reuse as I can.

I know I can get a Transformer from a Templates object, but I don't want to
compile the style sheets at runtime. 

The command line compiler will only compile to Translets.

Is there anyway to get a Transformer object given only a Translet, or are my
two choices to serialize Templates for reading at runtime, or using two
separate transformation methods depending on compiled or not?

Thanks in advance.

	easy,
	douglas d