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 / text-serializer.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  3.0 KB  |  95 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>Text Serializer</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="Bernhard Huber" email="huber@apache.org"/>
  27.    </authors>
  28.    <abstract>This document describes the text serializer of Cocoon.</abstract>
  29. </header>
  30. <body>
  31.   <s1 title="Text Serializer">
  32.     <p>
  33.       The Text serializer serializes xml into plain text..
  34.     </p>
  35.     <ul>
  36.       <li>Name : text</li>
  37.       <li>Class: org.apache.cocoon.serialization.TextSerializer</li>
  38.       <li>Cacheable: yes.</li>
  39.     </ul>
  40.     <s2 title="Sitemap Configuration">
  41.       <p>
  42.         The text Serializer is declared in the sitemap serializers section.
  43.       </p>
  44.       <source><![CDATA[
  45. <map:serializers...
  46. ...
  47.  <map:serializer name="text" 
  48.    src="org.apache.cocoon.serialization.TextSerializer"
  49.    mime-type="text/plain" 
  50.    logger="sitemap.serializer.text" 
  51.  />
  52. ...
  53.       ]]></source>
  54.         <p>
  55.           The text Serializer sets the <code>method</code> property
  56.           of the XML serializer to the value <code>text</code>.
  57.         </p>
  58.     </s2>
  59.     <s2 title="Pipeline Usage">
  60.       <p>
  61.         Using the text Serializer in a pipeline is just setting the 
  62.         serializer type to text. 
  63.         The following code snippet uses the text Serializer:
  64.       </p>
  65.       <source><![CDATA[
  66. ...
  67. <map:match pattern="announcement.txt">
  68. <map:generate...
  69. ...
  70. <map:serialize type="text"/>
  71. ...
  72.       ]]></source>
  73.       <p>
  74.         The pipeline snippet above serializes the SAX events of the
  75.         announcment document resource to plain text. 
  76.       </p>
  77.       <p>
  78.         Input document of the text serializer must be valid XML document. It
  79.         should have at least one element, root element, which will contain
  80.         all the text of the document. Root element will be ignored by text
  81.         serializer and will not go into the output stream.
  82.       </p>
  83.     </s2>
  84.     <s2 title="Further Reading">
  85.       <p>
  86.         As text Serializer uses the XML serializer internally, you might 
  87.         want to read the complete list of valid XML configuration parameters.
  88.         It is available at <link href="xml-serializer.html">XML serializer</link>
  89.         user documentation.
  90.       </p>
  91.     </s2>
  92.   </s1>
  93. </body>
  94. </document>
  95.