You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by hu...@apache.org on 2002/12/25 08:05:56 UTC
cvs commit: xml-cocoon2/src/documentation/xdocs/userdocs/serializers book.xml html-serializer.xml serializers.xml svgxml-serializer.xml text-serializer.xml wap-serializer.xml xml-serializer.xml
huber 2002/12/24 23:05:56
Modified: src/documentation/xdocs/userdocs/serializers book.xml
html-serializer.xml serializers.xml
svgxml-serializer.xml text-serializer.xml
wap-serializer.xml xml-serializer.xml
Log:
Update XML Serializer, WML Serializer, HTML Serializer, and Text Serializer documentation,
added XHTML Serializer documentation in the serializer user documentation section.
Revision Changes Path
1.5 +1 -0 xml-cocoon2/src/documentation/xdocs/userdocs/serializers/book.xml
Index: book.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/serializers/book.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- book.xml 23 Dec 2002 22:40:14 -0000 1.4
+++ book.xml 25 Dec 2002 07:05:55 -0000 1.5
@@ -17,6 +17,7 @@
<menu-item label="HTML Serializer" href="html-serializer.html"/>
</menu>
<menu label="Core">
+ <menu-item label="XHTML Serializer" href="xhtml-serializer.html"/>
<menu-item label="XML Serializer" href="xml-serializer.html"/>
<menu-item label="Text Serializer" href="text-serializer.html"/>
<menu-item label="WAP/WML Serializer" href="wap-serializer.html"/>
1.2 +232 -20 xml-cocoon2/src/documentation/xdocs/userdocs/serializers/html-serializer.xml
Index: html-serializer.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/serializers/html-serializer.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- html-serializer.xml 3 Jan 2002 12:31:05 -0000 1.1
+++ html-serializer.xml 25 Dec 2002 07:05:55 -0000 1.2
@@ -1,25 +1,237 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd">
+<!--
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">
+
+-->
+
<document>
- <header>
- <title>HTML Serializer</title>
- <version>0.9</version>
- <type>Technical document</type>
- <authors>
- <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
- </authors>
- <abstract>This document describes the html serializer of Cocoon.</abstract>
- </header>
- <body>
- <s1 title="HTML Serializer">
- <p>The html serializer serializes xhtml into valid html.</p>
- <p>The html serializer is the default serializer .</p>
- <ul>
- <li>Name : html</li>
- <li>Class: org.apache.cocoon.serialization.HtmlSerializer</li>
- <li>Cacheable: yes.</li>
- </ul>
- </s1>
- </body>
+ <header>
+ <title>HTML 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 html serializer of Cocoon.</abstract>
+ </header>
+ <body>
+ <s1 title="HTML Serializer">
+ <p>
+ The HTML serializer serializes xml content to html.
+ It is the default serializer.
+ </p>
+ <ul>
+ <li>Name : html</li>
+ <li>Class: org.apache.cocoon.serialization.HtmlSerializer</li>
+ <li>Cacheable: yes.</li>
+ </ul>
+ <s2 title="Sitemap Configuration">
+ <p>
+ The HTML Serializer is declared in the sitemap serializers section.
+ </p>
+ <source><![CDATA[
+<map:serializers default="html">
+...
+ <map:serializer name="html"
+ src="org.apache.cocoon.serialization.HTMLSerializer"
+ mime-type="text/html"
+ logger="sitemap.serializer.html"
+ pool-grow="4" pool-max="32" pool-min="4">
+ <!-- serializer configurations -->
+...
+ </map:serializer>
+...
+ ]]></source>
+ <p>
+ HTML Serializer can be configured, specifying elements inside of
+ the <map:serializer> body.
+ </p>
+ <s3 title="Configuration Example">
+ <p>
+ The following HTML Serializer snippet is setting
+ doctype, and encoding configuration for the HTML Serializer
+ </p>
+ <source><![CDATA[
+<map:serializer name="html"
+ src="org.apache.cocoon.serialization.HTMLSerializer"
+ mime-type="text/html">
+ <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>
+ <encoding>ISO-8859-1</encoding>
+</map:serializer>
+ ]]></source>
+ <p>
+ This configuration will result in HTML output of the form
+ </p>
+ <source><![CDATA[
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title...
+...
+ ]]></source>
+ </s3>
+ <p>
+ The HTML Serializer accepts following configuration parameters.
+ These configurations are not Xalan specific.
+ </p>
+<!--
+# XSLT properties do not need namespace qualification.
+method=xml
+indent=yes
+media-type=text/html
+version=4.0
+
+# Xalan-specific output properties. These can be overridden in the stylesheet
+# assigning a xalan namespace. For example:
+# <xsl:stylesheet version="1.0"
+# xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+# xmlns:xalan="http://xml.apache.org/xslt">
+# <xsl:output method="html" encoding="UTF-8"
+# xalan:content-handler="MyContentHandler"/>
+# ...
+# Note that the colon after the protocol needs to be escaped.
+{http\u003a//xml.apache.org/xslt}indent-amount=0
+{http\u003a//xml.apache.org/xslt}content-handler=org.apache.xalan.serialize.SerializerToHTML
+{http\u003a//xml.apache.org/xslt}entities=HTMLEntities.res
+{http\u003a//xml.apache.org/xslt}use-url-escaping=yes
+-->
+ <table>
+ <tr><th>Name</th><th>Xalan Default Value</th><th>Comment</th></tr>
+ <tr><td>cdata-section-elements</td>
+ <td>none</td>
+ <td><code>cdata-section-elements</code> specifies a whitespace delimited
+ list of the names of elements whose text node children should be output
+ using CDATA sections.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation.</link>
+ </td>
+ </tr>
+ <tr><td>doctype-public</td>
+ <td>none</td>
+ <td><code>doctype-public</code> specifies the public identifier
+ to be used in the document type declaration.
+ </td>
+ </tr>
+ <tr><td>doctype-system</td>
+ <td>none</td>
+ <td>
+ <code>doctype-system</code> specifies the system identifier
+ to be used in the document type declaration.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>encoding</td>
+ <td>none</td>
+ <td><code>encoding</code> specifies the preferred character
+ encoding that the Transformer should use to encode sequences of
+ characters as sequences of bytes. The value of the attribute should be
+ treated case-insensitively. The value must only contain characters in
+ the range #x21 to #x7E (i.e., printable ASCII characters). The value
+ should either be a <code>charset</code> registered with the Internet
+ Assigned Numbers Authority <link href="#IANA">[IANA]</link>,
+ <link href="#RFC2278">[RFC2278]</link> or start with <code>X-</code>.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>indent</td>
+ <td>
+ yes
+ </td>
+ <td>
+ A Flag for toggling indent. This flag toggles only if some elements
+ should trigger a line break.
+ </td>
+ </tr>
+ <tr><td>media-type</td>
+ <td>
+ </td>
+ <td>
+ <code>media-type</code> specifies the media type (MIME
+ content type) of the data that results from outputting the result
+ tree. The <code>charset</code> parameter should not be specified
+ explicitly; instead, when the top-level media type is
+ <code>text</code>, a <code>charset</code> parameter should be added
+ according to the character encoding actually used by the output
+ method.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>method</td>
+ <td>
+ </td>
+ <td>
+ The method attribute identifies the overall method that
+ should be used for outputting the result tree. Other non-namespaced
+ values may be used, such as "xhtml", but, if accepted, the handling
+ of such values is implementation defined. If any of the method values
+ are not accepted and are not namespace qualified,
+ then {@link javax.xml.transform.Transformer#setOutputProperty}
+ or {@link javax.xml.transform.Transformer#setOutputProperties} will
+ throw a {@link java.lang.IllegalArgumentException}.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>omit-xml-declaration</td>
+ <td></td>
+ <td>
+ <code>omit-xml-declaration</code> specifies whether the XSLT
+ processor should output an XML declaration; the value must be
+ <code>yes</code> or <code>no</code>.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>standalone</td>
+ <td></td>
+ <td>
+ <code>standalone</code> specifies whether the Transformer
+ should output a standalone document declaration; the value must be
+ <code>yes</code> or <code>no</code>.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>version</td>
+ <td>
+ </td>
+ <td>
+ <code>version</code> specifies the version of the output
+ method.
+ When the output method is "xml", the version value specifies the
+ version of XML to be used for outputting the result tree. The default
+ value for the xml output method is 1.0. When the output method is
+ "html", the version value indicates the version of the HTML.
+ The default value for the xml output method is 4.0, which specifies
+ that the result should be output as HTML conforming to the HTML 4.0
+ Recommendation [HTML]. If the output method is "text", the version
+ property is ignored.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ </table>
+ <note>
+ Former property <code>buffer-size</code> is deprecated, and is ignored.
+ </note>
+ <p>
+ The HTML Serializer sets the <code>method</code> property
+ to <code>html</code>.
+ </p>
+ </s2>
+ <s2 title="Pipeline Usage">
+ <source><![CDATA[
+...
+<map:match pattern="*.html">
+<map:generate...
+...
+<map:serialize type="html"/>
+...
+ ]]></source>
+ </s2>
+ <s2 title="Further Reading">
+ </s2>
+ </s1>
+ </body>
</document>
+
1.5 +58 -45 xml-cocoon2/src/documentation/xdocs/userdocs/serializers/serializers.xml
Index: serializers.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/serializers/serializers.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- serializers.xml 23 Dec 2002 22:40:14 -0000 1.4
+++ serializers.xml 25 Dec 2002 07:05:55 -0000 1.5
@@ -2,50 +2,63 @@
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd">
<document>
- <header>
- <title>Serializers</title>
- <version>0.9</version>
- <type>Technical document</type>
- <authors>
- <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
- </authors>
- <abstract>This document describes all of the available serializers of Cocoon.</abstract>
- </header>
- <body>
- <s1 title="Goal">
- <p>This document lists all of the available serializers of Apache Cocoon and
- describes their purpose.</p>
- </s1>
- <s1 title="Overview">
- <p>
-A serializer is the end point of an xml pipeline. It transforms SAX events into binary or char streams for final client consumption. Every pipeline match containing a generator must be terminated by a serializer.
- </p>
- <p>
-In the sitemap file, each serializer has a unique name which is mapped to a java class. One serializer name must be declared as the default serialzer. Each serializer may have additional configuration information specified in child elements.
- </p>
- <p>
- For more conceptual information about serializers see <link href="../concepts/sitemap.html">the sitemap</link>.
- </p>
- </s1>
- <s1 title="The Serializers in Apache Cocoon">
- <ul>
- <li><link href="html-serializer.html">HTML Serializer</link> (The default serializer)</li>
- <li><link href="xml-serializer.html">XML Serializer</link></li>
- <li><link href="text-serializer.html">Text Serializer</link></li>
- <li><link href="xls-serializer.html">HSSF (XLS) Serializer</link> (optional)</li>
- <li><link href="pdf-serializer.html">PDF Serializer</link> (optional)</li>
- <li><link href="ps-serializer.html">PS Serializer</link> (optional)</li>
- <li><link href="pcl-serializer.html">PCL Serializer</link> (optional)</li>
- <li><link href="wap-serializer.html">WAP/WML Serializer</link></li>
- <li><link href="svg-serializer.html">SVG Serializer</link></li>
- <li><link href="svgxml-serializer.html">SVG/XML Serializer</link></li>
- <li><link href="svgjpeg-serializer.html">SVG/JPEG Serializer</link></li>
- <li><link href="svgpng-serializer.html">SVG/PNG Serializer</link></li>
- <li><link href="svgtiff-serializer.html">SVG/TIFF Serializer</link></li>
- <li><link href="vrml-serializer.html">VRML Serializer</link></li>
- <li><link href="link-serializer.html">Link Serializer</link></li>
- </ul>
- </s1>
- </body>
+ <header>
+ <title>Serializers</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 all of the available serializers of Cocoon.</abstract>
+ </header>
+ <body>
+ <s1 title="Goal">
+ <p>
+ This document lists all of the available serializers of Apache Cocoon and
+ describes their purpose.
+ </p>
+ </s1>
+ <s1 title="Overview">
+ <p>
+ A serializer is the end point of an xml pipeline.
+ It transforms SAX events into binary or char streams for
+ final client consumption.
+ Every pipeline match containing a generator must be terminated
+ by a serializer.
+ </p>
+ <p>
+ In the sitemap file, each serializer has a unique name which
+ is mapped to a java class.
+ One serializer name must be declared as the default serialzer.
+ Each serializer may have additional configuration information
+ specified in child elements.
+ </p>
+ <p>
+ For more conceptual information about serializers
+ see <link href="../concepts/sitemap.html">the sitemap</link>.
+ </p>
+ </s1>
+ <s1 title="The Serializers in Apache Cocoon">
+ <ul>
+ <li><link href="html-serializer.html">HTML Serializer</link> (The default serializer)</li>
+ <li><link href="xhtml-serializer.html">XHTML Serializer</link></li>
+ <li><link href="xml-serializer.html">XML Serializer</link></li>
+ <li><link href="text-serializer.html">Text Serializer</link></li>
+ <li><link href="xls-serializer.html">HSSF (XLS) Serializer</link> (optional)</li>
+ <li><link href="pdf-serializer.html">PDF Serializer</link> (optional)</li>
+ <li><link href="ps-serializer.html">PS Serializer</link> (optional)</li>
+ <li><link href="pcl-serializer.html">PCL Serializer</link> (optional)</li>
+ <li><link href="wap-serializer.html">WAP/WML Serializer</link></li>
+ <li><link href="svg-serializer.html">SVG Serializer</link></li>
+ <li><link href="svgxml-serializer.html">SVG/XML Serializer</link></li>
+ <li><link href="svgjpeg-serializer.html">SVG/JPEG Serializer</link></li>
+ <li><link href="svgpng-serializer.html">SVG/PNG Serializer</link></li>
+ <li><link href="svgtiff-serializer.html">SVG/TIFF Serializer</link></li>
+ <li><link href="vrml-serializer.html">VRML Serializer</link></li>
+ <li><link href="link-serializer.html">Link Serializer</link></li>
+ </ul>
+ </s1>
+ </body>
</document>
1.2 +85 -19 xml-cocoon2/src/documentation/xdocs/userdocs/serializers/svgxml-serializer.xml
Index: svgxml-serializer.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/serializers/svgxml-serializer.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- svgxml-serializer.xml 3 Jan 2002 12:31:05 -0000 1.1
+++ svgxml-serializer.xml 25 Dec 2002 07:05:55 -0000 1.2
@@ -2,23 +2,89 @@
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd">
<document>
- <header>
- <title>SVG/XML Serializer</title>
- <version>0.9</version>
- <type>Technical document</type>
- <authors>
- <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
- </authors>
- <abstract>This document describes the svg/xml serializer of Cocoon.</abstract>
- </header>
- <body>
- <s1 title="SVG/XML Serializer">
- <p>????.</p>
- <ul>
- <li>Name : svgxml</li>
- <li>Class: org.apache.cocoon.serialization.XMLSerializer</li>
- <li>Cacheable: ????.</li>
- </ul>
- </s1>
- </body>
+ <header>
+ <title>SVG/XML 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 svg/xml serializer of Cocoon.</abstract>
+ </header>
+ <body>
+ <s1 title="SVG/XML Serializer">
+ <p>
+ The SVG serializer serializes sax events to SVG XML.
+ The output of the SVG serializer is SVG XML; the SVG XML is not
+ rasterized to any image format by this serializer.
+ </p>
+ <ul>
+ <li>Name : svgxml</li>
+ <li>Class: org.apache.cocoon.serialization.XMLSerializer</li>
+ <li>Cacheable: yes</li>
+ </ul>
+ <s2 title="Sitemap Configuration">
+ <p>
+ The SVG XML serializer is declared in the sitemap serializers section.
+ </p>
+ <source><![CDATA[
+<map:serializers ...
+...
+ <map:serializer name="xml"
+ src="org.apache.cocoon.serialization.XMLSerializer"
+ mime-type="text/xml"
+ doctype-public="-//W3C//DTD SVG 1.0//EN"
+ doctype-system="http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";
+ logger="sitemap.serializer.xml"
+ pool-grow="4" pool-max="32" pool-min="4">
+ <!-- serializer configurations -->
+...
+ </map:serializer>
+...
+ ]]></source>
+ <p>
+ The declaration of the SVG 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 SVG 1.0//EN</td>
+ <td>specifies the SVG XML public document type</td>
+ </tr>
+ <tr><td>doctype-system</td><td>http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd</td>
+ <td>specifies the SVG XML system document type</td>
+ </tr>
+ <tr><td>mime-type</td><td>text/xml</td>
+ <td>Following mime-type may be used, too:
+ <code>image/svg+xml</code>, <code>application/xml</code>.
+ The mime-type <code>text/xml</code> is the most general one.
+ </td>
+ </tr>
+ </table>
+ </s2>
+ <s2 title="Pipeline Usage">
+ <p>
+ Using the SVG XML serializer in a pipeline is just setting the
+ serializer type to svgxml. The following code snippet uses the svxml serializer:
+ </p>
+ <source><![CDATA[
+<map:match pattern="svg">
+...
+ <map:serialize type="svgxml"/>
+</map:match>
+...
+ ]]></source>
+ </s2>
+ <s2 title="Further Reading">
+ <p>
+ As SVG 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 documentation.
+ </p>
+ </s2>
+ </s1>
+ </body>
</document>
+
1.2 +68 -19 xml-cocoon2/src/documentation/xdocs/userdocs/serializers/text-serializer.xml
Index: text-serializer.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/serializers/text-serializer.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- text-serializer.xml 3 Jan 2002 12:31:05 -0000 1.1
+++ text-serializer.xml 25 Dec 2002 07:05:55 -0000 1.2
@@ -2,23 +2,72 @@
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd">
<document>
- <header>
- <title>Text Serializer</title>
- <version>0.9</version>
- <type>Technical document</type>
- <authors>
- <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
- </authors>
- <abstract>This document describes the text serializer of Cocoon.</abstract>
- </header>
- <body>
- <s1 title="Text Serializer">
- <p>????.</p>
- <ul>
- <li>Name : text</li>
- <li>Class: org.apache.cocoon.serialization.TextSerializer</li>
- <li>Cacheable: yes.</li>
- </ul>
- </s1>
- </body>
+<header>
+ <title>Text 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 text serializer of Cocoon.</abstract>
+</header>
+<body>
+ <s1 title="Text Serializer">
+ <p>
+ The Text serializer serializes xml into plain text..
+ </p>
+ <ul>
+ <li>Name : text</li>
+ <li>Class: org.apache.cocoon.serialization.TextSerializer</li>
+ <li>Cacheable: yes.</li>
+ </ul>
+ <s2 title="Sitemap Configuration">
+ <p>
+ The text Serializer is declared in the sitemap serializers section.
+ </p>
+ <source><![CDATA[
+<map:serializers...
+...
+ <map:serializer name="text"
+ src="org.apache.cocoon.serialization.TextSerializer"
+ mime-type="text/plain"
+ logger="sitemap.serializer.text"
+ />
+...
+ ]]></source>
+ <p>
+ The text Serializer sets the <code>method</code> property
+ to <code>text</code>.
+ </p>
+ </s2>
+ <s2 title="Pipeline Usage">
+ <p>
+ Using the text Serializer in a pipeline is just setting the
+ serializer type to text.
+ The following code snippet uses the text Serializer:
+ </p>
+ <source><![CDATA[
+...
+<map:match pattern="announcement.txt">
+<map:generate...
+...
+<map:serialize type="text"/>
+...
+ ]]></source>
+ <p>
+ The pipeline snippet above serializes the SAX events of the
+ announcment document resource to plain text.
+ </p>
+ </s2>
+ <s2 title="Further Reading">
+ <p>
+ As text 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>
1.2 +80 -19 xml-cocoon2/src/documentation/xdocs/userdocs/serializers/wap-serializer.xml
Index: wap-serializer.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/serializers/wap-serializer.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- wap-serializer.xml 3 Jan 2002 12:31:05 -0000 1.1
+++ wap-serializer.xml 25 Dec 2002 07:05:55 -0000 1.2
@@ -2,23 +2,84 @@
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd">
<document>
- <header>
- <title>WAP/WML Serializer</title>
- <version>0.9</version>
- <type>Technical document</type>
- <authors>
- <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
- </authors>
- <abstract>This document describes the wap/wml serializer of Cocoon.</abstract>
- </header>
- <body>
- <s1 title="WML/WAP Serializer">
- <p>????.</p>
- <ul>
- <li>Name : wap</li>
- <li>Class: org.apache.cocoon.serialization.XMLSerializer</li>
- <li>Cacheable: yes.</li>
- </ul>
- </s1>
- </body>
+ <header>
+ <title>WML 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 WML serializer of Cocoon.</abstract>
+ </header>
+ <body>
+ <s1 title="WML Serializer">
+ <p>
+ The WML serializer serializes sax events to WML.
+ The output of the WML serializer is a WML document.
+ </p>
+ <ul>
+ <li>Name : wml</li>
+ <li>Class: org.apache.cocoon.serialization.XMLSerializer</li>
+ <li>Cacheable: yes</li>
+ </ul>
+ <s2 title="Sitemap Configuration">
+ <p>
+ The WML serializer is declared in the sitemap serializers section.
+ </p>
+ <source><![CDATA[
+<map:serializers ...
+...
+ <map:serializer name="wml"
+ src="org.apache.cocoon.serialization.XMLSerializer"
+ mime-type="text/vnd.wap.wml"
+ logger="sitemap.serializer.wml">
+ <doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public>
+ <doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system>
+ </map:serializer>
+...
+ ]]></source>
+ <p>
+ The declaration of the WML 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>-//WAPFORUM//DTD WML 1.1//EN</td>
+ <td>specifies the WML public document type</td>
+ </tr>
+ <tr><td>doctype-system</td><td>http://www.wapforum.org/DTD/wml_1.1.xml</td>
+ <td>specifies the WML system document type</td>
+ </tr>
+ <tr><td>mime-type</td><td>text/vnd.wap.wml</td>
+ <td>specifies mime-type of the serialized WML document.
+ </td>
+ </tr>
+ </table>
+ </s2>
+ <s2 title="Pipeline Usage">
+ <p>
+ Using the WML Serializer in a pipeline is just setting the
+ serializer type to wml.
+ The following code snippet uses the WML Serializer:
+ </p>
+ <source><![CDATA[
+<map:match pattern="*.wml">
+...
+ <map:serialize type="wml"/>
+</map:match>
+...
+ ]]></source>
+ </s2>
+ <s2 title="Further Reading">
+ <p>
+ As WML 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>
+
1.2 +258 -20 xml-cocoon2/src/documentation/xdocs/userdocs/serializers/xml-serializer.xml
Index: xml-serializer.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/serializers/xml-serializer.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xml-serializer.xml 3 Jan 2002 12:31:05 -0000 1.1
+++ xml-serializer.xml 25 Dec 2002 07:05:55 -0000 1.2
@@ -2,24 +2,262 @@
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd">
<document>
- <header>
- <title>XML Serializer</title>
- <version>0.9</version>
- <type>Technical document</type>
- <authors>
- <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
- </authors>
- <abstract>This document describes the xml serializer of Cocoon.</abstract>
- </header>
- <body>
- <s1 title="XML Serializer">
- <p>The xml serializer is the simplest possible serializer. It
- generates an xml document from the sax events.</p>
- <ul>
- <li>Name : xml</li>
- <li>Class: org.apache.cocoon.serialization.XMLSerializer</li>
- <li>Cacheable: yes.</li>
- </ul>
- </s1>
- </body>
+ <header>
+ <title>XML 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 xml serializer of Cocoon.</abstract>
+ </header>
+ <body>
+ <s1 title="XML Serializer">
+ <p>
+ The xml serializer is the simplest possible serializer.
+ It generates an xml document from the sax events.
+ This serializer is used for serializing to any XML document
+ format, ie. SVG, WML, VRML, et. al.
+ </p>
+ <ul>
+ <li>Name : xml</li>
+ <li>Class: org.apache.cocoon.serialization.XMLSerializer</li>
+ <li>Cacheable: yes.</li>
+ </ul>
+ <s2 title="Sitemap Configuration">
+ <p>
+ The XML Serializer is declared in the sitemap serializers section.
+ </p>
+ <source><![CDATA[
+<map:serializers ...
+...
+ <map:serializer name="xml"
+ src="org.apache.cocoon.serialization.XMLSerializer"
+ mime-type="text/xml"
+ logger="sitemap.serializer.xml"
+ pool-grow="4" pool-max="32" pool-min="4">
+ <!-- serializer configurations -->
+...
+ </map:serializer>
+...
+ ]]></source>
+ <p>
+ XML Serializer can be configured, specifying elements inside of
+ the <map:serializer> body.
+ </p>
+ <s3 title="Configuration Example">
+ <p>
+ The following XML Serializer snippet is setting
+ encoding configuration for the XML Serializer
+ </p>
+ <source><![CDATA[
+<map:serializer name="xml"
+ src="org.apache.cocoon.serialization.XMLSerializer"
+ mime-type="text/xml">
+ <encoding>ISO-8859-1</encoding>
+</map:serializer>
+ ]]></source>
+ <p>
+ This configuration will result in xml output of the form
+ </p>
+ <source><![CDATA[
+<?xml version="1.0" encoding="ISO-8859-1"?>
+...
+ ]]></source>
+ </s3>
+ <p>
+ The XML Serializer accepts following configuration parameters.
+ These configurations are not Xalan specific.
+ </p>
+<!--
+#
+# Specify defaults when method="xml". These defaults serve as a base for
+# other defaults, such as output_html and output_text.
+#
+
+# XSLT properties do not need namespace qualification.
+method=xml
+version=1.0
+encoding=UTF-8
+indent=no
+omit-xml-declaration=no
+standalone=no
+media-type=text/xml
+
+# Xalan-specific output properties. These can be overridden in the stylesheet
+# assigning a xalan namespace. For example:
+# <xsl:stylesheet version="1.0"
+# xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+# xmlns:xalan="http://xml.apache.org/xslt">
+# <xsl:output method="html" encoding="UTF-8"
+# xalan:content-handler="MyContentHandler"/>
+# ...
+# Note that the colon after the protocol needs to be escaped.
+{http\u003a//xml.apache.org/xslt}indent-amount=0
+{http\u003a//xml.apache.org/xslt}content-handler=org.apache.xalan.serialize.SerializerToXML
+
+-->
+ <table>
+ <tr><th>Name</th><th>Xalan Default Value</th><th>Comment</th></tr>
+ <tr><td>cdata-section-elements</td>
+ <td>none</td>
+ <td><code>cdata-section-elements</code> specifies a whitespace delimited
+ list of the names of elements whose text node children should be output
+ using CDATA sections.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation.</link>
+ </td>
+ </tr>
+ <tr><td>doctype-public</td>
+ <td>none</td>
+ <td><code>doctype-public</code> specifies the public identifier
+ to be used in the document type declaration.
+ </td>
+ </tr>
+ <tr><td>doctype-system</td>
+ <td>none</td>
+ <td>
+ <code>doctype-system</code> specifies the system identifier
+ to be used in the document type declaration.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>encoding</td>
+ <td>none</td>
+ <td><code>encoding</code> specifies the preferred character
+ encoding that the Transformer should use to encode sequences of
+ characters as sequences of bytes. The value of the attribute should be
+ treated case-insensitively. The value must only contain characters in
+ the range #x21 to #x7E (i.e., printable ASCII characters). The value
+ should either be a <code>charset</code> registered with the Internet
+ Assigned Numbers Authority <link href="#IANA">[IANA]</link>,
+ <link href="#RFC2278">[RFC2278]</link> or start with <code>X-</code>.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>indent</td>
+ <td>
+ yes
+ </td>
+ <td>
+ A Flag for toggling indent. This flag toggles only if some elements
+ should trigger a line break.
+ </td>
+ </tr>
+ <tr><td>media-type</td>
+ <td>
+ </td>
+ <td>
+ <code>media-type</code> specifies the media type (MIME
+ content type) of the data that results from outputting the result
+ tree. The <code>charset</code> parameter should not be specified
+ explicitly; instead, when the top-level media type is
+ <code>text</code>, a <code>charset</code> parameter should be added
+ according to the character encoding actually used by the output
+ method.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>method</td>
+ <td>
+ </td>
+ <td>
+ The method attribute identifies the overall method that
+ should be used for outputting the result tree. Other non-namespaced
+ values may be used, such as "xhtml", but, if accepted, the handling
+ of such values is implementation defined. If any of the method values
+ are not accepted and are not namespace qualified,
+ then {@link javax.xml.transform.Transformer#setOutputProperty}
+ or {@link javax.xml.transform.Transformer#setOutputProperties} will
+ throw a {@link java.lang.IllegalArgumentException}.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>omit-xml-declaration</td>
+ <td></td>
+ <td>
+ <code>omit-xml-declaration</code> specifies whether the XSLT
+ processor should output an XML declaration; the value must be
+ <code>yes</code> or <code>no</code>.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>standalone</td>
+ <td></td>
+ <td>
+ <code>standalone</code> specifies whether the Transformer
+ should output a standalone document declaration; the value must be
+ <code>yes</code> or <code>no</code>.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ <tr><td>version</td>
+ <td>
+ </td>
+ <td>
+ <code>version</code> specifies the version of the output
+ method.
+ When the output method is "xml", the version value specifies the
+ version of XML to be used for outputting the result tree. The default
+ value for the xml output method is 1.0. When the output method is
+ "html", the version value indicates the version of the HTML.
+ The default value for the xml output method is 4.0, which specifies
+ that the result should be output as HTML conforming to the HTML 4.0
+ Recommendation [HTML]. If the output method is "text", the version
+ property is ignored.
+ See <link href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</link>
+ </td>
+ </tr>
+ </table>
+ <note>
+ Former property <code>buffer-size</code> is deprecated, and is ignored.
+ </note>
+ <p>
+ The XML Serializer sets the <code>method</code> property
+ to <code>xml</code>.
+ </p>
+ </s2>
+ <s2 title="Pipeline Usage">
+ <p>
+ Using the XML Serializer in a pipeline is just setting the
+ serializer type to xml.
+ The following code snippet uses the XML Serializer:
+ </p>
+ <source><![CDATA[
+...
+<map:match pattern="*.xml">
+<map:generate...
+...
+<map:serialize type="xml"/>
+...
+ ]]></source>
+ </s2>
+ <s2 title="Further Reading">
+ <p>
+ The XML serializer is usable for serializing any SAX events
+ to a plain xml output. The various xml documents
+ requires in most cases a proper configuration of following
+ parameters
+ </p>
+ <ul>
+ <li>doctype-public</li>
+ <li>doctype-system</li>
+ </ul>
+ <p>
+ Moreover the mime-type, and name attribute of the serializer definition
+ shall be set propertly.
+ </p>
+ <p>
+ Read the XML serializer configuration user documentation
+ for
+ <link href="svgxml-serializer.html">SVG/XML</link>,
+ and
+ <link href="wap-serializer.html">WML</link> in order
+ to understand using the XML serialiazer for
+ serializing to some specific XML content type.
+ </p>
+ </s2>
+ </s1>
+ </body>
</document>
+
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org