cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Implementing Virtual Pipeline Components
Date Tue, 16 Nov 2004 21:14:16 GMT
Hey guys,

Thanks to help of Sylvain :) I'd like to present this horrible hack which shows 
how VPC can be implemented, in particular example of Virtual Pipeline Generator. 
VPC generator is defined in the sitemap as:

     - Virtual Pipeline Generator: Composed of other pipeline components.
   <map:generator name="virtual"
     <map:generate src="welcome.xml"/>
     <map:transform src="welcome.xslt">
       <map:parameter name="contextPath" value="{request:contextPath}"/>

Later on, VPC generator can be used from any sub sitemap (as is the case with 
regular sitemap components) like this:

   <map:match pattern="x">
     <map:generate type="virtual"/>
     <map:serialize type="xhtml"/>

All sources used in the definition of VPC generator will be resolved relative to 
the parent sitemap. All sources mentioned in the src attribute will be resolved 
relative to caller sitemap (example: <map:generate type="virtual" 

To see VPC generator in action, apply attached patch to the trunk and go to:

Now, there are several things which should be resolved to have proper implementaion:

   1. Figure out proper way of switching environment.
   2. Figure out how ComponentsNodeBuilder can access SitemapLanguage's
      manager's avalon sub-context.
   3. Implement caching
   4. Implement parameter passing & resolving
   5. Refactor classes implementing ProcessingPipeline

Help is welcome :)


View raw message