The Apache Software Foundation is proud to present... Version: 2.1.12

Hello, World!

Orthogonal views: Content   Pretty content   Links

Back

Back - Back to the samples home page.

About

All examples on this page have been created using a single data source, hello.xml file.

XML - Hello world XML document.

Multichannel Hello World!

HTML - This page shows how a simple XML page can be presented in HTML.
XHTML - 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.
WML - 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).
CHTML - Or, as CHTML (Compact HTML), which is used by i-Mode compatible cell phones.
SVG - 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.)
SWF - 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.
VRML - 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 this).
VoiceML - 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.

Hello Office!

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.

RTF - Hello from the jfor block in Rich Text Format.
PDF - Hello from the fop block in Portable Document Format.
PS - Hello from the fop block in PostScript format.
PDF - Another hello in Portable Document Format, from the itext block.
JPEG - Hello from the batik block in JPEG.
PNG - Hello from the batik block in PNG.
XLS - Hello in Excel spreadsheet format from the POI block.
HTML - Hello in the HTML format, but now with help from stx block.