Thanks Jason,
One thing I don't quite understand is, I don't see where the actual
xsp/logic sheet would get invoked. i.e. When I said I need to invoke a
xsp, I really meant I need to invoke the following generator implemented
as a logic sheet library:
<map:generate type="serverpages" src="DiagMLImport.xsp" >
<map:parameter name="baseFilename" value="{1}"/>
</map:generate>
The real root of my problem is this generator creates, and returns XML,
not sax events, i.e. any subsequent xslt sees < and not <.
The xsp being invoked (that in turn invokes the logicsheet/java code)
looks as follows:
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:util="http://apache.org/xsp/util/2.0"
xmlns:DiagML="http://www.boeing.com/IVHM/DiagML">
<Model>
<DiagML:diagMLImport>
<param1><get-parameter name="baseFilename" default=""/></param1>
</DiagML:diagMLImport>
</Model>
</xsp:page>
And all the <'s and >'s between the <Model> tags turn into < and >
for the xslt transform.
I REALLY don't want to have to create sax events in my logic sheet, and
can use an intermediate file and reader if need be, but I still can't
seem to get the flow I need using this approach.
Thanks,
Jeff
-----Original Message-----
From: Jason Johnston [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 28, 2007 9:29 AM
To: [email protected]
Subject: Re: Implementing a series of transformations
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]