[EMAIL PROTECTED] wrote:
> As the main designer of TrAX, I can testify that
> TransformerFactory#newTemplates() was always meant as a compilation step,
> though hiding the details of whether it compiles into a Java class or it
> creates a StylesheetRoot like object. If you can persistently store the
> Templates instance, the details of when you want to #newTemplates() the
> stylesheet is exactly the same whether you are using interpreted Xalan or
> compiled Xalan (i.e. XSLTC).
This suggests serializing the Templates object (including the translet
class(es)), which makes perfect sense. I just want to make sure that we're
not forced to re-compile if the in-memory reference of the translet class
is lost. If this proves to be just as efficient as instanciating a
translet class then I may be convinced. Otherwise I will still stick to
adding an option of translet class caching hidden behind the Templates
interface.
> Gary L Peskin wrote:
> > I don't really think that TRaX has "...
> > loads of crap ... that most users will never bother even looking at" but
> > I could be wrong there too.
>
> javax.xml.transform, all aspects of it, is well exercised by a wide variety
> of users. I don't think there's a lot of fluff. A given Translet need
> only implement javax.xml.transform.Transformer and
> javax.xml.transform.TransformerHandler, and optionally XMLReader. I don't
> think this is a lot of overhead at all, especially since the source tree
> (either DOMImpl or DTM) implements a ContentHandler anyway.
The TrAX interfaces are clean and simple enough, but there still may be
some APIs that a user does not need, or he/she may not prefer to use TrAX
at all. My point was that we should try to separate the TrAX code from the
existing XSLTC code to make sure that we preserve the portability of
translets and the XSLTC runtime library. In some cases this can prove
quite a challenge and it may need re-design of parts of XSLTC, but I think
we can live with that. XSLTC has been and should still be for a niche, and
I want to do the decent thing for the users we already have.
Morten