forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject [plugins] Interface plugins and implementation plugins
Date Fri, 29 Apr 2005 09:52:17 GMT
Hello devs,

I am developing a new viewHelper implementation for inx. That forced me
to re-factor some code and to move the current viewHelper to

I see view as interface plugin for the implementation viewHelper.* (e.g.
xhtml|inx). Now I am trying to extract all interface pipes to the views
plugin. The following is still in viewHelper:

      This has to be an interface and not an implementation
      An interface will only generate cocoon protocol matches and
serialize them!
      An implementation will deliver the actual match (including
      Aggregate all contracts-templates requested by the view.
      Create a xsl that can be used for the last step of the
transformation of the view.
    <map:match pattern="getStylesheet.*.**">
      <map:aggregate element="forrest:filter">
        <map:part src="cocoon://prepare.view.{2}" />
        <map:part src="cocoon://{1}.{2}" /> 
      <map:transform src="resources/stylesheets/prepare.{1}.xsl" >
        <map:parameter name="request" value="{2}"/>
      <map:transform type="xinclude"/> 
     <map:serialize type="xml"/>

The idea is to rewrite the above code to something like follows and put
it in the view plugin:
 <map:match pattern="getStylesheet.*.**">
   <map:generate src="cocoon://getStylesheet.{1}.{2}"/>
   <map:serialize type="xml"/>

...but this leads to a "java.lang.StackOverflowError" which is easy to
understand because it always lead to itself.

Is there another way?


"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

View raw message