Hi cocooners
Consider the following
I have a webapp, where the user can upload a xmlfile (called 'uploadfile') and enter a url (called '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

flowscript:
...
function enricheXML(urnforthexml){
        var enrichedXML = java.io.ByteArrayOutputStream();
        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:transform>
               <map:serialize type="xml" />
         </map:match>

...

the enrichement.xsl is :
...
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  <xsl:output method="xml"/>
  <xsl:param name="urn" />
  <xsl:param name="url" />

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

</xsl:stylesheet>
...
--
Gruss Jan Hinzmann

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



Reply via email to