02021-01-26 stream: example xforms tool description

This commit is contained in:
Suzanne Soy 2021-01-26 08:10:45 +00:00
parent dea3f1df2e
commit cf51a13d8a

30
myTool.xforms Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<XternalApps:tool xmlns:my="http://github.com/jsmaniac/XternalApps/myTool" xmlns:XternalApps="http://github.com/jsmaniac/XternalApps" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- Internal model and default values follow: -->
<xforms:model>
<xforms:instance>
<my:tool>
<my:option1/>
<my:option2>default value</my:option2>
<my:option3>bar</my:option3>
</my:tool>
</xforms:instance>
<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" />
</xforms:model>
<!-- Description of the user interface follows: -->
<xforms:group>
<xforms:label>Page 1</xforms:label>
<xforms:input ref="option1" label="Option One ∀"/>
<xforms:input ref="option2" label="Option Two π"/>
</xforms:group>
<xforms:group>
<xforms:label>Page 2</xforms:label>
<xforms:input ref="option2" label="Option Two"/>
<xforms:select1 ref="option3" label="Option Three">
<xforms:item label="Foo label" value="foo"/>
<xforms:item label="Bar label" value="bar"/>
</xforms:select1>
</xforms:group>
</XternalApps:tool>