www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit a5887998aac598ec314a611eb5bd5d7f2333e3fe
parent 395a446309a903926001ddfa165f66748cba1ca5
Author: Suzanne Soy <ligo@suzanne.soy>
Date:   Tue, 26 Jan 2021 22:16:40 +0000

02021-01-26 evening stream: example tool: added field for the SVG input

Diffstat:
MmyTool.xforms | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/myTool.xforms b/myTool.xforms @@ -11,11 +11,17 @@ <xforms:model> <xforms:instance> <my:tool> + <my:svgfile/> <my:option1/> <my:option2>default value</my:option2> <my:option3>bar</my:option3> </my:tool> </xforms:instance> + <!-- to get a filename on the command-line, use: + <xforms:bind ref="my:svgfile" type="xsd:anyURI" required="true()"/> + --> + <!-- use XternalApps:pipe to have the file piped directly into the command being run --> + <xforms:bind ref="my:svgfile" type="XternalApps:pipe" required="true()"/> <xforms:bind ref="my:option1" type="xsd:decimal" required="true()"/> <xforms:bind ref="my:option2" type="xsd:string" required="true()"/> <xforms:submission action="myTool.py" method="exec-double-dash" /> @@ -25,6 +31,10 @@ <xforms:label>Page 1</xforms:label> <xforms:input ref="option1" label="Option One ∀"/> <xforms:input ref="option2" label="Option Two π"/> + <xforms:upload ref="svgfile" accept="image/svg+xml"> + <xforms:label>Input image</xforms:label> + <xforms:filename ref="@filename" /> + </xforms:upload> </xforms:group> <xforms:group> <xforms:label>Page 2</xforms:label>