What is the best way to Optimize XSLT tranformations?

Impuls

New Member
I am using the code given below to XSLT transformations. I use Input and Output Streams for this transformation. Here xsltIn and xmlIn are input streams. I use the \[code\]System.setProperty("javax.xml.transform.TransformerFactory","net.sf.saxon.TransformerFactoryImpl");\[/code\]Set saxon as the binding. So my Question is what is the best way to Optimize the processing. I heard about something called Streaming Templates. Need Help.\[code\]javax.xml.transform.Result xmlResult = new javax.xml.transform.stax.StAXResult(XMLOutputFactory .newInstance().createXMLStreamWriter(new FileWriter(fileName)));javax.xml.transform.Source xsltSource = new javax.xml.transform.stream.StreamSource(xsltIn);javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource(xmlIn);javax.xml.transform.TransformerFactory transFact = javax.xml.transform.TransformerFactory .newInstance();javax.xml.transform.Transformer trans = transFact.newTransformer(xsltSource);trans.transform(source, xmlResult);\[/code\]
 
Back
Top