You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brian Hawkins <br...@lingotek.com> on 2006/05/23 23:03:06 UTC

inserting result of one pipeline into another

I have one pipeline that generates a page that has a div tag in it.  I 
would like to pass this pipeline a parameter that will be the name of 
another pipeline that it can run, get the result, and then place the 
results into that div tag.

How does one do this?

Thanks
Brian

Re: inserting result of one pipeline into another

Posted by Brian Hawkins <br...@lingotek.com>.
I found my problem.  The output of the main.xsl was set to "html" and 
that hosed the xinclude transformer.  When I change it to xml it worked 
fine.

Brian Hawkins wrote:
> Here is my pipeline
> <map:generate src="content/main.xsp"/>
> <map:transform src="style/main.xsl">
>   <map:parameter name="use-request-parameters" value="true"/>
> </map:transform>
> <map:transform type="xinclude"/>
> <map:serialize type="xml"/>
>
> I've added the xi:include tag in the main.xsl file.  The problem is 
> that it does not work.
>
> It does work however if I move the xi:include into the main.xsp and 
> put the xinclude transform after the generate.  Why does it not work 
> after the XSL transform?
>
> Brian
>
> Andre Juffer wrote:
>> Brian Hawkins wrote:
>>> I have one pipeline that generates a page that has a div tag in it.  
>>> I would like to pass this pipeline a parameter that will be the name 
>>> of another pipeline that it can run, get the result, and then place 
>>> the results into that div tag.
>>>
>>> How does one do this?
>>
>> How about using xinclude and jx like:
>>
>>   <div>
>>     <xi:include href="cocoon://${pipeline}" />
>>   </div>
>>
>> The value of pipeline could be set with flow. The first pipeline 
>> should rely on the XIncludeTransformer.
>>
>>>
>>> Thanks
>>> Brian
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org

Re: inserting result of one pipeline into another

Posted by Brian Hawkins <br...@lingotek.com>.
Here is my pipeline
<map:generate src="content/main.xsp"/>
<map:transform src="style/main.xsl">
   <map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform type="xinclude"/>
<map:serialize type="xml"/>

I've added the xi:include tag in the main.xsl file.  The problem is that 
it does not work.

It does work however if I move the xi:include into the main.xsp and put 
the xinclude transform after the generate.  Why does it not work after 
the XSL transform?

Brian

Andre Juffer wrote:
> Brian Hawkins wrote:
>> I have one pipeline that generates a page that has a div tag in it.  
>> I would like to pass this pipeline a parameter that will be the name 
>> of another pipeline that it can run, get the result, and then place 
>> the results into that div tag.
>>
>> How does one do this?
>
> How about using xinclude and jx like:
>
>   <div>
>     <xi:include href="cocoon://${pipeline}" />
>   </div>
>
> The value of pipeline could be set with flow. The first pipeline 
> should rely on the XIncludeTransformer.
>
>>
>> Thanks
>> Brian
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: inserting result of one pipeline into another

Posted by Andre Juffer <aj...@sun3.oulu.fi>.
Brian Hawkins wrote:
> I have one pipeline that generates a page that has a div tag in it.  I 
> would like to pass this pipeline a parameter that will be the name of 
> another pipeline that it can run, get the result, and then place the 
> results into that div tag.
> 
> How does one do this?

How about using xinclude and jx like:

   <div>
     <xi:include href="cocoon://${pipeline}" />
   </div>

The value of pipeline could be set with flow. The first pipeline should 
rely on the XIncludeTransformer.

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


-- 
Andre H. Juffer              | Email: Andre.Juffer@oulu.fi
Triacle Biocomputing         | WWW: www.triacle-bc.com
The Biocenter and            | WWW: www.biochem.oulu.fi/Biocomputing/
     the Dep. of Biochemistry | Fax: +358-8-553-1141
University of Oulu, Finland  | Phone: +358-8-553 1161

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


Re: inserting result of one pipeline into another

Posted by bhawna asnani <hi...@yahoo.co.in>.
A possible solution could be using XSPUtil if you are
working with XSP's
<xsp:logic>    
 	String xml = null;
	pipeline = new StringBuffer( "cocoon://pipeline" );
	try { System.err.println( "trying to gen this: " +
				pipeline.toString() ); xml =
	XSPUtil.getSourceContents( pipeline.toString(),
this.resolver );
</xsp:logic> 
<util:include-expr><util:expr>xml</util:expr>
</util:include-expr> 
<xsp:logic> 
	} catch (Exception e) {
</xsp:logic>
<noStats>e.getMessage()</noStats> <xsp:logic> } //end
try
</xsp:logic>

--- Brian Hawkins <br...@lingotek.com> wrote:

> I have one pipeline that generates a page that has a
> div tag in it.  I 
> would like to pass this pipeline a parameter that
> will be the name of 
> another pipeline that it can run, get the result,
> and then place the 
> results into that div tag.
> 
> How does one do this?
> 
> Thanks
> Brian
> > begin:vcard
> fn:Brian Hawkins
> n:Hawkins;Brian
> org:;Development
> adr:suite A122;;34 E 1700 S;Provo;UT;84606;USA
> email;internet:brian@lingotek.com
> title:Software Engineer
> tel;work:801-705-9306
> x-mozilla-html:TRUE
> url:http://www.lingotek.com
> version:2.1
> end:vcard
> 
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
users-help@cocoon.apache.org


Send instant messages to your online friends http://in.messenger.yahoo.com 

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