XSLT-processing without jaxp-api from Java

Help
Thomas
2004-12-15
2012-10-08
  • Thomas

    Thomas - 2004-12-15

    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

     
    • Michael Kay

      Michael Kay - 2004-12-15

      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

       
    • Thomas

      Thomas - 2004-12-15

      THX a lot for your fast help :-).

      regards
      Thomas

       

Log in to post a comment.