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>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>
-
-