cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: [RT] Virtual Sitemap Components
Date Fri, 16 Jul 2004 08:46:04 GMT
Andreas Hartmann wrote:

> Carsten Ziegeler wrote:
>> I want to start the implementation of the virtual sitemap components
>> in the next weeks; but before, we should discuss how they will look 
>> like :)
>> The first point - and imho most important point is, of which components
>> a virtual sitemap component (VSC) can be assembled.
>> My understand is that a VSC is either:
>> - a generator followed by one or more transformers
>> - a set of transformers
>> - a set of transformers followed by a serializer
>> Thus, the VSC acts like a generator, a transformer or a serializer.
> Sorry for cross-posting, but this could maybe address a concern
> Lenya is faced with.
> The scenario is as follows:
> Lenya provides so-called "CMS screens". This is a simple transformation
> to create the Lenya look-and-feel forms, error messages etc.
> It is done using a meta stylesheet approach triggered by
>   <map:transform src="cocoon://lenya-screen.xsl"/>
> The problem is that we would like to add a i18n step to this
> transformation, which would be quite difficult (if not impossible)
> to implement using a meta stylesheet. We don't use a resource
> because we need to access the transformation from a lot of sitemaps.
> My question is: Could VSCs be declared in the sitemap? For instance:
> <map:components>
>   <map:serializier name="lenya-screen" type="virtual">
>     <map:transform type="xslt" src="cocoon://lenya-screen.xsl"/>
>     <map:transform type="i18n"/>
>     <map:serialize type="xhtml"/>
>   </map:serializer>
> </map:components>
> Is this a possible scenario for the VSC concept?


> I think an important questions is how to pass parameters to a VSC and
> how to distribute them to the single components.

Passing parameters to a VSC is very similar to passing parameters to 
resources. There's however a special handling of the @src attribute that 
exists on generators and transformers, which does not exist on resources.


Definition (syntax and exact location still has to be defined):
<map:virtual-generator type="foo">
  <map:generate src="{src}"/>
  <map:act type="lang-select">
    <map:transform type="i18n"/>
  <map:transform type="xslt" src="stylesheets/{bar}.xsl/>

<map:generate type="foo" src="blah">
  <map:parameter name="bar" value="baz"/>


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

View raw message