cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C├ędric Damioli <cedric.dami...@anyware-tech.com>
Subject Re: Serving static XML files a la Cocoon-1
Date Thu, 25 Apr 2002 15:00:47 GMT


Peter Flynn wrote:

>Bertrand writes:
>
>>Hey that's an easy one - allow me to quote Vadim's previous answer:
>>
>>>>Read concept docs and sitemap docs on Cocoon site. Sitemap is
>>>>the only way to tell Cocoon what it needs to do. You should
>>>>spend some time to get it - once you get it, chances are, you
>>>>will love it.
>>>>
>
>Don't get me wrong, I love the idea of Cocoon. It was just an error
>to distribute it without the previous default (Cocoon 1) already
>enabled, ie any XML files already on disk should be processed with 
>their XSL[T] files and served up as HTML/PDF by default.
>
You don't understand the Cocoon2 concepts at all.
It is nonsense to serve XML files with "their" XSL files : the principle 
is to separe data and presentation, ie XML source and XSL.
So you have to write a pipeline (or to copy/paste one from an existing 
sitemap) to generate HTML stuff from XML by transforming it through XSL.

The sample sitemap bundled with Cocoon offers these 'defaults' already.
Please read the docs and reffer to the samples. They will learn you much.

>
>>Something like
>>
>><map:match pattern=3D"rtfm/*.xml">
>>  <map:generate src=3D"somewhere/{1}.xml/>
>>
>
>But I don't want to *generate* any XML. I already have XML documents.
>
Yes, you want !!!!
In Cocoon2 terminology, "generate" means  you generate SAX events from a 
source. In your case, the source is an XML document. So you have to use :
<map:generate src="XXX.xml"/>

>
>
>>  <map:transform src=3D"xslt-stuff/transform.xsl"/>
>>  <map:serialize type=3D"xml"/>
>></map:match>
>>
>
>///Peter
>
>---------------------------------------------------------------------
>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: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>



---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message