SVG/XML Serializer
http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Main
User Documentation

Serializers
Overview

Default
HTML Serializer

Core
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

Optional
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"
    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>
...
      

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

NameValueComment
doctype-public-//W3C//DTD SVG 1.0//EN specifies the SVG XML public document type
doctype-systemhttp://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd 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"/>
</map:match>
...
      
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.