home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Copyright 1999-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
-
- <document>
- <header>
- <title>XHTML Serializer</title>
- <version>0.9</version>
- <type>Technical document</type>
- <authors>
- <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
- <person name="Bernhard Huber" email="huber@apache.org"/>
- </authors>
- <abstract>This document describes the XHTML serializer of Cocoon.</abstract>
- </header>
- <body>
- <s1 title="XHTML Serializer">
- <p>
- The XHTML serializer serializes sax events to XHTML.
- The output of the XHTML serializer is XHTML.
- </p>
- <ul>
- <li>Name : xhtml</li>
- <li>Class: org.apache.cocoon.serialization.XMLSerializer</li>
- <li>Cacheable: yes</li>
- </ul>
- <s2 title="Sitemap Configuration">
- <p>
- The XHTML serializer is declared in the sitemap serializers section.
- </p>
- <source><![CDATA[
- <map:serializers ...
- ...
- <map:serializer name="xhtml"
- src="org.apache.cocoon.serialization.XMLSerializer"
- mime-type="text/html"
- logger="sitemap.serializer.xhtml"
- pool-grow="2" pool-max="64" pool-min="2"
- >
- <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
- <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
- <encoding>UTF-8</encoding>
- </map:serializer>
- ...
- ]]></source>
- <p>
- The declaration of the XHTML serializer shall use following
- XML serializer configuration parameters
- </p>
- <table>
- <tr><th>Name</th><th>Value</th><th>Comment</th></tr>
- <tr><td>doctype-public</td><td>-//W3C//DTD XHTML 1.0 Strict//EN</td>
- <td>specifies the XHTML public document type</td>
- </tr>
- <tr><td>doctype-system</td><td>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</td>
- <td>specifies the XHTML system document type</td>
- </tr>
- <tr><td>mime-type</td><td>text/html</td>
- <td>specifies mime-type of the serialized XHTML document.
- </td>
- </tr>
- </table>
- </s2>
- <s2 title="Pipeline Usage">
- <p>
- Using the XHTML Serializer in a pipeline is just setting the
- serializer type to xhtml.
- The following code snippet uses the XHTML Serializer:
- </p>
- <source><![CDATA[
- <map:match pattern="*.html">
- ...
- <map:serialize type="xhtml"/>
- </map:match>
- ...
- ]]></source>
- </s2>
- <s2 title="Further Reading">
- <p>
- As XHTML serializer uses the XML serializer internally, you might
- want to read the complete list of valid XML configuration parameters.
- It is available at <link href="xml-serializer.html">XML serializer</link>
- user docuementation.
- </p>
- </s2>
- </s1>
- </body>
- </document>
-
-