Skip to content

Instantly share code, notes, and snippets.

@MartijnR
Created April 1, 2019 22:47
Show Gist options
  • Save MartijnR/0373972e73e569094a94ad1868c0b264 to your computer and use it in GitHub Desktop.
Save MartijnR/0373972e73e569094a94ad1868c0b264 to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:jr="http://openrosa.org/javarosa"
xmlns:odk="http://www.opendatakit.org/xforms"
xmlns:orx="http://openrosa.org/xforms"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<h:head>
<h:title>file-readonly-relevant</h:title>
<model>
<instance>
<file-readonly-relevant id="file-readonly-relevant">
<a/>
<img1/>
<img2/>
<meta>
<instanceID/>
</meta>
</file-readonly-relevant>
</instance>
<bind nodeset="/file-readonly-relevant/a" type="int"/>
<bind nodeset="/file-readonly-relevant/img1" readonly="true()" type="binary"/>
<bind nodeset="/file-readonly-relevant/img2" readonly="true()" relevant=" /file-readonly-relevant/a > 3" type="binary"/>
<bind calculate="concat('uuid:', uuid())" nodeset="/file-readonly-relevant/meta/instanceID" readonly="true()" type="string"/>
</model>
</h:head>
<h:body>
<input ref="/file-readonly-relevant/a">
<label>Enter number &gt; 3 to make relevant</label>
</input>
<upload mediatype="image/*" ref="/file-readonly-relevant/img1">
<label>Upload</label>
</upload>
<upload mediatype="image/*" ref="/file-readonly-relevant/img2">
<label>Upload with relevancy expression</label>
</upload>
</h:body>
</h:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment