Hi Jasha,

I did look into that but I couldn't immediately see how it would help
me. My XML input is the result of another pipeline. Using the Include
transformer I guess I could do something like this:

<map:match pattern="*">
<map:generate src="myXML.xml"/>
<map:transform type="include"/>
<map:serialize/> 
</map:match>

<map:match pattern="getFragment">
<map:generate src="myOtherXML.xml"/>
<map:serialize/>
</map:match>

Contents of myXML.xml would be something like:

<doc>
<include:include src="cocoon://getFragment"/>
</doc>

But consuming the XML isn't the problem, it's the passing of XML data to
other pipelines as parameters that's the issue. The general flow is as
follows:

Pipeline 1
Ingests some xml and calls Pipeline 2.

Pipeline 2
'Receives' the xml from Pipeline 1 via service:consumer and calls an
external service/api with and gets some xml results back. This is all
fine up to here. What's needed: these xml results need to be 'sent' to
Pipeline 3 one by one. E.g. for each <id> in the xml results Pipleline 3
needs to be called with that id. 

Pipeline 3
'Receives' the id and queries a db table with that value. 

I hope this makes sense and I haven't misunderstood your suggestion...

Heather

-----Original Message-----
From: Jasha Joachimsthal [mailto:[EMAIL PROTECTED] 
Sent: 10 July 2008 15:11
To: users@cocoon.apache.org
Subject: RE: call pipeline from XSLT

Hi Heather,

Why don't you use the IncludeTransformer?

Jasha Joachimsthal 

www.onehippo.com
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-3329 +1 (707) 773-4646

 

> -----Original Message-----
> From: Heather Rankin [mailto:[EMAIL PROTECTED]
> Sent: donderdag 10 juli 2008 15:55
> To: users@cocoon.apache.org
> Subject: call pipeline from XSLT
> 
> Hi,
> 
> I want to be able to call a pipeline from another pipeline's XSLT in 
> the same sitemap. (The reason I need to call the pipeline from the 
> XSLT as opposed to from the sitemap directly is because I need to pass

> the XML input data as parameters and I see no other way of doing 
> this.)
> 
> Seems I should be able to use the xslt doc() function with the 
> cocoon:/ protocol, e.g.
> 
> <xsl:for-each select="id">
>       <xsl:copy-of select="doc(concat('context:/pipeline4',
> .))" /> </xsl:for-each>
> 
> However, I get a "MalformedURLException: unknown protocol: cocoon"
> error.
> 
> Is this because I'm calling pipeline4 within a nested serviceServlet 
> 'chain'? E.g:
> 
> pipeline1 calls pipeline2 calls pipeline 3 (which calls
> pipeline4 via the XSLT)
> 
> (This is actually part of a bigger issue: I'd like to call an external

> Block from within an XSLT but I wanted to get the answer to this 
> question first and then go from there...)
> 
> Heather
> 
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain 
> personal views which are not the views of the BBC unless specifically 
> stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in 
> reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>                                       
> 
> ---------------------------------------------------------------------
> 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]


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                        

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

Reply via email to