Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MartijnR/bb7a8a7dadf1382a3ee0a13b10469191 to your computer and use it in GitHub Desktop.
Save MartijnR/bb7a8a7dadf1382a3ee0a13b10469191 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:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<h:head>
<h:title>cascading_internal_translated</h:title>
<model>
<itext>
<translation lang="English">
<text id="country:label">
<value>Country</value>
</text>
<text id="city:label">
<value>City</value>
</text>
<text id="neighborhood:label">
<value>Neighborhood</value>
</text>
<text id="/cascading_internal_translated/cascading_widgets/group2:label">
<value>Cascading Selects with Pulldowns</value>
</text>
<text id="/cascading_internal_translated/cascading_widgets/group1:label">
<value>Cascading Selects with Radio Buttons</value>
</text>
</translation>
<translation lang="Français">
<text id="country:label">
<value>Pays</value>
</text>
<text id="city:label">
<value>Le City</value>
</text>
<text id="neighborhood:label">
<value>Le Neighborhood</value>
</text>
<text id="/cascading_internal_translated/cascading_widgets/group2:label">
<value>Le CSwP</value>
</text>
<text id="/cascading_internal_translated/cascading_widgets/group1:label">
<value>Le CSwRB</value>
</text>
</translation>
</itext>
<instance>
<cascading_internal_translated id="cascading_internal_translated">
<cascading_widgets>
<group1>
<country/>
<city/>
<neighborhood/>
</group1>
<group2>
<country2/>
<city2/>
<neighborhood2/>
</group2>
</cascading_widgets>
<meta>
<instanceID/>
</meta>
</cascading_internal_translated>
</instance>
<instance id="countries">
<root>
<item>
<label lang="Français">Les Pays Bas</label>
<label lang="English">The Netherlands</label>
<name>nl</name>
</item>
<item>
<label lang="Français">Les Etats-Unis</label>
<label lang="English">USA</label>
<name>usa</name>
</item>
</root>
</instance>
<instance id="cities">
<root>
<item>
<label lang="Français">Le Amsterdam</label>
<label lang="English">Amsterdam</label>
<country>nl</country>
<name>ams</name>
</item>
<item>
<label lang="Français">Le Denver</label>
<label lang="English">Denver</label>
<country>usa</country>
<name>den</name>
</item>
<item>
<label lang="Français">Le NYC</label>
<label lang="English">NYC</label>
<country>usa</country>
<name>nyc</name>
</item>
<item>
<label lang="Français">Les LA</label>
<label lang="English">LA</label>
<country>usa</country>
<name>la</name>
</item>
<item>
<label lang="Français">Le Rotterdam</label>
<label lang="English">Rotterdam</label>
<country>nl</country>
<name>rot</name>
</item>
<item>
<label lang="Français">Le Dronten</label>
<label lang="English">Dronten</label>
<country>nl</country>
<name>dro</name>
</item>
</root>
</instance>
<instance id="neighborhoods">
<root>
<item>
<label lang="Français">Les Bronx</label>
<label lang="English">Bronx</label>
<country>usa</country>
<city>nyc</city>
<name>bronx</name>
</item>
<item>
<label lang="Français">Le Harlem</label>
<label lang="English">Harlem</label>
<city>nyc</city>
<name>harlem</name>
</item>
<item>
<label lang="Français">Le Belair</label>
<label lang="English">Belair</label>
<country>usa</country>
<city>la</city>
<name>belair</name>
</item>
<item>
<label lang="Français">Le Westerpark</label>
<label lang="English">Westerpark</label>
<country>nl</country>
<city>ams</city>
<name>wes</name>
</item>
<item>
<label lang="Français">Le Park Hill</label>
<label lang="English">Park Hill</label>
<country>usa</country>
<city>den</city>
<name>parkhill</name>
</item>
<item>
<label lang="Français">Le Harbor</label>
<label lang="English">Harbor</label>
<country>nl</country>
<city>rot</city>
<name>haven</name>
</item>
<item>
<label lang="Français">Le Dam</label>
<label lang="English">Dam</label>
<country>nl</country>
<city>ams</city>
<name>dam</name>
</item>
<item>
<label lang="Français">Le Centre</label>
<label lang="English">Centrm</label>
<country>nl</country>
<city>rot</city>
<name>centrum</name>
</item>
<item>
<label lang="Français">Le Harbor</label>
<label lang="English">Haven</label>
<country>nl</country>
<city>dro</city>
<name>haven</name>
</item>
</root>
</instance>
<bind nodeset="/cascading_internal_translated/cascading_widgets/group1/country" type="select1"/>
<bind nodeset="/cascading_internal_translated/cascading_widgets/group1/city" type="select1"/>
<bind nodeset="/cascading_internal_translated/cascading_widgets/group1/neighborhood" type="select1"/>
<bind nodeset="/cascading_internal_translated/cascading_widgets/group2/country2" type="select1"/>
<bind nodeset="/cascading_internal_translated/cascading_widgets/group2/city2" type="select1"/>
<bind nodeset="/cascading_internal_translated/cascading_widgets/group2/neighborhood2" type="select1"/>
<bind calculate="concat('uuid:', uuid())" nodeset="/cascading_internal_translated/meta/instanceID" readonly="true()" type="string"/>
</model>
</h:head>
<h:body>
<group ref="/cascading_internal_translated/cascading_widgets">
<group ref="/cascading_internal_translated/cascading_widgets/group1">
<label ref="jr:itext('/cascading_internal_translated/cascading_widgets/group1:label')"/>
<select1 ref="/cascading_internal_translated/cascading_widgets/group1/country">
<label ref="jr:itext('country:label')"/>
<itemset nodeset="instance('countries')/root/item">
<value ref="name"/>
<label ref="translate(label)"/>
</itemset>
</select1>
<select1 ref="/cascading_internal_translated/cascading_widgets/group1/city">
<label ref="jr:itext('city:label')"/>
<itemset nodeset="instance('cities')/root/item[country= /cascading_internal_translated/cascading_widgets/group1/country ]">
<value ref="name"/>
<label ref="translate(label)"/>
</itemset>
</select1>
<select1 ref="/cascading_internal_translated/cascading_widgets/group1/neighborhood">
<label ref="jr:itext('neighborhood:label')"/>
<itemset nodeset="instance('neighborhoods')/root/item[country= /cascading_internal_translated/cascading_widgets/group1/country and city= /cascading_internal_translated/cascading_widgets/group1/city ]">
<value ref="name"/>
<label ref="translate(label)"/>
</itemset>
</select1>
</group>
<group ref="/cascading_internal_translated/cascading_widgets/group2">
<label ref="jr:itext('/cascading_internal_translated/cascading_widgets/group2:label')"/>
<select1 appearance="minimal" ref="/cascading_internal_translated/cascading_widgets/group2/country2">
<label ref="jr:itext('country:label')"/>
<itemset nodeset="instance('countries')/root/item">
<value ref="name"/>
<label ref="translate(label)"/>
</itemset>
</select1>
<select1 appearance="minimal" ref="/cascading_internal_translated/cascading_widgets/group2/city2">
<label ref="jr:itext('city:label')"/>
<itemset nodeset="instance('cities')/root/item[country= /cascading_internal_translated/cascading_widgets/group2/country2 ]">
<value ref="name"/>
<label ref="translate(label)"/>
</itemset>
</select1>
<select1 appearance="minimal" ref="/cascading_internal_translated/cascading_widgets/group2/neighborhood2">
<label ref="jr:itext('neighborhood:label')"/>
<itemset nodeset="instance('neighborhoods')/root/item[country= /cascading_internal_translated/cascading_widgets/group2/country2 and city= /cascading_internal_translated/cascading_widgets/group2/city2 ]">
<value ref="name"/>
<label ref="translate(label)"/>
</itemset>
</select1>
</group>
</group>
</h:body>
</h:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment