1 Reply Latest reply on Aug 1, 2011 8:48 PM by njiang

    How to load specified XLST engine in the bean ?

    jyang

      In my bean,  I need to specify XLST engine by  using setting as below:

       

      System.setProperty("javax.xml.transform.TransformerFactory","org.apache.xalan.processor.TransformerFactoryImpl");

       

      Obviously , it will force all applications to use same XLST engine.

       

      How to  specify XLST engine in the specified bean only ?

        • 1. Re: How to load specified XLST engine in the bean ?
          njiang

          I think you can load the implementation class name yourself and create a instance from it the transformer instance like this

          Class providerClass = getProviderClass("org.apache.xalan.processor.TransformerFactoryImpl", cl);                        
          TransformerFactory instance = (TransformerFactory)providerClass.newInstance();
          

           

          Willem