cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schmitz, Jeffrey A" <>
Subject Flowscript Continuation ID parameter
Date Tue, 12 Jun 2007 13:40:48 GMT
   I see how the continuration ID can be accessed from within a .jx file
as follows:

  <form method="post" action="${}.kont">

As long as the .jx file is processed by the JXTemplateGenerator, e.g.   

    <map:match pattern="*.jx">
      <map:generate type="jx" src="documents/{1}.jx"/>
      <map:serialize type="xhtml"/>

However, as part of my page "flow" I want to invoke an already existing
transform that uses the file generator (not the JXTemplateGenerator),
after which I want to re-enter my flowscript.  My solution is to
manually pass the continuation ID as a parameter (parameter 4) to the
existing sitemap pipeline entry for my current transform as follows:

     var uri = inputType + "In/" + inputFile + "/" + inputType +
"In.trans/" +;

This URI matches the following, non JXTemplateGenerator pipline, the
fourth parameter being the continuation ID, which in turn is passed into
the xsl/importResult.xsl script:

      <map:match pattern="*In/*/*.trans/*" >
         <map:generate src="inputs/{2}.xml" />
         <map:transform src="xsl/{1}InAdapter.xsl">
         <map:transform src="xsl/updateNeutralRefs.xsl"/>
         <map:transform type="PersistModelTrans">
           <map:parameter name="saveToFile" value="true"/>
           <map:parameter name="saveToDB" value="true"/>
           <map:parameter name="dataFormat" value="Neutral"/>
           <map:parameter name="passThrough" value="false"/>
         <map:transform src="xsl/importResult.xsl">
           <map:parameter name="continueID" value="{4}"/>
         <map:serialize type="xhtml"/>

And then I use the continuation ID parameter in the return page xsl
(xsl/importResult.xsl) as follows to create a submit action that will
re-invoke my flowscript from the previous continuation point:

<xsl:stylesheet xmlns:xsl=""
                version="2.0" >
 <xsl:param name="continueID"/>

   <form method="post" action="{$continueID}.kont">

Is there anything wrong with this approach (it seems to work)?  Is there
a better way?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message