cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hinzmann <>
Subject accessing flowscript parameters in a sitemap
Date Wed, 01 Dec 2004 20:03:42 GMT
Hi cocooners
Consider the following
I have a webapp,  where the user can upload a xmlfile (called 'uploadfile') and enter a url
'uploadurl') the webapp then transforms the uploaded xmlfile and enriches it with the url
and a 
computed value 'urn' (calculated in a flowscript).
after the flowscript is ready it calles

	'cocoon.processPipelineTo("myPipeline, valueToBeAdded, streamToGetTheResultOfTheTransformation);'

But I dont get the point, how to access my passed parameter in the pipeline?
plz help me out. thanks

function enricheXML(urnforthexml){
	var enrichedXML =;
	cocoon.processPipelineTo("enricheXML", urnForTheXml, enrichedXML);
	return enrichedXML.toString();

and the sitemap:
<!-- ==Pattern for the XMLenrichement ====================================== -->
		 <map:match pattern="enricheXML">
                <map:generate src="{request-param:uploadfile}" />
                <map:transform src="xsl/enrichement.xsl" >
                   <map:parameter name="url" value="{request-param:uploadurl}" />

		  <!-- how do i access the  parameter passed from the flowscript? -->
                   <map:parameter name="urn" value="{request-param:urn}" />

                <map:serialize type="xml" />


the enrichement.xsl is :
<xsl:stylesheet version="1.0" xmlns:xsl="">
   <xsl:output method="xml"/>
   <xsl:param name="urn" />
   <xsl:param name="url" />

   <xsl:template match="/">
	<URL><xsl:value-of select="$url"/></URL>
	<URN><xsl:value-of select="$urn"/></URN>

Gruss Jan Hinzmann

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message