http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Index
License
Install

Technologies
Infrastructure
User Guide
Dynamic Content

XSP Processor
SQL XSP Taglib
SQL Processor
LDAP Processor
DCP Processor

XSP WD

Javadocs

Cocoon 2
Javadoc XML

FAQ
Changes
Todo

Live Sites

Code Repository
Dev Snapshots
Mail Archive
Bug Database


What is it?

Cocoon Cocoon is a 100% pure Java publishing framework that relies on new W3C technologies (such as DOM, XML, and XSL) to provide web content.

The Cocoon project aims to change the way web information is created, rendered and served. This new paradigm is based on fact that document content, style and logic are often created by different individuals or working groups. Cocoon aims to a complete separation of the three layers, allowing the three layers to be independently designed, created and managed, reducing management overhead, increasing work reuse and reducing time to market.

Read the Introduction on Cocoon technologies white paper to find out more on the subject.


What does it do?

Web content generation is mostly based on HTML, but HTML doesn't separate the information from its presentation, mixing formatting tags, descriptive tags and programmable logic (both on server side and client side). Cocoon changes this view allowing content, logic and style on different XML files and uses XSL transformation capabilities to merge them.


What does it change for me?

Even if the most common use of Cocoon is the automatic creation of HTML through the processing of statically or dynamically generated XML files, Cocoon is also able to perform more sophisticated formatting, such as XSL:FO rendering on PDF, client-depending transformations such as WML formatting for WAP-enabled devices or direct XML serving to XML and XSL aware clients.

The Cocoon model allows web sites to be highly structured and well designed, reducing duplication efforts and site management costs by allowing different presentations of the same data depending on the requesting client (HTML clients, PDF clients, WML clients) and separating on different contexts different requirements, skills and capacities. Cocoon allows a better human resource management by giving to each individual its job and reducing to a minimum the cross-talks between different working contexts.

To do this, the Cocoon model divides the development of web content in three separate levels:

  • XML creation - the XML file is created by the content owners. They do not require specific knowledge on how the XML content is further processed rather than the particular chosen DTD/namespace. This layer is always performed by humans directly through normal text editors or XML-aware tools/editors.
  • XML processing - the requested XML file is processed and the logic contained in its logicsheet is applied. Unlike other dynamic content generators, the logic is separated from the content file.
  • XSL rendering - the created document is then rendered by applying an XSL stylesheet to it and formatting it to the specified resource type (HTML, PDF, XML, WML, XHTML)

  • Are there any known problems?

    The biggest known problem in this framework is the lack of XML/XSL knowledge, being relatively new formats. We do believe, though, that this publishing framework will be a winner in web sites of medium to high complexity and will lead the transition from an HTML-oriented to a XML-oriented web publishing model, still allowing the use of existing client technologies as well as supporting new types of clients (such as WAP-aware ultra thin clients like cell phones or PDAs).

    Even if considered heavy and hype overloaded, the XML/XSL pair will do magic once its public knowledge receives the spread it deserves. This project wants to be a small step in this direction, helping people to learn this technology and to focus on what they need with examples, tutorial and source code and a real-life system carefully designed with portability, modularity and real-life usage in mind.

    The main concern remains processing complexity: the kind of operations required to process the document layers are complex and not designed for real-time operation on the server side. For this reason, Cocoon is designed to be a page compiler for dynamic pages, trying to hardcode, whenever possible, those layers in precompiled binary code coupled with an adaptive and memory-wise cache system for both static and dynamic pages. Most of the development effort is focused on performance improvement of both processing subsystems as well as the creation and testing of special cache systems.

    Another problem is the intrinsic impossibility of page-compiling all the three processing layers, due to the post-processing requirements of XSL styling. This problem will be solved (hopefully!) with the availability of XSL-enabled web browsers since the XSL rendering would be then performed on client side reducing the server work.


    Are there books that cover this stuff?

    Yes, even if XML publishing is a brand new area, the incredible acceptance of these technologies urged editors to provide books that covered the subject. While many books that cover XML exist, one of them dedicates an entire chapter to XML publishing frameworks and Cocoon in particular and that chapter was made available free of charge here. Our greatful thanks go to both O'Reilly and Brett McLaughlin for this.


    Where do I get it?

    The official distribution site is here.

    Note Since Cocoon requires many different packages to work (Xerces, Xalan, FOP, etc...) but sometimes there are small incompatibilities between them that make the installation harder, we decided to help you by placing all the required binary libraries inside the Cocoon distribution. So, after you downloaded the latest Cocoon distribution, you don't need anything else.

    But, if you want, you can find unofficial RPM packages here.


    How do I Contribute?

    The Cocoon Project is an open volunteer project based on the spirit of the Apache Software Foundation (ASF). This means that there are lots of ways to contribute to the project, either with direct participation (coding, documenting, answering questions, proposing ideas, reporting bugs, suggesting bug-fixes, etc..) or by resource donation (money, time, publicity, hardware, software, conference presentations, speeches, etc...).

    For direct participation, we suggest you to subscribe to the Cocoon mail lists (follow the link for information on how to subscribe and to access the mail list archives), to checkout the latest and greatest code (which you found in the xml-cocoon module in the xml.apache.org CVS code repository, or from the CVS snapshots), control the todo list and jump in. Document writers are usually the most wanted people so if you like to help but you're not familiar with technical details, don't worry: we have work for you.

    For money funding in particular, the Cocoon Project and the ASF in general is closely collaborating with the Collab.net SourceXchange program that will provide a legal, solid and well established resource for money collecting to fund direct software production under the open source flag. Please, feel free to contact directly Cocoon's main architect and project creator Stefano Mazzocchi or the ASF President and Collab.net co-founder Brian Behlendorf for more information on how to contribute directly to the advancement of this project.

    Anyway, a great way of contributing back to the project is to allow others to know about it so that the word spreads and others may wish to contribute, so, please, help us by placing the cocoon logo somewhere in your site to indicate that you are using and supporting the Cocoon Project.

    Thank you very much. Powered by Cocoon



    Copyright © 1999-2000 The Apache Software Foundation. All Rights Reserved.