AW: xsltc and chaining SAX transformation 2003-09-24 - By Stefan.Kaesberg@(protected)
Hi Meghana,
in my last project we've migrated from Xalan to XSLTC and we've gained about 70% performance improvment. Chaining the transformations was an option too but since only three transformations occured (in average) we did not implement it.
But I tried it out based on the Xalan sample "Pipe" which uses filters. This example is based on SAXSources and SAXResults.
I've tested it with Xalan not with XSLTC, but if you're going to do this, i suggest to switch the Systemproperty to XSLTC:
// ... Pipe-Sample : ... { String key = "javax.xml.transform.TransformerFactory"; String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; Properties props = System.getProperties(); props.put(key, value); System.setProperties(props); // ... Pipe-Sample continues: // Instantiate a TransformerFactory. TransformerFactory tFactory = TransformerFactory.newInstance();
If this TF supports the use uf SAXSource and SAXResult you may get your TransformerHandler by calling:
saxTFactory.newTransformerHandler(new StreamSource("stylesheet-name.xsl"));
i don't know, if (or how) you can get it from cached Templates or Translets. Does that help ?
Stefan
-----Urspr�ngliche Nachricht----- Von: Shreeya Indap [mailto:mmystore@(protected)] Gesendet: Di 23.09.2003 06:56 An: xalan-j-users@(protected) Cc: Betreff: xsltc and chaining SAX transformation
Hi All, I am reading the documentation about chaining trasnformations on xalan's site and this mailing list for past couple of days. One of our major requirements for xml pipelines is that we have to use SAX model for performance reason. It is also desirable to use xsltc compilation of stylesheets for performance and distribution of xsls in jar file. From the JavaDocs for translate, I see that it does transform only for DOM objects. Does anyone know how make SAX handler after loading the translate into the memory? Hope it makes sense. Please let me know if you want me to elaborate my problem with a code snippet. Thank you, Meghana Joglekar. Merant, Inc. _________________________________________________________________ Share your photos without swamping your Inbox. Get Hotmail Extra Storage today! http://join.msn.com/?PAGE�atures/es
|
|