Cocoon is much more complicated than a simple Xalan, but the advantage is
that you don't have to produce (generate) the html from xml and xsl, and
then put them on your server. In Cocoon is the server application: you make
the xml and the xsl, and in another file (called the sitemap) you say what
must be done depending the request.
Cocoon can for example recognize which navigator is used, and if you've
written in the sitemap something like "if nav=netscape then ... else ...",
the operations of generation and transformation of the xml will be done.
Exemple:
If someone requests the file "One" (http://yourdomain/One)
the paragraph of your sitemap to just READ a corresponding html file will
be:
(So this is the answer of your first question: yes it reads simple html)
<map:match pattern="One">
<map:read src="pages/topbar.html" mime-type="text/html"/>
</map:match>
If you prefer the request to correspond to an xml file transformed by an
xsl, you could write in the sitemap:
<map:match pattern="One">
<map:generate src="one.xml"/>
<map:transform src="styles/general.xsl"/>
<map:serialize name="html" mime-type="text/html"/>
</map:match>
For more complex work you can use java language inside xsp which are then
transformed.
Cocoon is a complete framework, not a simple processor.
Documentation:
http://xml.apache.org/cocoon2/uc2.html (understanding Cocoon2)
http://xml.apache.org/cocoon2/sitemap.html ( to learn how to select
depending on navigator).
Regards
Cib (a beginner too)
France, Bordeaux, xml and gay pride.
----- Original Message -----
From: "Aurelien" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 16, 2001 6:16 PM
Subject: Plain HTML still not supported ?
Hi,
I'm new to this list because I was recently given a mission for which
for the first time, I have to generate dynamic HTML pages. I'm putting
Xalan to use now, but I wondered if Cocoon could be a better choice.
But, especially, I need to create output in plain old HTML that will
display on all browsers. Does somebody id Cocoon 2 supports that now ?
Cheers,
Aurélien
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>