Changeset 1029

Show
Ignore:
Timestamp:
10/29/08 08:23:14 (2 months ago)
Author:
garth
Message:

view webapp - added better comments to the common.xml spring config file. Covers xslt caching...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/view/webapp/WEB-INF/config/spring/common.xml

    r635 r1029  
    183183 
    184184        <!--  X S L T   T R A N S F O R M A T I O N   R E S O U R C E S  --> 
    185         <!-- Sets the XSLT transformation factory to saxon (xslt 2.0).  This was set 
    186                 as a system property but that messes with other older versions of the xslt  
    187                 code that use XALAN so the factor was modified to allow a factory class 
    188                 name to be specified which sets the transformation engine to be used for 
    189                 the application.  If NOT specified then the Stylesheet's transformation  
    190                 factory will use the default endorsed XSLT engine (whatever is set via  
    191                 the tomcat endorsed/java's endorsed dirs = xalan). 
    192  
    193                 <property name="transformerFactoryClassName" type="java.lang.String"><value>net.sf.saxon.TransformerFactoryImpl</value></property> 
    194  
    195         <bean id="Common.XSLT.TransformerFactory" class="org.ibisph.xslt.TemplateCachingTransformerFactory"> 
    196                 <constructor-arg index="0" type="java.lang.String"><value>net.sf.saxon.TransformerFactoryImpl</value></constructor-arg> 
    197         </bean> 
    198         <bean id="Common.XSLT.Transformation" class="org.ibisph.xslt.Transformation"> 
    199                 <constructor-arg index="0" type="org.ibisph.xslt.TransformerFactory"><ref bean="Common.XSLT.TransformerFactory"/></constructor-arg> 
    200         </bean> 
    201         --> 
    202         <bean id="Common.XSLT.TransformerFactory" class="org.ibisph.xslt.CachingTransformerFactory"/> 
     185        <!-- The main function is to set the XSLT transformation factory to be used. 
     186                This mechanism allows for a pluggable XSLT engine to be explicitly used.  
     187                This can be set as a system property but doing so can impact other apps  
     188                that are installed on the same app server which require/rely on other  
     189                versions of an XSLT processor (typically XALAN).  If the factory is not  
     190                explicitly set then the app server's/JVM's default XSLT engine will be  
     191                used (via JAXP - typically XALAN which will NOT work for IBIS as of 2008).   
     192 
     193                NOTES:  
     194                - This factory must be XSLT v2.0 (at this point Saxon is the best 
     195                solution - XALAN will NOT work for IBIS).   
     196 
     197                - Removed the IBIS transformer factory type classes in late 2008 as they  
     198                were not needed.  If XALAN ever goes to 2.0 and adopters want to use then 
     199                those objects can be resurrected or new XALAN objects can be created as 
     200                needed. 
     201 
     202                PRODUCTION: It is highly recommended to use the caching Saxon XSLT engine: 
     203                <bean id="Common.XSLT.TransformerFactory" class="org.ibisph.xslt.CachedSaxonTransformerFactory"/> 
     204 
     205                XSLT DEVELOPMENT: Use the normal, thread safe non caching Saxon XSLT  
     206                Transformation Factory.  This avoids having to restart the app or touch  
     207                the core XSLT file. 
     208                <bean id="Common.XSLT.TransformerFactory" class="net.sf.saxon.TransformerFactoryImpl"/> 
     209        --> 
     210        <bean id="Common.XSLT.TransformerFactory" class="org.ibisph.xslt.CachedSaxonTransformerFactory"/> 
    203211        <bean id="Common.XSLT.Transformation" class="org.ibisph.xslt.Transformation"> 
    204212                <constructor-arg index="0"><ref bean="Common.XSLT.TransformerFactory"/></constructor-arg>