cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: Samples styling
Date Wed, 16 May 2007 11:50:27 GMT
Felix Knecht pisze:
> Grzegorz Kossakowski schrieb:
>> Hello,
>> I see that some work on utilizing servlet-service-fw functionality to
>> style samples has been started. I wonder if constructing servlet
>> service and calling it wouldn't be better than just referencing xsl
>> stylesheet?
> I thought thats just what I'm doing when converting the samples - add
> the block bean definition and use the servlet-service-fw to use the xsl
> stylesheets from the samples-style-default block?

Yes, but I was wondering if we couldn't put following pipeline in samples-style-default's
<map:match pattern="service/simple-samples2html">
   <map:generate src="servlet-consumer:"/>
   <map:transform src="stylesheets/system/xml2html.xslt"/>
   <map:transform type="servletLinkRewriter" />
   <map:serialize type="html"/>

and for example, in imageop's sitemap instead of:
<map:match pattern="">
   <map:generate src="samples.xml"/>
   <map:transform src="servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl"
   <map:transform type="servletLinkRewriter" />

we could have:
<map:match pattern="">
   <map:generate src="samples.xml"/>
   <map:serialize type="servletService">
     <map:parameter name="service" value="servlet:style-default:/service/simple-samples2html"/>

This way, we could use _service_ to style samples and the same way get more flexibility because
we could change the service in one place in 
any way we like (e.g. add more transformers if needed).
I wonder if we really need this, and if it's a Flexibility Syndrome.


> Shall I stop converting?

No, no! The way you currently do this is correct, also.

Grzegorz Kossakowski

View raw message