Back to the samples home page.
All examples on this page have been created using a single data source,
Hello world XML document.
Multichannel Hello World!
This page shows how a simple XML page can be presented in HTML.
This is the same page as above, but rendered in XHTML (which is the
well-formed XML version of HTML). Note that both the page and the
stylesheet used to transform it didn't change from the previous
example, Cocoon does everything for you by setting a different serializer.
By changing the stylesheet, it's possible to render the same content
for consumption on different devices. Here, for example, it's rendered
in WML (Wireless Markup Language) which is the markup language used
in WAP-enabled agents (such as PDA or cell phones).
Or, as CHTML (Compact HTML), which is used by i-Mode compatible cell phones.
Given the power of XSLT and the fact that many presentation languages are
based on the XML syntax, it is possible to generate even vector graphics
from your content. Here is an example that renders to SVG (Scalable Vector
Graphics). (You need an SVG plugin, or an SVG-capable browser to see this.)
Flash is everywhere. In fact many people have the plugin installed.
Let Cocoon configure your flash movie. A little action script and you set.
See this sample how it works.
Plain Text -
Sometimes you don't need to be very fancy, so here is a plain text
version of your content.
But sometimes you need to be fancy to impress people, so here is a 3D
version of your content (you need a VRML plugin in your browser to visualize
Or sometimes you don't even have a display in front of you, so you want to
hear your content, so here is a VoiceML representation of your content (you
need a VoiceML-capable agent to hear this).
Zip archive -
Or you might want your information nicely packaged as a zip file.
OpenOffice Writer -
This document shows how a simple XML page can be presented in OpenOffice Writer file format.
OpenOffice Calc -
This spreadsheet shows how a simple XML page can be presented in OpenOffice Calc file format.
OpenOffice Impress -
This presentation shows how a simple XML page can be presented in OpenOffice Impress file format.
OpenOffice Draw -
This drawing shows how a simple XML page can be presented in OpenOffice Draw file format.
MS Word 2003 -
This document shows how a simple XML page can be presented in MS Word 2003 XML file format.
Hello World Web Service
Web Service -
Here is a super-simple web service that says hi!
Web Service WSDL Descriptor -
And this is the corresponding WSDL descriptor.
Blocks Hello World!
These samples only work if the corresponding blocks are activated
at build time.
Hello from the jfor block in Rich Text Format.
Hello from the fop block in Portable Document Format.
Hello from the fop block in PostScript format.
Another hello in Portable Document Format, from the itext block.
Hello from the batik block in JPEG.
Hello from the batik block in PNG.
Hello in Excel spreadsheet format from the POI block.
Hello in the HTML format, but now with help from stx block.