[Xsltforms-support] Download action/control
Brought to you by:
alain-couthures
From: Mats E. <mat...@li...> - 2015-09-21 09:09:21
|
Hi Alain, Somewhat related to my previous question how best leverage HTML 5 Web Workers for async processing in XForms/XsltForms, I now have a similar question, this time related to how best to leverage browsers' capability to allow downloading of resources client-side utilizing the HTML 5 @download attribute on the <a/> element combined with the URL.createObjectURL() method of the File API (http://www.w3.org/TR/FileAPI/#dfn-createObjectURL), and am interested to get your opinion on possible options of extending XsltForms. Obviously it is possible already now to leverage these features in XsltForms via the <xf:load resource="javascript:..."/> or <xf:script/> elements, but I'm thinking this functionality should rather be exposed through and encapsulated in a proper XForms extension element. I was first figuring around the following options: <xf:download ref/value=""/> as a control element, "mirroring" the <xf:upload/> control already part of the XForms specification<xf:download ref/value=""/> as an _action_ element, allowing it to be used in event handlers for the <xf:trigger/> element for example, similar to the <xf:load/> action element. (I'm wondering why the <xf:upload/> wasn't made an action element in XForms as well...?!) At the same time, other options also exist: A custom @appearance attribute on the <xf:output/> element (as in Orbeon Forms: http://wiki.orbeon.com/forms/doc/developer-guide/xforms-controls/output-control?pli=1#TOC-Appearance-xxforms:download)Extended behavior of the <xf:submission resource="file://" method="get/put".../> element... ... What are your thoughts here? Which option would make most sense in your view? Regards,Mats |