This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed: test XForms can now be dropped into /test/mock to use them i…
…n tests instead of generating transformation resuls outside of enketo-core, closes #293
- Loading branch information
Showing
19 changed files
with
1,803 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
/build/js/ | ||
/build/lib/ | ||
/lib/bower-components/ | ||
/test/mock/forms.json | ||
temp | ||
.sass-cache | ||
._* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?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:orx="http://openrosa.org/xforms/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<h:head> | ||
<h:title>calcs</h:title> | ||
<model> | ||
<instance> | ||
<calcs id="calcs"> | ||
<calc1/> | ||
<calc2/> | ||
<cond1/> | ||
<meta> | ||
<instanceID/> | ||
</meta> | ||
</calcs> | ||
</instance> | ||
<bind calculate="1 + 2" nodeset="/calcs/calc1" relevant=" /calcs/cond1 = 'yes'" type="string"/> | ||
<bind calculate="concat('1', '2')" nodeset="/calcs/calc2" type="string"/> | ||
<bind nodeset="/calcs/cond1" type="string"/> | ||
<bind calculate="concat('uuid:', uuid())" nodeset="/calcs/meta/instanceID" readonly="true()" type="string"/> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<input ref="/calcs/cond1"> | ||
<label>enter 'yes' to make calc1 relevant</label> | ||
</input> | ||
</h:body> | ||
</h:html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<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:orx="http://openrosa.org/xforms/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<h:head> | ||
<h:title>calcs_in_repeats</h:title> | ||
<model> | ||
<instance> | ||
<calcs_in_repeats id="calcs_in_repeats"> | ||
<formhub> | ||
<uuid/> | ||
</formhub> | ||
<calc1/> | ||
<calc2/> | ||
<cond1/> | ||
<rep1 jr:template=""> | ||
<num1/> | ||
<calc3/> | ||
</rep1> | ||
<note1/> | ||
<meta> | ||
<instanceID/> | ||
</meta> | ||
</calcs_in_repeats> | ||
</instance> | ||
<bind calculate="1 + 2" nodeset="/calcs_in_repeats/calc1" relevant=" /calcs_in_repeats/cond1 = 'yes'" type="string"/> | ||
<bind calculate="concat('1', '2')" nodeset="/calcs_in_repeats/calc2" type="string"/> | ||
<bind nodeset="/calcs_in_repeats/cond1" type="string"/> | ||
<bind nodeset="/calcs_in_repeats/rep1/num1" type="int"/> | ||
<bind calculate=" /calcs_in_repeats/rep1/num1 * 20" nodeset="/calcs_in_repeats/rep1/calc3" type="string"/> | ||
<bind nodeset="/calcs_in_repeats/note1" readonly="true()" type="string"/> | ||
<bind calculate="concat('uuid:', uuid())" nodeset="/calcs_in_repeats/meta/instanceID" readonly="true()" type="string"/> | ||
<bind calculate="'47eed988240249948e42aadfa6bcdb86'" nodeset="/calcs_in_repeats/formhub/uuid" type="string"/> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<input ref="/calcs_in_repeats/cond1"> | ||
<label>enter 'yes' to make calc1 relevant</label> | ||
</input> | ||
<group ref="/calcs_in_repeats/rep1"> | ||
<label/> | ||
<repeat nodeset="/calcs_in_repeats/rep1"> | ||
<input ref="/calcs_in_repeats/rep1/num1"> | ||
<label>enter a number</label> | ||
</input> | ||
</repeat> | ||
</group> | ||
<input ref="/calcs_in_repeats/note1"> | ||
<label>value of num1 inside (first) repeat is: <output value=" /calcs_in_repeats/rep1/num1 "/></label></input> | ||
</h:body> | ||
</h:html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
<?xml version="1.0"?> | ||
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa"> | ||
<h:head> | ||
<h:title>Cascading Triple Select Form</h:title> | ||
<model> | ||
<itext> | ||
<translation lang="english"> | ||
<text id="washington"> | ||
<value>Washington State</value> | ||
</text> | ||
<text id="illinois"> | ||
<value>Illinois State</value> | ||
</text> | ||
<text id="king"> | ||
<value>King County</value> | ||
</text> | ||
<text id="pierce"> | ||
<value>Pierce County</value> | ||
</text> | ||
<text id="douglas"> | ||
<value>Douglas County</value> | ||
</text> | ||
<text id="cook"> | ||
<value>Cook County</value> | ||
</text> | ||
</translation> | ||
<translation lang="italian"> | ||
<text id="washington"> | ||
<value>State of Washington</value> | ||
</text> | ||
<text id="illinois"> | ||
<value>State of Illinois</value> | ||
</text> | ||
<text id="king"> | ||
<value>County King</value> | ||
</text> | ||
<text id="pierce"> | ||
<value>County Pierce</value> | ||
</text> | ||
<text id="douglas"> | ||
<value>County Douglas</value> | ||
</text> | ||
<text id="cook"> | ||
<value>County Cook</value> | ||
</text> | ||
</translation> | ||
</itext> | ||
<instance> | ||
<form id="CascadingTripleSelect" version="2012072301"> | ||
<state /> | ||
<county /> | ||
<city /> | ||
</form> | ||
</instance> | ||
<instance id="choices"> | ||
<states> | ||
<state> | ||
<value>washington</value> | ||
<counties> | ||
<county> | ||
<value>king</value> | ||
<cities> | ||
<city> | ||
<name>Seattle</name> | ||
<value>sea</value> | ||
</city> | ||
<city> | ||
<name>Redmond</name> | ||
<value>red</value> | ||
</city> | ||
</cities> | ||
</county> | ||
<county> | ||
<value>pierce</value> | ||
<cities> | ||
<city> | ||
<name>Tacoma</name> | ||
<value>tac</value> | ||
</city> | ||
<city> | ||
<name>Puyallup</name> | ||
<value>puy</value> | ||
</city> | ||
</cities> | ||
</county> | ||
<county> | ||
<value>douglas</value> | ||
<cities> | ||
<city> | ||
<name>Bridgeport</name> | ||
<value>bri</value> | ||
</city> | ||
<city> | ||
<name>Coulee Dam</name> | ||
<value>cod</value> | ||
</city> | ||
<city> | ||
<name>East Wenatchee</name> | ||
<value>ewe</value> | ||
</city> | ||
<city> | ||
<name>Rock Island</name> | ||
<value>roi</value> | ||
</city> | ||
</cities> | ||
</county> | ||
</counties> | ||
</state> | ||
<state> | ||
<value>illinois</value> | ||
<counties> | ||
<county> | ||
<value>cook</value> | ||
<cities> | ||
<city> | ||
<name>Chicago</name> | ||
<value>chi</value> | ||
</city> | ||
<city> | ||
<name>Oak Lawn</name> | ||
<value>oal</value> | ||
</city> | ||
<city> | ||
<name>Oak Forest</name> | ||
<value>oaf</value> | ||
</city> | ||
</cities> | ||
</county> | ||
<county> | ||
<value>douglas</value> | ||
<cities> | ||
<city> | ||
<name>Arcola</name> | ||
<value>arc</value> | ||
</city> | ||
<city> | ||
<name>Tuscola</name> | ||
<value>tus</value> | ||
</city> | ||
<city> | ||
<name>Villa Grove</name> | ||
<value>vig</value> | ||
</city> | ||
</cities> | ||
</county> | ||
</counties> | ||
</state> | ||
</states> | ||
</instance> | ||
<bind nodeset="/form/state" type="select1" /> | ||
<bind nodeset="/form/county" type="select1" /> | ||
<bind nodeset="/form/city" type="select1" /> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<select1 ref="/form/state"> | ||
<itemset nodeset="instance('choices')/states/state"> | ||
<label ref="jr:itext(value)" /> | ||
<value ref="value" /> | ||
</itemset> | ||
</select1> | ||
<select1 ref="/form/county"> | ||
<itemset nodeset="instance('choices')/states/state[value=/form/state]/counties/county"> | ||
<label ref="jr:itext(value)" /> | ||
<value ref="value" /> | ||
</itemset> | ||
</select1> | ||
<select1 ref="/form/city"> | ||
<itemset nodeset="instance('choices')/states/state[value=/form/state]/counties/county[value=/form/county]/cities/city"> | ||
<label ref="name" /> | ||
<value ref="value" /> | ||
</itemset> | ||
</select1> | ||
</h:body> | ||
</h:html> |
Oops, something went wrong.