Articles
More
Links
This document describes site reconstruction need for WAP enabling this site. By starting this site I intended to publish the content via WAP; but some problems always pop up late.
The first step was creating a new stylesheet site2wml.xsl
transforming the xml documents from document-xml to wml. It works
analogous to site2html.xsl.
Next you need to enhance the sitemap.xmap handling wml
pages. Creating the site page by aggregation, and transforming the site
page to wml using the create site2wml.xsl.
The next step was testing and fixing WML coding errors in the
site2wml.xsl. Finally I uploaded the wml pages to a server,
created a Link http://members.a1.net/csscolumnsite/index.wml
on my WAP handset.
The sitemap changes for serving WML files in several areas
Sitemap snippet declaring the WML serializer:
<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>
<encoding>iso8859-1</encoding>
<omit-xml-declaration>no</omit-xml-declaration>
</map:serializer>
...
Sitemap snippet defining the WML pipeline. It include already the later described Paginator transformer.
<map:pipelines...
<!-- handle paginated wml pages
-->
<map:match pattern="*(*).wml">
<map:act type="link-translator-map" src="{1}.wml"/>
<map:call resource="show-page">
<map:parameter name="page" value="{1}"/>
</map:call>
<map:transform type="paginate"
src="pagesheets/wmlpages.xml">
<map:parameter name="page" value="{2}"/>
</map:transform>
<map:transform src="stylesheets/site2wml.xsl"/>
<map:serialize type="wml"/>
</map:match>
<!-- handle non paginated wml pages
-->
<map:match pattern="*.wml">
<map:act type="link-translator-map" src="{1}.wml"/>
<map:call resource="show-page">
<map:parameter name="page" value="{1}"/>
</map:call>
<map:transform type="paginate"
src="pagesheets/wmlpages.xml">
<map:parameter name="page" value="1"/>
</map:transform>
<map:transform src="stylesheets/site2wml.xsl"/>
<map:serialize type="wml"/>
</map:match>
</map:pipeline>
...
Setting up the sitemap and using the site2wml.xsl
stylesheet. This site is WML publishing enabled.
Hints
» Use Search to search all documents.
» Use Recreate Index to create the inital index.
This may be neccessary once at startup.
» Search and Recreate Index are available
at HTML Cocoon online deployment, only.
» Search and Recreate Index are not available
on WML online, WML offline, and HTML offline deployments.