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 / faq-transformers.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  3.9 KB  |  84 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 faqs PUBLIC "-//APACHE//DTD FAQ V1.0//EN" "faq-v10.dtd">
  18.  
  19. <faqs title="Cocoon Sitemap Transformer FAQs">
  20.  
  21. <faq>
  22.  <question>
  23.   What is a transformer?
  24.  </question>
  25.  
  26.  <answer>
  27.   <p>
  28. A transformer is the central point in a sitemap pipeline. Within a pipeline match, transformers consume SAX events and emit SAX events. Transformers are placed inside a pipeline matcher between a generator and a serializer. You can include several transformers within a pipeline matcher. Any pipeline matcher containing a generator and transformer must end with a serializer.
  29.   </p>
  30.   <p>
  31. In the sitemap file, each transformer has a unique name which is mapped to a java class. One transformer name must be declared as the default transformer. Each transformer may have additional configuration information specified in child elements.
  32.   </p>
  33.   <p>
  34.  For more conceptual information about transformers see <link href="../userdocs/concepts/sitemap.html">the sitemap</link>. For detailed descriptions about all of the available Cocoon transformers, see the user's guide document <link href="../userdocs/transformers/transformers.html">Transformers in Cocoon</link>. You may also wish to consult the Cocoon API documentation.
  35.   </p>
  36. </answer>
  37.  
  38. </faq>
  39.  
  40. <faq>
  41.  <question>
  42.   What are the similarities and differences of XInclude and CInclude Transformers?
  43.  </question>
  44.  
  45.  <answer>
  46.   <p>
  47. The XInclude and CInclude transformers both provide mechanisms to include content from other documents. Both also support cocoon:/ protocol (i.e. they use Cocoon's resolver).
  48.   </p>
  49.   <p>
  50. XIncludeTransformer differences
  51.   </p>
  52.   <ul>
  53.     <li>Implements the W3C XInclude specification.</li>
  54.     <li>Allows you to include text or xml content (via parse="text|xml").</li>
  55.     <li>Allows you to use XPointer syntax (via '#' or XPointer() syntax) within href attribute. However, support of XPointer requires random access to the object model of XML
  56. document to be included. Thus, it is expensive to construct in runtime. If you are including a whole document, it's better to use CInclude which supports straightforward text inclusion.</li>
  57.     <li>Has only one implementation, XIncludeTransformer, which is <strong>not</strong> cacheable.</li>
  58.   </ul>
  59.   <p>
  60. CIncludeTransformer differences
  61.   </p>
  62.   <ul>
  63.     <li>Helps you serve documents with inclusions and tags in xinclude namespace. 
  64.     This means that if a document (with both xinclude <em>and</em> cinclude tags) is processed 
  65.     by the CIncludeTransformer, its xinclude tags will remain intact.</li>
  66.     <li>Gives you the option to specify the element, namespace, and prefix for the
  67.     included content (e.g. element="wrapper_element" ns="wrapper_ns" prefix="wrapper_prefix")</li>
  68.     <li>Has two implementations: (1) a cacheable implementation, CachingCIncludeTransformer, and (2) a non-cacheable implementation, CIncludeTransformer, (used in Cocoon samples).</li>
  69.   </ul>
  70.   
  71.   <p>
  72. Consult the user documentation for more information about the <link href="../userdocs/transformers/xinclude-transformer.html">XIncludeTransformer</link> and <link href="../userdocs/transformers/cinclude-transformer.html">CIncludeTransformer</link>. Please note that an IncludeTransformer, with support for both cinclude and xinclude as well as a configurable namespace, is planned for a future release.
  73.   </p>
  74. </answer>
  75.  
  76. </faq>
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83. </faqs>
  84.