[DAISY] Updated: HTMLSerializer
[email protected] Thu, 25 Sep 2008 17:02:10 +0000 (GMT+00:00)
| Newsgroups | gmane.text.xml.cocoon.documentation |
|---|---|
| Message-ID | <[email protected]> |
A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/896.html
Document ID: 896
Branch: main
Language: default
Name: HTMLSerializer (unchanged)
Document Type: Sitemap Component (unchanged)
Updated on: 9/25/08 5:01:51 PM
Updated by: David Legg
A new version has been created, state: draft
Parts
=====
Long description
----------------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 4456 bytes (previous version: 2873 bytes)
Content diff:
(41 equal lines skipped)
<h2>Configuration</h2>
--- <p>By default an HTMLSerializer is assigned as 'html' and configured to produce
--- HTML 4.01 'loose' which is also known as 'HTML 4.01 Transitional'. This doctype
--- allows the use of both structural, semantic and presentational elements (e.g.
--- font) but not framesets. Using the default serializer is as easy as adding the
--- following to your sitemap:</p>
+++ <p>By default an HTMLSerializer is assigned to the type name 'html' and
+++ configured to produce HTML 4.01 'loose' (also known as 'HTML 4.01
+++ Transitional'). This doctype allows the use of both structural, semantic and
+++ presentational elements (e.g. font) but not framesets. The default HTML
+++ serializer can be used in a pipeline by adding a suitable map:serialize
+++ statement to your sitemap.xmap file as follows:</p>
<pre><map:pipeline id="demo">
<map:match pattern="*.html">
--- <map:generate src="page.xml"/>
+++ <map:generate src="{1}.xml"/>
<strong><map:serialize type="html"/></strong>
</map:match>
</map:pipeline>
</pre>
+++ <p>If you wish to change the default settings you will need to create a
+++ Springbean and place it in a directory where it can be picked up at application
+++ launch. The following example Springbean file shows how to change the default
+++ to produce HTML 4.01 strict output:</p>
+++
+++ <pre><?xml version="1.0" encoding="UTF-8"?>
+++ <beans xmlns="http://www.springframework.org/schema/beans"
+++ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+++ xmlns:pipeline="http://cocoon.apache.org/schema/pipeline"
+++ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+++ http://cocoon.apache.org/schema/pipeline http://cocoon.apache.org/schema/pipeline/cocoon-pipeline-1.0.xsd"
+++ default-init-method="init">
+++
+++ <!--
+++ - HTML 4.01 Strict Serializer
+++ -->
+++ <bean name="org.apache.cocoon.serialization.Serializer/html" class="org.apache.cocoon.serialization.HTMLSerializer"
+++ scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer">
+++ <pipeline:component mime-type="text/html;charset=utf-8"/>
+++ <property name="format">
+++ <props>
+++ <prop key="doctype-public">-//W3C//DTD HTML 4.01//EN</prop>
+++ <prop key="doctype-system">http://www.w3.org/TR/html4/strict.dtd</prop>
+++ <prop key="encoding">UTF-8</prop>
+++ </props>
+++ </property>
+++ </bean>
+++ </beans>
+++ </pre>
+++
<p>TO BE CONTINUED...</p>
</body>
(1 equal lines skipped)