> -----Original Message-----
> From: Santiago Pericas-Geertsen 
> 
> Karr, David wrote:
> 
> >It would be nice if I could cache an object to do that transformation
> >instead of creating it on the fly (as much as possible).
> >
>  Even if you could do what you suggest, creating an identity 
> Transformer 
> from a Templates object would be equivalent to allocating a new 
> Transfomer directly. In fact, that's how the 
> Templates.newTransformer() 
> method would be implemented given that there is no 
> stylesheet. Thus, you 
> wouldn't be saving much in my view (it may simplify your code a bit, 
> though).

Yes, I'm just looking to simplify the code flow, so that I can just get
the Templates object out of the cache and process the input to the
output.

In any case, it doesn't look like I'll be able to do that (unless I
actually write an identity stylesheet).  I guess I'll have to create an
identity Transformer (and TransformerFactory) on the fly if no Templates
object is found for that message type.

Reply via email to