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 ig...@ca.ibm.com on 2002/12/10 01:26:57 UTC
Re: XSLTC and XALAN
>Do I take this to mean that I need to use XSLTC if I need to do repeated
transformations using >the same XSLT sheet?
No. Take a look at \xml-xalan\samples
e.g. for trax
// Instantiate the TransformerFactory, and use it along with a SteamSource
// XSL stylesheet to create a Transformer.
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(new
StreamSource(xslInURI));
// Perform the transformation from a StreamSource to a StreamResult;
//transformer.transform(new StreamSource(xmlInURI),
// new StreamResult(new
FileOutputStream(htmlOutURI)));
transformer.transform(new StreamSource(xmlInURI),
new StreamResult(fileOut));
>What are advantages of XSLTC over XALAN processor?
They are just different. XSLTC gives you opportunity to "pre-compile" you
stylesheet.
One can be faster or slower depending on you application.
Igor Hersht
XSLT Development
IBM Canada Ltd., 8200 Warden Avenue, Markham, Ontario L6G 1C7
Office D2-260, Phone (905)413-3240 ; FAX (905)413-4839