You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2003/10/20 12:10:26 UTC
DO NOT REPLY [Bug 23931] New: -
[PATCH] upload:// Source for uploaded files
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23931>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23931
[PATCH] upload:// Source for uploaded files
Summary: [PATCH] upload:// Source for uploaded files
Product: Cocoon 2
Version: Current CVS 2.1
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: Other
Component: sitemap components
AssignedTo: dev@cocoon.apache.org
ReportedBy: paul.crabtree@dna.co.uk
upload:// Source and SourceFactory for using content of uploaded files as
source for sitemap components.
classes submitted are PartSourceFactory and PartSource named from the Part's
that they internally use.
USAGE:-
example showing upload of an XML file and using the file in a pipeline during
the upload request.
cocoon.xmap
...
<source-factories>
<component-instance
class="org.apache.cocoon.components.source.impl.PartSourceFactory"
name="upload"/>
...
</source-factories>
...
sitemap.xmap
...
<map:match pattern="upload.html">
<map:generate type="file" src="upload://formField1"/>
<map:generate type="xslt" src="example2xhtml.xsl"/>
<map:serialize type="xhtml"/>
</map:match>
<map:match pattern="example-form.html">
<map:read src="example-form.html"/>
</map:match>
...
example-form.html
...
<form action="upload.html" method="POST" enctype="multipart/form-data">
<input type="file" name="formField1"/>
<input type="submit" value="Upload"/>
</form>
...