-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore child nodes if the instance declaration includes a source
- Loading branch information
1 parent
d7d7385
commit 684390b
Showing
3 changed files
with
72 additions
and
7 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
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
48 changes: 48 additions & 0 deletions
48
src/test/resources/org/javarosa/xform/parse/external-select-xml-dummy-nodes.xml
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,48 @@ | ||
<?xml version="1.0"?> | ||
<h:html xmlns="http://www.w3.org/2002/xforms" | ||
xmlns:h="http://www.w3.org/1999/xhtml" > | ||
<h:head> | ||
<h:title>XML External Secondary Instance With Dummy Nodes</h:title> | ||
<model> | ||
<instance> | ||
<data id="external-select-xml"> | ||
<first/> | ||
<second/> | ||
<meta> | ||
<instanceID/> | ||
</meta> | ||
</data> | ||
</instance> | ||
|
||
<instance id="external-xml" src="jr://file/external-data.xml"> | ||
<root> | ||
<item> | ||
<name>_</name> | ||
<label>_</label> | ||
</item> | ||
</root> | ||
</instance> | ||
|
||
<bind nodeset="/data/first" type="select1"/> | ||
<bind nodeset="/data/second" type="select1"/> | ||
<bind calculate="concat('uuid:', uuid())" nodeset="/data/meta/instanceID" readonly="true()" type="string"/> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<select1 ref="/data/first"> | ||
<label>First</label> | ||
<itemset nodeset="instance('external-xml')/root/item[first='']"> | ||
<value ref="name"/> | ||
<label ref="label"/> | ||
</itemset> | ||
</select1> | ||
|
||
<select1 ref="/data/second"> | ||
<label>Second</label> | ||
<itemset nodeset="instance('external-xml')/root/item[first=/data/first]"> | ||
<value ref="name"/> | ||
<label ref="label"/> | ||
</itemset> | ||
</select1> | ||
</h:body> | ||
</h:html> |