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
viewHelper.xhtml.

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:

<!--FIXME
      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
transformation)-->
    <!--
      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://prepare.properties.{1}.{2}" /> 
      </map:aggregate>
      <map:transform src="resources/stylesheets/prepare.{1}.xsl" >
        <map:parameter name="request" value="{2}"/>
      </map:transform>
      <map:transform type="xinclude"/> 
     <map:serialize type="xml"/>
    </map:match>


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"/>
 </map:match>

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

Is there another way?

TIA
-- 
thorsten

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

Reply via email to