cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [RT] Improving Sitemap and Flowscript
Date Fri, 22 Aug 2003 17:41:54 GMT

On Wednesday, Aug 20, 2003, at 13:28 Europe/Rome, Carsten Ziegeler 
wrote:

> 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="http://my.host/root/"/>
>> </map:serialize>
>>
> Ah, ok ,so the given example:
>
>     <map:generator name="filteredFile">
>      <map:generate type="file"/>
>      <map:transform type="xslt" src="namespaceFilter.xsl"/>
>     </map:generator>
>
> 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:generator>
>
> with
>    <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.

I like this. +1

--
Stefano.


Mime
View raw message