SVG/XML Serializer

User Documentation


HTML Serializer

XHTML Serializer
XML Serializer
Text Serializer
WAP/WML Serializer
SVG Serializer
SVG/XML Serializer
SVG/JPEG Serializer
SVG/PNG Serializer
SVG/TIFF Serializer
VRML Serializer
Link Serializer
Zip archive Serializer

PDF Serializer
PS Serializer
PCL Serializer
HSSF (XLS) Serializer

SVG/XML Serializer

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.

  • Name : svgxml
  • Class: org.apache.cocoon.serialization.XMLSerializer
  • Cacheable: yes
Sitemap Configuration

The SVG XML serializer is declared in the sitemap serializers section.

<map:serializers ...
  <map:serializer name="xml"
    doctype-public="-//W3C//DTD SVG 1.0//EN"
    pool-grow="4" pool-max="32" pool-min="4">
    <!-- serializer configurations -->

The declaration of the SVG serializer shall use following XML serializer configuration parameters

doctype-public-//W3C//DTD SVG 1.0//EN specifies the SVG XML public document type
doctype-system specifies the SVG XML system document type
mime-typetext/xml Following mime-type may be used, too: image/svg+xml, application/xml. The mime-type text/xml is the most general one.
Pipeline Usage

Using the SVG XML serializer in a pipeline is just setting the serializer type to svgxml. The following code snippet uses the svxml serializer:

<map:match pattern="svg">
  <map:serialize type="svgxml"/>
Further Reading

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 XML serializer user documentation.

Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.