Hi all. 

I have pubclication in lenya and i have to use CForms there. I decided
to add such pipeline:

<map:match pattern="**/forms/*.xml">
 <map:select type="request-parameter">
  <map:parameter name="parameter-name" value="continuation-id"/>
  <map:when test="">
   <map:call function="{2}_form">
    <map:parameter name="language" value="en" />
   </map:call>
  </map:when>
  <map:otherwise>
   <map:call continuation="{request-param:continuation-id}"/>
  </map:otherwise>
 </map:select>
</map:match>
That pipeline returns a chunk of XHTML with form, that can be inserted
in any document. 

When i need to insert form in my document, i use

<ss:insert-form src="cocoon:/live/forms/register.xml"/>
in a document, and in page2xhtml.xsl file, that is applyed do every
document, i have such template:

<xsl:template match="ss:insert-form">
 <xsl:variable name="requestString">
  <xsl:for-each select="//xhtml:div
[EMAIL PROTECTED]'request']/h:requestParameters/*">
   <xsl:value-of select="concat('&amp;', @name, '=', h:value)"/>
  </xsl:for-each>
 <xsl:choose>
  <xsl:when test="//xhtml:div
[EMAIL PROTECTED]'request']/h:requestParameters/h:[EMAIL 
PROTECTED]'continuation-
id']"/>
    <xsl:otherwise>&amp;continuation-id=</xsl:otherwise>
  </xsl:choose>
 </xsl:variable>
 <xsl:variable name="articles" select="concat(@src, '?',
$requestString)"/>
 <xsl:copy-of select="document($articles)"/>
</xsl:template>
In few words, it generates sms like cocoon:/live/forms/register.xml?
continuation-id= or cocoon:/live/forms/register.xml?continuation-
id=324khhjh23jh4hgjkfhgj3hj&name=name1&password=password1 and pastes
"document($url)"  (which, actually is a chunk of XHTML with form) in the
document.

Everything goes fine (i mean it works and forms are validated) until i
add cocoon.redirect to my flow that shows a form:

 function register_form() {
        var form = new Form("resources/misc/forms/register.xml");
        var data = new Object();
        form.showForm("live/templates/" + cocoon.parameters["language"]
+"/register.xml", data);
        var model = form.getModel();
        cocoon.redirectTo("register.html");

}


in a redirect stage cocoon seems to fall at some kind of endless
recursion(or loop), eats all CPU time and RAM. When i break it, it shows
very long stacktrace, i put here only begin of it:

java.lang.NullPointerException
        at org.apache.cocoon.components.CocoonComponentManager.release
(CocoonComponentManager.java:548)
        at org.apache.cocoon.environment.AbstractEnvironment.release
(AbstractEnvironment.java:565)
        at
org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.release
(MutableEnvironmentFacade.java:308)
        at org.apache.cocoon.sitemap.ContentAggregator.recycle
(ContentAggregator.java:274)
        at
org.apache.avalon.excalibur.pool.InstrumentedResourceLimitingPool.put
(InstrumentedResourceLimitingPool.java:407)
        at
org.apache.avalon.excalibur.component.PoolableComponentHandler.doPut
(PoolableComponentHandler.java:212)
        at org.apache.avalon.excalibur.component.ComponentHandler.put
(ComponentHandler.java:425)
        at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.release
(ExcaliburComponentSelector.java:307)
        at
org.apache.cocoon.components.ExtendedComponentSelector.release
(ExtendedComponentSelector.java:300)
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.recycle
(AbstractProcessingPipeline.java:720)
        at
org.apache.cocoon.components.pipeline.impl.BaseCachingProcessingPipeline.recycle(BaseCachingProcessingPipeline.java:77)
        at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.recycle(AbstractCachingProcessingPipeline.java:993)
        at
org.apache.avalon.excalibur.pool.InstrumentedResourceLimitingPool.put
(InstrumentedResourceLimitingPool.java:407)
        at
org.apache.avalon.excalibur.component.PoolableComponentHandler.doPut
(PoolableComponentHandler.java:212)
        at org.apache.avalon.excalibur.component.ComponentHandler.put
(ComponentHandler.java:425)
        at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.release
(ExcaliburComponentSelector.java:307)
        at
org.apache.cocoon.components.ExtendedComponentSelector.release
(ExtendedComponentSelector.java:300)
        at
org.apache.cocoon.components.EnvironmentDescription.removeFromAutoRelease(CocoonComponentManager.java:783)
        at
org.apache.cocoon.components.CocoonComponentManager.removeFromAutomaticRelease(CocoonComponentManager.java:486)
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.release
(AbstractProcessingPipeline.java:184)
        at org.apache.cocoon.components.source.impl.SitemapSource.reset
(SitemapSource.java:433)
        at org.apache.cocoon.components.source.impl.SitemapSource.init
(SitemapSource.java:377)
        at
org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:213)
        at
org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource
(SitemapSourceFactory.java:64)
        at
org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI
(SourceResolverImpl.java:208)
        at
org.apache.cocoon.components.CocoonComponentManager.resolveURI
(CocoonComponentManager.java:541)
        at org.apache.cocoon.environment.AbstractEnvironment.resolveURI
(AbstractEnvironment.java:557)
        at org.apache.cocoon.environment.AbstractEnvironment.resolveURI
(AbstractEnvironment.java:544)
        at
org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.resolveURI(MutableEnvironmentFacade.java:293)
        at org.apache.cocoon.generation.FileGenerator.setup
(FileGenerator.java:78)
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:384)
        at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:619)

Can anyone help me with it?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]