cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Updated: HTMLSerializer
Date Thu, 25 Sep 2008 17:02:10 GMT
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>&lt;map:pipeline id="demo"&gt;
      &lt;map:match pattern="*.html"&gt;
---     &lt;map:generate src="page.xml"/&gt;
+++     &lt;map:generate src="{1}.xml"/&gt;
        <strong>&lt;map:serialize type="html"/&gt;</strong>
      &lt;/map:match&gt;
    &lt;/map:pipeline&gt;
    </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>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+++ &lt;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"&gt;
+++ 
+++   &lt;!--
+++     - HTML 4.01 Strict Serializer
+++     --&gt;
+++   &lt;bean name="org.apache.cocoon.serialization.Serializer/html" class="org.apache.cocoon.serialization.HTMLSerializer"
+++         scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer"&gt;
+++     &lt;pipeline:component mime-type="text/html;charset=utf-8"/&gt;
+++     &lt;property name="format"&gt;
+++       &lt;props&gt;
+++         &lt;prop key="doctype-public"&gt;-//W3C//DTD HTML 4.01//EN&lt;/prop&gt;
+++         &lt;prop key="doctype-system"&gt;http://www.w3.org/TR/html4/strict.dtd&lt;/prop&gt;
+++         &lt;prop key="encoding"&gt;UTF-8&lt;/prop&gt;
+++       &lt;/props&gt;
+++     &lt;/property&gt;
+++   &lt;/bean&gt;
+++ &lt;/beans&gt;
+++ </pre>
+++ 
    <p>TO BE CONTINUED...</p>
    
    </body>
(1 equal lines skipped)


Mime
View raw message