OSS Hatches Format-Independent Web Server

Organizations that want to automate the publishing of data to the Web are confronted with a number of hurdles, not the least of which is the problem of reliably rendering documents in different formats. That could soon change. An open source software (OSS) community project, dubbed Cocoon, may soon give Web developers the means of consistently rendering data, as well as the ability to reliably automate the process of both creating and serving it.

According to its caretakers, Cocoon -- an offshoot of the OSS community's Apache XML Project (xml.apache.org) -- aims to change the way that information on the Web is created, rendered, and served. Cocoon's proponents point to the fact that document content, style, and logic are often engineered separately by different teams or project groups. This process can create interoperability problems or lead to anarchy in the development process, which in turn increases time-to-market or lengthens development schedules. When Cocoon is fully realized, supporters claim it will enable Web applications to be independently designed, created, and managed.

Cocoon consists of nothing more than a Java servlet that exploits a new technology -- Extensible Stylesheet Language, or XSL -- to transform Web pages encoded in XML. Although it is enabled by virtue of both Java and XML, Cocoon has adopted several new standards, including XSL, XSL Transformations, and the Document Object Model Level 2.

Despite the advantages XML brings to the table, Web content generation today is still based largely on HTML, which doesn't necessarily complement the Web development processes of most IT organizations. For example, HTML does not provides a native provision for separating data from its presentation, nor does it allow for the mixing of formatting tags, descriptive tags, and programmable logic on the client or on the server. Because it can exploit XSL's new transformation capabilities, however, Cocoon can dynamically merge content, programming logic, and style.

Cocoon's advantage is that it can facilitate individual presentations of data precisely tailored to the specific application that requests it, say proponents. Rather than maintaining separate copies of HTML, PDF, and WML files, for example, Cocoon lets a Web development team maintain one source file that could be rendered on-the-fly into any supported format when requested by a connecting client.

Cocoon works by breaking the Web development process down into three stages: XML creation, XML processing, and XSL rendering. In the first stage, an XML file is created by a development team that doesn't necessarily have to be aware of the manner in which the content itself is to be processed further on down the line, but need only know its particular DTD/namespace. In the second stage, the XML file is processed, and whatever programming logic it contains in its separate logic sheet is then applied. In the third stage, the document is rendered by applying an XSL style sheet to it and structuring it in the precise format -- such as HTML, PDF, or WML -- of the application that requests it.

Along with Cocoon, XML-related OSS initiatives such as Xerces, Xalan, and FOP are being sponsored under the auspices of the Apache XML project. Apache's strong commitment to XML will be a boon for both open systems and open data formats, according to Tim Bray, a member of the xml.apache.org project management committee and co-editor of the World Wide Web Consortium's (www.w3.org) XML specification. "The combination of Apache and XML is going to hasten the day when proprietary system software and proprietary data formats are both regarded as quaint antiquities," he states.