cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [Ann/RFC] Virtual Sitemap Components
Date Mon, 11 Apr 2005 17:00:21 GMT
Sylvain Wallez wrote:
> Stefano Mazzocchi wrote:
> 
> <snip/>
> 
>> virtual readers? hmmmm, never thought of that one. What does that buy 
>> you? I mean, it's not harmful to have it, but do you see any real use 
>> of that?
> 
> 
> 
> Consider an application using graphical buttons. You may want be able to 
> either read images on the filesystem or generate them on the fly by 
> combining an SVG prototype with some i18n dictionary :
> 
> <map:match pattern="buttons/*.jpg">
>  <map:read type="button" src="{1}"/>
> </map:match>
> 
> The reader will be (yes, I love this syntax :-) )
> <map:virtual-reader>
>  <map:generate src="buttons-prototype.svg"/>
>  <map:transform src="insert-i18n-key-in-svg.xsl"/>
>  <map:transform type="i18n"/>
>  <map:serialize type="svg2jpg"/>
> </map:virtual-reader>

Sure, but this is nothing different from

  <map:match pattern="buttons/*.jpg">
   <map:generate src="buttons-prototype.svg"/>
   <map:transform src="insert-i18n-key-in-svg.xsl"/>
   <map:transform type="i18n"/>
   <map:serialize type="svg2jpg"/>
  </map:match>

VPC were introduced for reuse, I don't see virtual readers reusable at 
all, it's just syntax sugar and not even that sweet sugar either.

-- 
Stefano.


Mime
View raw message