WML 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

WML Serializer

The WML serializer serializes sax events to WML. The output of the WML serializer is a WML document.

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

The WML serializer is declared in the sitemap serializers section.

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

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

NameValueComment
doctype-public-//WAPFORUM//DTD WML 1.1//EN specifies the WML public document type
doctype-systemhttp://www.wapforum.org/DTD/wml_1.1.xml specifies the WML system document type
mime-typetext/vnd.wap.wml specifies mime-type of the serialized WML document.
Pipeline Usage

Using the WML Serializer in a pipeline is just setting the serializer type to wml. The following code snippet uses the WML Serializer:

<map:match pattern="*.wml">
...
  <map:serialize type="wml"/>
</map:match>
...
      
Further Reading

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

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