The below script replicates the functionality in only xslt, allowing for passing the function a filename and mime type from directly within the xsl (thanks doug for the informative blog post). As noted in the comments however, there may be reasons for using the compiled usercontrol.
Indeed, it's the download filename that can't be set using the built-in control (afaik), and it seemed sensible to just have one function that allowed setting the MIME type and the filename in one go.
I've found a solution to the temporary files issue. It is noted in the comments to my blog post (http://blog.percipientstudios.com/2009/9/21/advanced-xslt-with-net-namespaces.aspx) but the short answer is:
Set the umbracoDebugMode to false in the web.config and temporary files aren't created.
Now you have two choices... inline XSLT, or a compiled package. Use whichever you prefer. Isn't umbraco's flexibility wonderful?!?
Also possible using inline script in xslt
The below script replicates the functionality in only xslt, allowing for passing the function a filename and mime type from directly within the xsl (thanks doug for the informative blog post). As noted in the comments however, there may be reasons for using the compiled usercontrol.
Dan
Dan,
Can you tell me why you have done this instead of using the
I may be missing something that your package/control does that the umbraco.library version doesnt.
Warren :)
@Warren: content-disposition which set downloaded file name, which display to user in save dialog.
Indeed, it's the download filename that can't be set using the built-in control (afaik), and it seemed sensible to just have one function that allowed setting the MIME type and the filename in one go.
OK this makes sense now :)
I've found a solution to the temporary files issue. It is noted in the comments to my blog post (http://blog.percipientstudios.com/2009/9/21/advanced-xslt-with-net-namespaces.aspx) but the short answer is:
Set the umbracoDebugMode to false in the web.config and temporary files aren't created.
Now you have two choices... inline XSLT, or a compiled package. Use whichever you prefer. Isn't umbraco's flexibility wonderful?!?
cheers,
doug.
Cheers Doug, your blog post couldn;t have come at a more appropriate time!
Dan
is working on a reply...