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 sitemap:
<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"/>
</map:match>

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" />
  <map:serialize/>
</map:match>

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"/>
  </map:serialize>
</map:match>

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.

WDYT?


Shall I stop converting?

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

--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Reply via email to