Split tool description into several files

This commit is contained in:
Suzanne Soy 2021-04-30 12:37:15 +01:00
parent 2bf8f79823
commit ca4b88bbcd
7 changed files with 114 additions and 0 deletions

19
myTool.command.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<XternalApps:command 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">
<XternalApps:method>exec</XternalApps:method>
<XternalApps:accepts>
<!-- Default parameter-passing style -->
<XternalApps:default ref=".//*" style="double-dash">
<!-- Exceptions -->
<XternalApps:exception ref="my:svgfile" style="pipe" />
</XternalApps:accepts>
<XternalApps:returns>
<!-- This example does not use a default output-returning style -->
<!-- Exceptions -->
<XternalApps:exception ref="my:output-svgfile" style="pipe" />
<XternalApps:exception ref="my:output-exitcode" style="exitcode" />
</XternalApps:returns>
</XternalApps:command>

23
myTool.input-form.xml Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<XternalApps:input-form 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">
<xforms:group>
<xforms:label>Page 1</xforms:label>
<xforms:input ref="my:option1" label="Option One ∀"/>
<xforms:input ref="my:option2" label="Option Two π"/>
<xforms:upload ref="my: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>
<xforms:input ref="my:option2" label="Option Two"/>
<xforms:select1 ref="my:option3" label="Option Three">
<xforms:item label="Foo label" value="foo"/>
<xforms:item label="Bar label" value="bar"/>
</xforms:select1>
</xforms:group>
</XternalApps:input-form>

19
myTool.input-model.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<XternalApps:input-model 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">
<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>
<xforms:bind ref="my:svgfile" type="mime:image/svg+xml" required="true()"/>
<xforms:bind ref="my:option1" type="xsd:decimal" required="true()"/>
<xforms:bind ref="my:option2" type="xsd:string" required="true()"/>
</xforms:model>
</XternalApps:input-model>

13
myTool.metadata.xml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<XternalApps:metadata 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">
<XternalApps:name>MyTool</XternalApps:name>
<XternalApps:tooltip>This tool is my tool, it is very useful in a toolset.</XternalApps:tooltip>
<XternalApps:icon>MyTool.svg</XternalApps:icon>
<XternalApps:extended-description>
Lots of text,
blah blha bhal
</XternalApps:extended-description>
</XternalApps:metadata>

11
myTool.output-form.xml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<XternalApps:output-form 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">
<xforms:group>
<xforms:label>Single output page</xforms:label>
<xforms:output ref="my:output-svgfile" label="Output SVG"/>
<xforms:output ref="my:output-exitcode" label="0 means Success"/>
</xforms:group>
</XternalApps:output-form>

16
myTool.output-model.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<XternalApps:output-model 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">
<xforms:model>
<xforms:instance>
<my:tool-output>
<my:output-svgfile/>
<my:output-exitcode/>
</my:tool-output>
</xforms:instance>
<xforms:bind ref="my:output-svgfile" type="mime:image/svg+xml"/>
<xforms:bind ref="my:output-exitcode" type="xsd:decimal" required="true()"/>
</xforms:model>
</XternalApps:output-model>

13
myTool.xml Normal file
View File

@ -0,0 +1,13 @@
<?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"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="myTool.metadata.xml">
<xi:include href="myTool.input-model.xml">
<xi:include href="myTool.input-form.xml">
<xi:include href="myTool.command.xml">
<xi:include href="myTool.output-model.xml">
<xi:include href="myTool.output-form.xml">
</XternalApps:tool>