apache > cocoon
 

WML 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

Name

Value

Comment

doctype-public

-//WAPFORUM//DTD WML 1.1//EN

specifies the WML public document type

doctype-system

http://www.wapforum.org/DTD/wml_1.1.xml

specifies the WML system document type

mime-type

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