cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven D. Majewski" <sd...@virginia.edu>
Subject Re: Aplly transformation to a xml post data
Date Thu, 18 Jan 2007 11:23:23 GMT

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:



     <!-- 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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message