【发布时间】:2014-04-10 11:44:36
【问题描述】:
如果我在 Orbeon-xform 中有一个文件实例
<xforms:instance id="fileinst">
<fileinst>
<file>
<name>file.txt</name>
<type>text/plain</type>
<data>YXNkZmFzZmFzZGY=</data><!--the file content-->
</file>
</fileinst>
</xforms:instance>
还有相应的绑定
<xforms:bind nodeset="instance('fileinst')/file">
<xforms:bind nodeset="fail">
<xforms:bind nodeset="name" type="xforms:string"/>
<xforms:bind nodeset="type" type="xforms:string"/>
<xforms:bind nodeset="data" type="xforms:base64Binary"/>
</xforms:bind>
</xforms:bind>
如何从这里做一个可下载的文件:
<xforms:outpu ref="instance('fileinst')/file/data">
<xforms:label>Download</xforms:label>
</xforms:outpu>
如何正确地做一个可下载的文件链接?
【问题讨论】: