Cocoon 2.0 and Beyond

Cocoon 2.0, the next generation of Cocoon, promises to be a giant leap forward for the web publishing framework. Cocoon 1.x, which is primarily based on XML being transformed via XSL, still has some serious limitations. First, it does not significantly reduce the management costs of large sites. While one XML document can be transformed into different client views, a significant number of documents will still exist. Generally, either long URIs (such as /content/publishing/books/javaxml/contents.xml), a large number of virtual path mappings (/javaxml mapped to /content/publishing/books/javaxml), or a combination of the two result. In addition, a strict separation of presentation from content from logic is difficult to accomplish, and even more difficult to manage.

Cocoon 2 focuses on enforcing the contracts between these different layers, therefore reducing management costs. XSP is a centerpiece in this design. In addition, the sitemap allows the distinction between XSP, XML, and static HTML pages to be hidden from the prying user. Advanced precompilation and memory considerations will also be introduced to make Cocoon 2 even more of an advance over Cocoon 1.x than Cocoon 1.x was over a standard web server.

Servlet Engine Mappings

A significant change in Cocoon 2 is that it no longer requires a simple mapping for XML documents. While this works well in the 1.x model, it still leaves management of non-XML documents to the webmaster, possibly someone completely ...

Get Java and XML, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.