Steven D. Majewski wrote:

On Jan 18, 2007, at 5:54 AM, Sébastien Geindre wrote:

hello all,

I handle a upload request send by cocoon forms with flowscript :
   var uploadWidget = form.lookupWidget("upload");
   var stream = uploadWidget.getValue().getInputStream();

I'd like to transform the upload stream (which is XML) via a pipeline :
  cocoon.processPipelineTo(
       'uri',
       stream,
       ??);

what kind of generator i must use ?

   <map:match pattern="uri">
     <map:generator type ="????????"/>
    <map:transform src="tranform.xsl"/>
     <map:serialize type="xml"/>
   </map:match>



I'm not using the uploadWidget -- I just have this in my form:

    <input type="file" name="pubxml" />


My form action is calling a flowscript, which then calls one
of these pipelines, using the upload://partname  internal protocol:

Could you send us an example of your flowscript ?
The one which call the pipeline xml-upload-xml for instance.

Thanx a lot !



    <!-- display upload as xml -->
    <map:pipeline>
      <map:match pattern="xml-upload-xml">
        <map:generate src="upload://pubxml" />
        <map:serialize type="xml" />
      </map:match>
    </map:pipeline>

    <!--  display upload styled as html  -->
    <map:pipeline>
      <map:match pattern="xml-upload-doc">
      <map:generate src="upload://pubxml" />
      <map:transform src="xsl/document.xsl" />
      <map:serialize type="html" />
      </map:match>
    </map:pipeline>


-- Steve Majewski



---------------------------------------------------------------------
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]

Reply via email to