cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject Re: [Ann/RFC] Virtual Sitemap Components
Date Mon, 11 Apr 2005 13:19:27 GMT
Sylvain Wallez wrote:

> Daniel Fagerstrom wrote:
>> I have continued Vadim's and Sylvain's work and added a first, 
>> hopefully working version of virtual sitemap components (VPCs) to the 
>> trunk.
> Good job!

Thanks :)

>> Use
>> ===
>> To use VPCs one define them in the components section in the sitemap, 
>> e.g.:
>>   <map:components>
>>     <map:readers>
>>       <map:reader name="virtual1" 
>> src="org.apache.cocoon.reading.VirtualPipelineReader">
>>         <map:generate type="file" src="vpc-test.xml"/>
>>         <map:serialize type="xml"/>
>>       </map:reader>
>>     </map:readers>
>>     <map:transformers default="xslt">
>>       <map:transformer name="virtual2" 
>> src="org.apache.cocoon.transformation.VirtualPipelineTransformer">
>>         <map:source param="src2"/>
>>         <map:transform src="vpc-include.xsl">
>>            <map:parameter name="file" value="{src}"/>
>>         </map:transform>
>>         <map:transform src="vpc-include.xsl">
>>            <map:parameter name="file" value="{src2}"/>
>>         </map:transform>
>>       </map:transformer>
>>     </map:transformers>
>>   </map:components>
> It seems weird to me to see sitemap statements in the <map:components> 
> section. But they're also used as any other component. Hmm...

Agree about that, the prototype that I started from had it that way.

> What about either:
> - leave them in <map:components> but with special element names, e.g. 
> <map:virtual-generator> that maps to the VirtualPipelineGenerator class
> - or separate them in a <map:virtual-components> section just as we 
> have today <map:resources> and <map:views>?
> I would favor the second solution, even if this doesn't seem to be 
> absolutely necessary for the implementation.

I'm sligthly in favor of the first alterantive as they are components, 
but I don't mind either, we see what people think. We should in any case 
get rid of recognizing them on the src parameter.


>> VPCs are not cacheable yet. Its probably not that hard to add 
>> caching, but it requires that we extend the ProcessingPipeline 
>> interface with some methods that are needed for VPCs. It also 
>> requires that we find some syntax for declaring what pipeline type 
>> that should be used for a specific VPC.
> Why do we have to choose a particular pipeline type? Isn't this 
> defined by the <map:pipeline type=""> surrounding the call to the VPC?

As it is implemented a (partial) pipeline is created during setup of the 
respective VPCs, see the base class 
o.a.c.sitemap.impl.AbstractVirtualSitemapComponent. It could maybe ask 
or be told about the type of its calling sitemap during setup, don't 
know how though. Any suggestions?

>> Implementation
> <snip/>
> Sorry, not much time to dig into the implementation for now, but I 
> will :-)

Good :)


View raw message