Cocoon Core Samples

Cocoon Pipelines

Hello World! - Generating various types of content from XML documents and data sources.

Cocoon Sitemap

Sources - This example shows the usage of sources in the sitemap.
Expressions - This example shows the usage of input modules in the sitemap attribute expressions.
Content Syndication & Aggregation - Separation of content and style allows not only to serve your content in different ways, but also to syndicate, aggregate or otherwise include and transform content provided by other web sites.
Error Handling - An example page producing exceptions and handling them. Demonstrates the error handlers hierarchy and the exception selectors.

Cocoon Flow

These are basic examples of Flow usage, but it is also used in the samples of several other blocks, see the forms and tour blocks for more advanced examples.

Calculator - A simple web-based calculator that uses javascript on the server side to describe the web application flow between screens in a coherent unique location and continuations to maintain state between requests.
User Preferences - A common portion of an application which requires users to be registered. This example shows how to use java objects from the javascript flow as it is best practice to put business logic into strongly-typed java objects and use javascript to describe only the page flow.


Internationalization (i18n) & Localization (l10n) - Samples of the powerful Cocoon i18n and l10n Cocoon tools.


XML Based Sites - A couple of existing web sites have been converted to XML to show you how much easier it is to handle pure-content markup.
Presentation Slides - An example of more complex use of XSLT for navigation and content filtering.
Catalog Entity Resolver - XML is handy but also very complex. Cocoon integrates a number of facilities to help you during your journey through XML-land. One of these is the centralized handling of resolving network resources (e.g. DTDs, symbols, character entity sets, images) to local copies through the use of catalogs. Also explains how to use DocBook DTDs.

Development Samples

Spring Sample - A simple example of using a per sitemap Spring application context.
Class Reloading - Trivial sample of class reloading.
Components - Samples of various components included with the Cocoon core, such as Stream Generator, Paginator Transformer, Image Reader.

System Tools And Pages

System Tools - Display Cocoon status, clear the Cocoon cache, etc.