cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: servlet, generator or ... (design question)
Date Wed, 13 Feb 2002 16:28:04 GMT
> From: Mike Haarman [mailto:mhaarma@socsci.umn.edu]
> 
> We are evaluating C2 for a very large, public, data-dissemination
project
> (NHGIS.ORG).  I would like to build a few small XML visualization
tools in
> C2 for demonstration purposes.  For example, a facility to upload an
XML
> instance, associate it with a stylesheet living on the server and
return
> transformed XHTML.  The upload need not be saved anywhere on the
server;
> I'd like to hand the uploading stream directly to Cocoon.  I can
clearly
> see a couple ways to accomplish this but suspect there are more:
> 
> a) Specify a servlet external to Cocoon which handles multi-part form
data
> as the src attr on my generator in the pipeline.  How does this kick
> off the pipeline's processing?  I suspect I need to bind the upload
stream
> to the pipeline within my servlet and make a call to Cocoon but I'm
not
> clear how.  Or is Cocoon waiting like a daemon for bytes to show up at
the
> mouth of the pipe?

Not possible.


> b) Extend one of Cocoon's generator classes (StreamGenerator?) to
handle
> the multi-part form data and call it from my form.

Way to go. Yes, StreamGenerator.


> c) Is there a way to modify the File Upload example to hand the
upcoming
> stream to a transformation?  It seems that example merely specifies a
> directory for uploads and does nothing with the stream itself.

It has different purpose; it supposed usage is to upload binary
resources, not the XML which requires further processing.

Vadim

> d) ?
> 
> What is the cleanest manner of doing this?  I suspect there is a
Cocoon
> pattern lurking in this problem and would like to implement the
solution
> that best reflects such a pattern.
> 
> ----------------------------------------------------------------
> Mike Haarman                        Minnesota Population Center,
> mhaarma@socsci.umn.edu              University of Minnesota,
>                                     537 Heller Hall,
>                                     Minneapolis, MN 55455
> Co-Architect, Programmer,
>   National Historical GIS -- http://www.nhgis.org/
> Maintainer,
>   DDI Codebook DTD -- http://www.icpsr.umich.edu/DDI/



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message