cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject RE: [RT] Improving Sitemap and Flowscript
Date Wed, 20 Aug 2003 11:28:40 GMT
Sylvain Wallez wrote:
> >One thing missing is passing information from the pipeline to the
> >components.
> >For example if you write this pipeline:
> >
> ><map:generate type="filteredFile" src="afile.xml">
> >  <map:parameter name="a parameter" value="a value"/>
> >...
> >
> >I assume that the src info and the parameters are passed to the "real"
> >generator which in this case is the file generator. Is it 
> possible to pass
> >info to the other components as well, so can I pass a parameter to the
> >xslt transformer?
> >I'm not sure if this is needed (or if it's FS); I have not 
> thought about it
> >but it immediately came up my mind :)
> >
> You really have to consider virtual components as "typed resources", 
> this means we'll be able to pass parameters to these virtual components 
> just a we do today for resources.
> <map:serializer type="abs-html">
>   <map:transform type="link-absolutizer">
>     <map:parametrer name="base-uri" value="{site-root}"/>
>   </map:transform>
>   <map:serialize type="html"/>
> </map:serializer>
> and then :
> <map:serialize type="abs-html">
>   <map:parameter name="site-root" value=""/>
> </map:serialize>
Ah, ok ,so the given example:

    <map:generator name="filteredFile">
     <map:generate type="file"/>
     <map:transform type="xslt" src="namespaceFilter.xsl"/>

wouldn't work as the file generator would get not src, it has to:
    <map:generator name="filteredFile">
     <map:generate type="file" src="{src}"/>
     <map:transform type="xslt" src="namespaceFilter.xsl"/>

   <map:generate type="filteredFile">
      <map:parameter name="src" value="some.xml"/>
> The only problem is for the "src" attribute. Should we simply pass it as 
> a "src" parameter ?
+1, yes because then it would look like this:

   <map:generate type="filteredFile" src="some.xml"/>

which is much more convenient.


View raw message