Schmitz, Jeffrey A wrote:
Hello,
   I've been struggling with the following scenario for some time and
thought it was time to post.  Basically, I need to be able to perform
the following types of translations, in the order specified, all with
one pipeline, and I can't figure out how to do it using Cocoon:

1.  Transform an existing XML File using XSLT
2.  Transform the result of step one using an XSP (i.e. Java code) that
produces new XML.
3.  Transform result of Step 2 using two more XSLT scripts
4.  Use the result of step 3 in another XSP

So something like this?

<map:match pattern="step1">
  <map:generate src="xml-file.xml" />
  <map:transform src="xslt1.xsl" />
  <map:serialize type="xml" />
</map:match>

<map:match pattern="step2">
  <map:generate type="xsp" src="cocoon:/step1" />
  <map:transform src="xslt2.xsl" />
  <map:transform src="xslt3.xsl" />
  <map:serialize type="xml" />
</map:match>

<map:match pattern="main-pipeline">
  <map:generate type="xsp" src="cocoon:/step2" />
  ...
</map:match>

This should work, but keep in mind that performance will be poor due to the fact that the 'step2' pipeline is not cacheable, and therefore the XSP engine cannot cache the precompiled code for the main-pipeline's XSP.


Any help on the general direction to take (aggregate?, write my own
components?, flowscript?, etc.) would be GREATLY appreciated.

As with most things in Cocoon there are more than one way to do it, so if you wanted to give us more detail about what you're trying to achieve, we can probably recommend other approaches that may be cleaner and perform better.

--Jason





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

Reply via email to