Remon wrote:
Hi Luca,
I just want to integrate WALL in cocoon, I need to find a way to pass a
universal markup (understood by my program) which is in XML format from
cocoon XML transformer or generator to the custom serializer and let this
serializer decides whether to serve the client with WML or HTML or CHTML ...
This means that the output markup and content type will be decided by the
serializer.
Look, serializers are meant to be "dumb" components in Cocoon while the
routing is done by the sitemap itself (or flowscript/javaflow).
If I were you I'd call the HTML (or WML) serializer from the sitemap
itself using the browser seletor, hence dropping this logic from your
package: this solution would add some flexibility and play on the
existing Cocoon components.
The sitemap would look something like:
<map:match pattern="hello">
<map:generate src="hello.xml"/>
<map:transform type="wall"/>
<map:select type="browser">
<map:when test="wap-useragent">
<map:serialize type="wml"/>
</map:when>
<map:otherwise>
<map:serialize type="html"/>
</map:otherwise>
</map:select>
</map:match>
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------