Carsten Ziegeler wrote:

Stefano Mazzocchi wrote:


 Virtual Pipeline Components
 ---------------------------



</SNIP>

+5, the only thing I'm not sure about is the syntax in the sitemap, you
propose:



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



because in order to work correctly you have to define the file generator as usual:

<map:generator name="file" src="SOME CLASS"/>

The src of the above statement points to a class where the src attribute of
the transformer above points to a file, so wouldn't it be better to write:


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



and "reuse" the "pipeline syntax". I'm not sure which one is better, but I
really like that you don't propose using a different components section
in the sitemap for Virtual Pipeline Components, map:virtual-generator etc.



+1 (I guess Stefano actually made a typo here).


And also because a virtual component can contain other sitemap constructs such as matchers, etc.

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>

The only problem is for the "src" attribute. Should we simply pass it as a "src" parameter ?

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to