home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / xslt-transformer.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  5.4 KB  |  104 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
  18.  
  19. <document>
  20.     <header>
  21.         <title>XSLT Transformer</title>
  22.         <version>0.9</version>
  23.         <type>Technical document</type>
  24.         <authors>
  25.             <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
  26.             <person name="Sylvain Wallez" email="sylvain@apache.org"/>
  27.          </authors>
  28.          <abstract>This document describes the xslt transformer of Cocoon.</abstract>
  29.     </header>
  30.     <body>
  31.          <s1 title="Trax/XSLT Transformer">
  32.             <p>The xslt transformer reads an xsl document from the local file system or from any url.
  33.                    It transforms the sax stream using this stylesheet.</p>
  34.                 <p>The xslt transformer is the default transformer .</p>
  35.             <ul>
  36.                 <li>Name : xslt</li>
  37.                 <li>Class: org.apache.cocoon.transformation.TraxTransformer</li>
  38.                 <li>Cacheable: yes - uses the last modification date of the xsl document for validation.</li>
  39.             </ul>
  40.             <p>The xslt transformer is configurable. You can specify one or more of 
  41.                      the following configuration information:</p>
  42.             <ul>
  43.                 <li>use-request-parameters: true|false - Setting this to true makes all
  44.                         request parameters available in the XSLT stylesheet. Note that this might 
  45.                         have issues concerning cachability of the generated output of this transformer,
  46.                         the caching algorithm not only checks the last modification date but also
  47.                         all values of the request parameters.
  48.                         This property is false by default. If set to true the values of a request
  49.                         parameter is available using a variable in the xslt with the name of the parameter.</li>
  50.                 <li>use-browser-capabilities-db: true|false - This configuration forces the transformer to make all
  51.                         properties from the browser capability database available in the XSLT stylesheet as.
  52.                         Note that this might have issues concerning cachability of the generated output of this
  53.                         transformer as the caching algorithm adds this values to the validation phase.
  54.                         The default for this property is false.</li>
  55.                 <li>use-cookies: true|false - This configuration forces the transformer to make all
  56.                                 cookies from the request available in the XSLT stylesheetas.
  57.                                 Note that this might have issues concerning cachability of the generated output of this
  58.                                 transformer. This property is false by default.</li>
  59.                 <li>xslt-processor-role: [role name] - This configuration allows to specify the XSLT processor (see below)
  60.                      that will be used by its role name. This allows to have several XSLT processors in the configuration
  61.                     (e.g. Xalan and Saxon) and choose one or the other depending on the needs of stylesheet
  62.                     specificities. This property defaults to "org.apache.cocoon.components.xslt.XSLTProcessor"
  63.                     which is the standard role name for an XSLTProcessor.</li>
  64.             </ul>
  65.             <p>The "use-request-parameters" and "use-browser-capabilities-db" configuration
  66.                      of a transformer can be changed for one single pipeline by specifying
  67.                      parameters with the same name:</p>
  68. <source>
  69.      <![CDATA[
  70.   <map:transform src="stylesheet.xsl" type="xslt"/>
  71.   <!-- The type attribute can be omitted as it is the default transformer. -->
  72.      ]]>
  73. </source>
  74.             <p>The "use-request-parameters" and "use-browser-capabilities-db" configuration
  75.                      of a transformer can be changed for one single pipeline by specifying
  76.                      parameters with the same name:</p>
  77. <source>
  78.      <![CDATA[
  79.   <map:transform src="stylesheet.xsl">
  80.     <map:parameter name="use-request-parameters" value="true"/>
  81.   </map:transform>
  82.      ]]>
  83. </source>
  84.             <p>In addition all other parameters to the transformer are
  85.                   available in the stylesheet as <xsl:param/>s (These values
  86.                   are also used in the caching algorithm.)</p>
  87.         </s1>
  88.             <s1 title="The XSLT Processor">
  89.             <p>The XSLT Transformer uses a component called XSLTProcessor. This component is
  90.                      configured in the cocoon.xconf. You can configure it as follows:</p>
  91.             <ul>
  92.                 <li>use-store: true|false -  If set to true it forces the xslt processor 
  93.                         to put the generated templates from the XSLT stylesheet into the
  94.                  system store. This property is true by default.</li>
  95.                 <li>transformer-factory: [class name] - tells the transformer to use a particular
  96.                     implementation of javax.xml.transform.TransformerFactory. This allows to force the use of
  97.                     a given TRAX implementation (e.g. xalan or saxon) if several are available in the classpath.
  98.                     If this property is not set, the transformer uses the standard TRAX mechanism
  99.                     (TransformerFactory.newInstance()).</li>
  100.             </ul>
  101.         </s1>
  102.     </body>
  103. </document>
  104.