...
Now for my first question. I have a requirement to create an 'interactive' XML/XSLT transformer. This would entail a web form to which a user could upload an XML file from his local drive, pass it to an XSLT transformer, and view the generated HTML file. See this URL for a related page I have running:
http://centralbanks.net/sdmx/sdmx_xsl.html
So I want something similar to this page, except that users could upload their own XML files, rather then merely select pre-existing ones from a list. The XSLT file would be 'hard coded' in.
It seems to me this should be fairly simple to do in Cocoon 2.1.1 Does anyone have some existing code samples they could point me to here?
First see the wiki for file uploads. As things stand, I think you'll need to create an action to get the filename of the temporary uploaded file. Then, it's just a normal FileGenerator->XSLT Transformer->HTMLSerializer pipeline where the src of the generator is filled in from the filename returned by your action.
You may be able to skip the action and just use an input module to fill in the source of your file src="{request-param:name-of-upload-field}". That may work because of a fortuitous use of toString() and the default setting to temporarily create an actual file on disk in the upload dir.
Failing that one could also create a special input module to provide that filename.
Geoff
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
