Project

Profile

Help

XSLT-processing without jaxp-api from Java

Added by Anonymous almost 20 years ago

Legacy ID: #2898062 Legacy Poster: Thomas (zabel123)

Hello, I have read lots of the saxon-8-documentation, but as I understand it, it is provided for Saxon-users to use Saxon only with the general jaxp-api and i didn't find a useful hint for my problem. My problem is, that I want to use Saxon for XSLT-transformations from java and not from commandline and (!!!!!!) leaving the System.setProperty( "javax.xml.transform.TransformerFactory", "org ... Xalan") NOT pointing to Saxon but to another XSLTTransformer-Implementation. (Background: other processes of my system should use xalan, but one process should be able to use Saxon during this). Is it possible to make 2 XSLTTransformations at the same time from Java while the Systemproperty javax.xml.transform.TransformerFactory points to only one XSLTTransformation-Implementation? It should be possible with the internal Saxon-Api. Am I right? Thanx for your help (or codesnipplets :-) ) in advance! Regards Thomas


Replies (2)

RE: XSLT-processing without jaxp-api from Jav - Added by Anonymous almost 20 years ago

Legacy ID: #2898076 Legacy Poster: Michael Kay (mhkay)

One way to do this is to set the system property to the Saxon TransformerImpl class immediately before doing the Saxon transformation, and then reset it to its previous value on completion. Another way is to avoid using the TransformerFactory.getInstance() method, and just do new net.sf.saxon.TransformerFactoryImpl() instead. Michael Kay

RE: XSLT-processing without jaxp-api from Java - Added by Anonymous almost 20 years ago

Legacy ID: #2898133 Legacy Poster: Thomas (zabel123)

THX a lot for your fast help :-). regards Thomas

    (1-2/2)

    Please register to reply