Hmmm? I thought a Templates object in JAXP/TrAX mapped particularly
well to an xsltc translet.  (Someone correct me if I'm missing
something!)

System.setProperty(set property to use xsltc);
// The below line creates the Templates (And in xsltc causes the
translet to be compiled once)
Templates templates = transformerFactory.newTemplates(XSLSource);
Transformer transformer = templates.newTransformer();
transformer.transform(XMLSourceOne, result);
// From here on out, no more compilation needed: the newTransformer()
should be very quick
transformer = templates.newTransformer();
transformer.transform(XMLSourceTwo, result);

In general I'd reccommend that people try coding just to the JAXP spec
itself, and avoid using either the xalan or xsltc direct API's unless
they need a specific feature there.  This will mean easier maintenance
for your code and the chance to change JAXP implementations (i.e. from
xalan mode to xsltc mode or whatever) easily.

- Shane


=====
<eof aka="mailto:[EMAIL PROTECTED]"
 BartSays="Nobody reads these anymore."/>

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

Reply via email to