cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [cocoon2][sitemap] multiple filters problem
Date Mon, 20 Mar 2000 19:45:54 GMT
Nicolas Delahaye wrote:
> 
> Hi,
> 
> I need to create a sitemap that uses two xsl filters as: xml files --
> Xslt process --> xml -- Xslt process --> html.
> I try to define :
> 
> <cocoon version="2.0">
>         <component role="parser"
> class="org.apache.cocoon.components.parser.XercesParser"/>
> 
>         <generator name="file"
> class="org.apache.cocoon.generators.FileGenerator"/>
> 
>         <filter name="xslt"
> class="org.apache.cocoon.filters.XalanFilter"/>
>         <filter name="uri"
> class="org.apache.cocoon.filters.XalanFilter"/>
> 
>         <serializer name="xml"
> class="org.apache.cocoon.serializers.XMLSerializer"/>
>         <serializer name="html"
> class="org.apache.cocoon.serializers.HTMLSerializer"/>
> 
>         <sitemap>
>                 <partition>
>                         <process uri="**.xml" source="**.xml">
>                                 <generator name="file"/>
>                                 <filter name="uri">
>                                         <parameter name="stylesheet"
> value="first.xsl"/>
>                                 </filter>
>                                 <filter name="xslt">
>                                         <parameter name="stylesheet"
> value="second.xsl"/>
>                                 </filter>
>                                 <serializer name="html">
>                                         <parameter name="contentType"
> value="text/html"/>
>                                 </serializer>
>                         </process>
>                 </partition>
>         </sitemap>
> </cocoon>
> 
> Why the last filter is the only one applied ? 

You are using two XSLT filters so you should indicate so. I would do

 <filter name="xslt">
  <parameter name="stylesheet" value="first.xsl"/>
 </filter>
 <filter name="xslt">
  <parameter name="stylesheet" value="second.xsl"/>
 </filter>

> Can we apply more than one filter with Cocoon 2 ?

If you can't, it's a bug. the functionality _needs_ to be there.

NOTE: since may clients normally break the lines at 72 cols, please, use
a 1 char tab when indenting your XML or make sure that you don't break
at 72 otherwise the whole thing is a mess to read (look above)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message