1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
|
<HTML><HEAD><SCRIPT language="JavaScript" src="resources/script.js" type="text/javascript"></SCRIPT><TITLE>Cocoon</TITLE></HEAD><BODY alink="#cc0000" bgcolor="#ffffff" leftmargin="4" link="#039acc" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0086b2"><TABLE border="0" cellpadding="0" cellspacing="0" width="100%"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG border="0" height="60" hspace="0" src="resources/logo.gif" vspace="0" width="135"></TD><TD align="left" background="resources/line.gif" colspan="2" height="5" valign="top" width="100%"><IMG align="left" border="0" height="5" hspace="0" src="resources/line.gif" vspace="0" width="1"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" hspace="0" src="resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="2" height="35" valign="top" width="100%"><IMG align="right" alt="" border="0" height="35" hspace="0" src="graphics/infrastructure-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" background="resources/bottom.gif" bgcolor="#0086b2" height="20" valign="top" width="100%"><IMG align="left" border="0" height="20" hspace="0" src="resources/bottom.gif" vspace="0" width="3"></TD><TD align="right" background="resources/bottom.gif" bgcolor="#0086b2" height="20" valign="top" width="288"><TABLE border="0" cellpadding="0" cellspacing="0" width="288"><TR><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','resources/button-xml-hi.gif','resources/button-xml-lo.gif');" src="resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','resources/button-asf-hi.gif','resources/button-asf-lo.gif');" src="resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','resources/button-w3c-hi.gif','resources/button-w3c-lo.gif');" src="resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="100%"><TR><TD align="left" valign="top" width="120"><IMG border="0" height="14" hspace="0" src="resources/join.gif" vspace="0" width="120"><BR>
<A href="index.html" onMouseOut="rolloverOff('side-index');" onMouseOver="rolloverOn('side-index');"><IMG alt="Index" border="0" height="12" hspace="0" name="side-index" onLoad="rolloverLoad('side-index','graphics/index-label-2.jpg','graphics/index-label-3.jpg');" src="graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="license.html" onMouseOut="rolloverOff('side-license');" onMouseOver="rolloverOn('side-license');"><IMG alt="License" border="0" height="12" hspace="0" name="side-license" onLoad="rolloverLoad('side-license','graphics/license-label-2.jpg','graphics/license-label-3.jpg');" src="graphics/license-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
<A href="install.html" onMouseOut="rolloverOff('side-install');" onMouseOver="rolloverOn('side-install');"><IMG alt="Install" border="0" height="12" hspace="0" name="side-install" onLoad="rolloverLoad('side-install','graphics/install-label-2.jpg','graphics/install-label-3.jpg');" src="graphics/install-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="install-case-solaris.html" onMouseOut="rolloverOff('side-install-case-solaris');" onMouseOver="rolloverOn('side-install-case-solaris');"><IMG alt="Install on Solaris8" border="0" height="12" hspace="0" name="side-install-case-solaris" onLoad="rolloverLoad('side-install-case-solaris','graphics/install-case-solaris-label-2.jpg','graphics/install-case-solaris-label-3.jpg');" src="graphics/install-case-solaris-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="install-case-windows.html" onMouseOut="rolloverOff('side-install-case-windows');" onMouseOver="rolloverOn('side-install-case-windows');"><IMG alt="Install on Win2k" border="0" height="12" hspace="0" name="side-install-case-windows" onLoad="rolloverLoad('side-install-case-windows','graphics/install-case-windows-label-2.jpg','graphics/install-case-windows-label-3.jpg');" src="graphics/install-case-windows-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
<A href="technologies.html" onMouseOut="rolloverOff('side-technologies');" onMouseOver="rolloverOn('side-technologies');"><IMG alt="Technologies" border="0" height="12" hspace="0" name="side-technologies" onLoad="rolloverLoad('side-technologies','graphics/technologies-label-2.jpg','graphics/technologies-label-3.jpg');" src="graphics/technologies-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG alt="Infrastructure" border="0" height="12" hspace="0" src="graphics/infrastructure-label-1.jpg" vspace="0" width="120"><BR>
<A href="guide.html" onMouseOut="rolloverOff('side-guide');" onMouseOver="rolloverOn('side-guide');"><IMG alt="User Guide" border="0" height="12" hspace="0" name="side-guide" onLoad="rolloverLoad('side-guide','graphics/guide-label-2.jpg','graphics/guide-label-3.jpg');" src="graphics/guide-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="dynamic.html" onMouseOut="rolloverOff('side-dynamic');" onMouseOver="rolloverOn('side-dynamic');"><IMG alt="Dynamic Content" border="0" height="12" hspace="0" name="side-dynamic" onLoad="rolloverLoad('side-dynamic','graphics/dynamic-label-2.jpg','graphics/dynamic-label-3.jpg');" src="graphics/dynamic-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="how-it-works.html" onMouseOut="rolloverOff('side-how-it-works');" onMouseOver="rolloverOn('side-how-it-works');"><IMG alt="How it works" border="0" height="12" hspace="0" name="side-how-it-works" onLoad="rolloverLoad('side-how-it-works','graphics/how-it-works-label-2.jpg','graphics/how-it-works-label-3.jpg');" src="graphics/how-it-works-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
<A href="xsp.html" onMouseOut="rolloverOff('side-xsp');" onMouseOver="rolloverOn('side-xsp');"><IMG alt="XSP Processor" border="0" height="12" hspace="0" name="side-xsp" onLoad="rolloverLoad('side-xsp','graphics/xsp-label-2.jpg','graphics/xsp-label-3.jpg');" src="graphics/xsp-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="sqltaglib.html" onMouseOut="rolloverOff('side-sqltaglib');" onMouseOver="rolloverOn('side-sqltaglib');"><IMG alt="SQL XSP Taglib" border="0" height="12" hspace="0" name="side-sqltaglib" onLoad="rolloverLoad('side-sqltaglib','graphics/sqltaglib-label-2.jpg','graphics/sqltaglib-label-3.jpg');" src="graphics/sqltaglib-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="fp.html" onMouseOut="rolloverOff('side-fp');" onMouseOver="rolloverOn('side-fp');"><IMG alt="FP XSP Taglib" border="0" height="12" hspace="0" name="side-fp" onLoad="rolloverLoad('side-fp','graphics/fp-label-2.jpg','graphics/fp-label-3.jpg');" src="graphics/fp-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="connection-pool.html" onMouseOut="rolloverOff('side-connection-pool');" onMouseOver="rolloverOn('side-connection-pool');"><IMG alt="SQL Conn Pool" border="0" height="12" hspace="0" name="side-connection-pool" onLoad="rolloverLoad('side-connection-pool','graphics/connection-pool-label-2.jpg','graphics/connection-pool-label-3.jpg');" src="graphics/connection-pool-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="sql.html" onMouseOut="rolloverOff('side-sql');" onMouseOver="rolloverOn('side-sql');"><IMG alt="SQL Processor" border="0" height="12" hspace="0" name="side-sql" onLoad="rolloverLoad('side-sql','graphics/sql-label-2.jpg','graphics/sql-label-3.jpg');" src="graphics/sql-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="ldap.html" onMouseOut="rolloverOff('side-ldap');" onMouseOver="rolloverOn('side-ldap');"><IMG alt="LDAP Processor" border="0" height="12" hspace="0" name="side-ldap" onLoad="rolloverLoad('side-ldap','graphics/ldap-label-2.jpg','graphics/ldap-label-3.jpg');" src="graphics/ldap-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="dcp.html" onMouseOut="rolloverOff('side-dcp');" onMouseOver="rolloverOn('side-dcp');"><IMG alt="DCP Processor" border="0" height="12" hspace="0" name="side-dcp" onLoad="rolloverLoad('side-dcp','graphics/dcp-label-2.jpg','graphics/dcp-label-3.jpg');" src="graphics/dcp-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
<A href="wd-xsp.html" onMouseOut="rolloverOff('side-wd-xsp');" onMouseOver="rolloverOn('side-wd-xsp');"><IMG alt="XSP WD" border="0" height="12" hspace="0" name="side-wd-xsp" onLoad="rolloverLoad('side-wd-xsp','graphics/wd-xsp-label-2.jpg','graphics/wd-xsp-label-3.jpg');" src="graphics/wd-xsp-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
<A href="./api/index.html" onMouseOut="rolloverOff('side-ext-48');" onMouseOver="rolloverOn('side-ext-48');"><IMG alt="Javadocs" border="0" height="12" hspace="0" name="side-ext-48" onLoad="rolloverLoad('side-ext-48','graphics/ext-48-label-2.jpg','graphics/ext-48-label-3.jpg');" src="graphics/ext-48-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
<A href="cocoon2.html" onMouseOut="rolloverOff('side-cocoon2');" onMouseOver="rolloverOn('side-cocoon2');"><IMG alt="Cocoon 2" border="0" height="12" hspace="0" name="side-cocoon2" onLoad="rolloverLoad('side-cocoon2','graphics/cocoon2-label-2.jpg','graphics/cocoon2-label-3.jpg');" src="graphics/cocoon2-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
<A href="faqs.html" onMouseOut="rolloverOff('side-faqs');" onMouseOver="rolloverOn('side-faqs');"><IMG alt="FAQ" border="0" height="12" hspace="0" name="side-faqs" onLoad="rolloverLoad('side-faqs','graphics/faqs-label-2.jpg','graphics/faqs-label-3.jpg');" src="graphics/faqs-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="changes.html" onMouseOut="rolloverOff('side-changes');" onMouseOver="rolloverOn('side-changes');"><IMG alt="Changes" border="0" height="12" hspace="0" name="side-changes" onLoad="rolloverLoad('side-changes','graphics/changes-label-2.jpg','graphics/changes-label-3.jpg');" src="graphics/changes-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="todo.html" onMouseOut="rolloverOff('side-todo');" onMouseOver="rolloverOn('side-todo');"><IMG alt="Todo" border="0" height="12" hspace="0" name="side-todo" onLoad="rolloverLoad('side-todo','graphics/todo-label-2.jpg','graphics/todo-label-3.jpg');" src="graphics/todo-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
<A href="livesites.html" onMouseOut="rolloverOff('side-livesites');" onMouseOver="rolloverOn('side-livesites');"><IMG alt="Live Sites" border="0" height="12" hspace="0" name="side-livesites" onLoad="rolloverLoad('side-livesites','graphics/livesites-label-2.jpg','graphics/livesites-label-3.jpg');" src="graphics/livesites-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
<A href="http://xml.apache.org/websrc/index.cgi/xml-cocoon/" onMouseOut="rolloverOff('side-ext-68');" onMouseOver="rolloverOn('side-ext-68');"><IMG alt="Code Repository" border="0" height="12" hspace="0" name="side-ext-68" onLoad="rolloverLoad('side-ext-68','graphics/ext-68-label-2.jpg','graphics/ext-68-label-3.jpg');" src="graphics/ext-68-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="http://xml.apache.org/from-cvs/xml-cocoon/" onMouseOut="rolloverOff('side-ext-70');" onMouseOver="rolloverOn('side-ext-70');"><IMG alt="Dev Snapshots" border="0" height="12" hspace="0" name="side-ext-70" onLoad="rolloverLoad('side-ext-70','graphics/ext-70-label-2.jpg','graphics/ext-70-label-3.jpg');" src="graphics/ext-70-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="mail-lists.html" onMouseOut="rolloverOff('side-mail-lists');" onMouseOver="rolloverOn('side-mail-lists');"><IMG alt="Mail Lists" border="0" height="12" hspace="0" name="side-mail-lists" onLoad="rolloverLoad('side-mail-lists','graphics/mail-lists-label-2.jpg','graphics/mail-lists-label-3.jpg');" src="graphics/mail-lists-label-3.jpg" vspace="0" width="120"></A><BR>
<A href="http://mail-archives.apache.org/" onMouseOut="rolloverOff('side-ext-74');" onMouseOver="rolloverOn('side-ext-74');"><IMG alt="Mail Archive" border="0" height="12" hspace="0" name="side-ext-74" onLoad="rolloverLoad('side-ext-74','graphics/ext-74-label-2.jpg','graphics/ext-74-label-3.jpg');" src="graphics/ext-74-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="14" hspace="0" src="resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="*"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD><BR>
<DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>A Publishing Infrastructure</B></FONT></TD><TD background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG border="0" height="12" hspace="0" src="resources/void.gif" vspace="0"></TD><TD align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">
<P align="justify">The Cocoon project aims at changing the way web information is
created, rendered and served. This new paradigm is based on the fact
that document content, style and logic are often created by different
individuals or working groups. Cocoon's goal of a complete separation
of the three layers, allows them to be independently designed, created
and managed. This reduces management overhead, increases work reuse
and reduces time to market.</P>
<P align="justify">The Cocoon publishing model is heavily based on the XSLT
transformation capabilities. XSLT allows complete separation of
content and style (something that is much harder to obtain with HTML,
even using CSS2 or other styling technologies). But Cocoon goes
further and defines a way of separating content and style from the
programming logic that drives server side behavior.</P>
<P align="justify">This fact has been widely acknowledge by most major vendors:
Microsoft, IBM, SUN, Oracle, etc. All of these vendors offer XML and
XSL processors. Cocoon uses these technologies and incorporates them
into a publishing infrastructure. </P>
<P align="justify">An infrastructure must have these characteristics:</P>
<BLOCKQUOTE><UL>
<LI>pervasive scope</LI>
<LI>standardize access points</LI>
<LI>minimal (almost zero) user intervention</LI>
<LI>transparent service provision</LI>
<LI>applicability to existing and future applications</LI>
</UL></BLOCKQUOTE>
<P align="justify">Cocoon has a pervasive scope as it address all aspects of the web
publishing needs. Even if the most common use of Cocoon is the
automatic creation of HTML (and XHTML) 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. Cocoon can even apply different stylesheets to a unique XML
content based on the requesting client.</P>
<P align="justify">Once installed on a web server such as Site Server, Apache or
Netscape. Cocoon doesn't require any user intervention. It is there
and usable for content publishing. Only when creating a custom XML
processor does one need to touch Cocoon itself.</P>
<P align="justify">Cocoon offers transparent services with its API available through a
simple XML syntax suitable for most of any users needs. With the more
specialized needs a simple and effective Java interface provides the
access needed for a more powerful manipulation of XML elements.</P>
<P align="justify">Finally, Cocoon is applicable to existing and future
applications. This is due in part to the fact that XML is the glue
used to connect most of the parts together; ensuring a long life to
the content and an easy interface to current applications. The way
Cocoon handles dynamic site creation also enhances Cocoon's
applicability to current and future applications needs.</P>
</FONT></TD></TR></TABLE></DIV><BR>
<DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>Publishing Static Content</B></FONT></TD><TD background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG border="0" height="12" hspace="0" src="resources/void.gif" vspace="0"></TD><TD align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">
<P align="justify">Cocoon can apply different stylesheets to different clients. In the
more esoteric examples, it allows one to create a WML and HTML output
version of the same content file. In most cases, HTML is the desired
output. The reason is that unless the XML and XSL aware client can
understand the same version of the standard as the one Cocoon is using
(XML 1.0 and XSLT 1.0) then only HTML can be truly be seen as a
suitable output for today's web publishing needs. </P>
<P align="justify">This means that server side processing of the XML content files are
needed. This is done by creating an XML and an appropriate XSL
file. This is the standard way of generating HTML files from XML
content. What Cocoon offers is a transparent way of doing this
processing. There is no need to write an ASP, JSP or CGI to call an
XML parser and then process the output with an XSL processor. This is
automatically handled by Cocoon's infrastructure.</P>
<P align="justify">In that infrastructure, it is possible to chain calls to XSLT
processors. This has the possibly great advantage of separating all
the layers of the publishing needs: flow, layout and display. A user
concentrates on writing a content file. Cocoon can then call a first
transformation that deals with the flow. The flow transformation
usually adds menus suitable for a directory, a whole site or any
special need of the content file. The flow transformation can then
call a layout transformation sheet. That sheet will add more layout
information such as headers, footers, color schemes, etc. Finally the
display transformation would handle the actual HTML transformation
from the output of all the previous processing.</P>
<P align="justify">Although the previous example is overkill for most web sites
needs, Cocoon's effective caching system ensures that multiple XSLT
transformations do not hinder in any way the speed at which they are
presented to the user. The transformation is done once and the
resulting HTML output is presented many times.</P>
<P align="justify">Cocoon's infrastructure can also be applied to an offline
scenario. This generates HTML files in the case of web sites. However
a very complex processing can be performed on the XML files, a
processing that might be too time consuming on runtime scenarios:
automatic image generation, flow generation by directory analysis,
etc. An example of an offline scenario can be seen at Cocoon's site
(<A href="http://xml.apache.org/cocoon/">http://xml.apache.org/cocoon</A>).
On that site, the menus and headers
are automatically generated by processing XML content files, this
allows for a more professional look and feel, yet it doesn't require
an artist each time a label changes.</P>
</FONT></TD></TR></TABLE></DIV><BR>
<DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>Publishing Dynamic Content</B></FONT></TD><TD background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG border="0" height="12" hspace="0" src="resources/void.gif" vspace="0"></TD><TD align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">
<P align="justify">In dynamic content generation technology, content and logic are
combined: in every page there is a mix of static content and dynamic
logic that work together to create the final result, usually using
run-time or time-dependent input. XSP is no exception, since it
defines a syntax to mix static content and programmatic logic in a way
that is independent of both the programming language used and the
binary results that the final source-rendering generated.</P>
<P align="justify">But it must be understood that XSP is just a piece of the
framework: exactly like how formatting objects mix style and content,
XSP objects mix logic and content. On the other hand, since both are
XML DTDs, XSLT can be used to move from pure content to these final
DTDs, placing the style and logic on the transformation layers and
guaranteeing complete separation and easier maintenance.</P>
<P align="justify">Other ways to create dynamic content is through XSP taglib,
processors and formatters. XSP taglib allows cocoon to map XML elements
to processing instructions. The custom cocoon processors can go
through an XML document and modify its content. Finally, the formatters
are used to generate XML documents based on a user's request and
its session information.</P>
<P align="justify">Together these elements offer the equivalent of COM and CORBA. They
offer a way to solve the interoperability problem between different
applications. In the Cocoon infrastructure, XML becomes the API from
which other components are called. Whether COM, CORBA, Java or any
other language is actually called becomes transparent to the user. The
user only needs to know about the XML API which, by definition, should
strive to be human readable. This makes debugging and maintenance a
lot easier.</P>
<P align="justify">This approach to dynamic content generation is quite different from
other methods. The typical method proposed by SUN and Microsoft is to
generate and XML output from a servlet or ASP page, then process it
with an XSLT processor. Some of the drawbacks of that method are:</P>
<BLOCKQUOTE><UL>
<LI>Logic and content are mixed. Editing such a file requires more
senior programmers than editing a simple XML file.</LI>
<LI>There is no proper multiple XSLT processing. This can be
individually programmed, however it is a difficult problem and might
prevent some web servers from effectively caching the output.</LI>
<LI>The XML output must be display friendly. This means that the
output XML must be easily understandable by the final XSLT file to
generate a suitable HTML file. Sometimes, an XML element must be
converted to be more suitable to a given display context. This process
can be automated inside Cocoon by adding XSLT transformations and
adding display <I>hints</I>. However, inside a JSP or ASP page,
programmers will tend to write more in term of the display and less of
the semantic.</LI>
<LI>Reusability is limited. With Cocoon's approach, it is
straightforward for a content writer to add a <locale:date> tag
inside his document. That tag will call the proper functionality
required to display the current date in the user's current
locale. Without Cocoon, this becomes a lot more cumbersome since the
programmer must explicitly call the proper functions and incorporate
the result inside the XML output stream. In that case, locale
considerations might not have been made across the site, this is
difficult to check with the content mixed with the logic.</LI>
</UL></BLOCKQUOTE>
</FONT></TD></TR></TABLE></DIV><BR>
<DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>Conclusion</B></FONT></TD><TD background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG border="0" height="12" hspace="0" src="resources/void.gif" vspace="0"></TD><TD align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">
<P align="justify">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.</P>
<P align="justify">To do this, the Cocoon model divides the development of web content
in three separate levels:</P>
<BLOCKQUOTE><DL>
<LI><STRONG>XML creation</STRONG> - </LI>
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 is done through human intervention or through
dynamic generation.
<LI><STRONG>XML processing</STRONG> - </LI>
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.
<LI><STRONG>XSL rendering</STRONG> - </LI>
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)
</DL></BLOCKQUOTE>
<P align="justify">Unlike other XML projects, Cocoon concentrates on solving the
publishing infrastructure problem. In that respect it is ahead of a
lot of the major vendors that up to now seem to only worry about the
technology needed and less about how it integrates into a publishing
framework.</P>
</FONT></TD></TR></TABLE></DIV><BR>
</TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="100%"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1"></TD></TR><TR><TD align="center"><FONT color="#0086b2" face="arial,helvetica,sanserif" size="-1"><I>
Copyright © 1999-2000 The Apache Software Foundation.
All Rights Reserved.
</I></FONT></TD></TR></TABLE></BODY></HTML>
|