cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Elhauge ...@uncanny.net>
Subject Question on using CForms with XSLT and aggregation
Date Wed, 26 Apr 2006 02:15:53 GMT
Hi,

I'm hoping someone can set me straight on this. I must be missing a
crucial concept in getting this to work.

My question is eventually going to be:
    Any idea on how to get the continuation to pass through an XSLT?

I've had applications working for the last few years that use Cocoon
Aggregation and XSLT. Recently I updated to Cocoon 2.1.8 and moved all
of them from JSP to XSP.

I'm working on processing Forms using the CForms Jx toolkit. So far
so good. I've got the form validating and changing state, etc.

Now I want to run the Jx output through the existing XSLT pipeline to
integrate it into our application. I've figured out how to get the
initial form through the pipeline, but when I applied the same pattern
to the continuation, I get an error.

Here's a fragment of my sitemap.xmap:

============== START ==============

<!-- ==== Internal pipelines ==== -->

<map:pipeline internal-only="true">

<map:match pattern="formPipe/**">
  <!-- To aggregate a JX Form -->
  <map:call function="{1}_js"/>

  <map:serialize type="xml" />
</map:match>

<map:match pattern="continuePipe/**">
  <!-- To aggregate a JX Continuation -->
    <map:call continuation="{1}"/>

  <map:serialize type="xml" />
</map:match>

</map:pipeline>

<!-- ==== Jx Forms ==== -->

<map:pipeline>
  <map:match pattern="*.frm">
    <map:aggregate element="portalPage">
      <map:part src="Wrap/menu.xml" element="portalMenuElement" />
      <map:part src="cocoon:/formPipe/{1}" element="aggregate1Element" />
    </map:aggregate>

    <map:transform type="xslt" src="Xsl/PortalAggregate.xsl" />
    <map:transform type="xslt" src="Xsl/BioAppExpand.xsl">
      <map:parameter name="appName" value="CultureCollection"/>
    </map:transform>

    <map:serialize type="html" />
  </map:match>
</map:pipeline>

<map:pipeline>
  <map:match pattern="*.continue">
    <map:aggregate element="portalPage">
      <map:part src="Wrap/menu.xml" element="portalMenuElement" />
      <map:part src="cocoon:/continuePipe/{1}.continue" element="aggregate1Element" />
    </map:aggregate>

    <map:transform type="xslt" src="Xsl/PortalAggregate.xsl" />
    <map:transform type="xslt" src="Xsl/BioAppExpand.xsl">
      <map:parameter name="appName" value="CultureCollection"/>
    </map:transform>

    <map:serialize type="html" />
  </map:match>
</map:pipeline>

============== END ==============

When I hit the URL:
    http://.../DebugForm/OrderCulture.frm
I get exactly what I want and the output passed through the XSLT pipeline.

When I press the Submit button on that form, it generates a URL along this pattern:
    http://.../DebugForm/557e6250263d345a505a514e5b426a7944343600.continue

Which gets picked up by the *.continue aggregator, but then fails
in the internal continue-pipe pipeline with an
Invalid Continue ID error:
    org.apache.cocoon.components.flow.InvalidContinuationException: The continuation ID 557e6250263d345a505a514e5b426a7944343600.continue
is invalid.

Any idea on how to get the continuation to pass through an XSLT?
-- 
        Edward Elhauge <ee@uncanny.net>
"I want to be a person like somebody else once was." -- Peter Handke "Kasper"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message