Posted by
Hank Ratzesberger-2 on
Mar 03, 2011; 8:22pm
URL: https://discuss.orbeon.com/Select1-binding-to-instance-in-Form-builder-tp3333206p3334128.html
Hi Hasan,
You can use the src attribute to have the instance loaded :
<xforms:instance id="stations"
src="
http://db.nees.ucsb.edu/exist/rest/db?_query=doc('/pub/stations.xml')"/>
The select control has an itemset with a nodeset attribute. Sorry that the
xpath and all looks complicated. Note that you can have both items and itemsets,
so you can have a "slect one" etc. :
<xforms:select1 ref="sta" id="sta-select">
<xforms:item>
<xforms:value/>
<xforms:label> Select Station ... </xforms:label>
</xforms:item>
<xforms:itemset nodeset="instance('stations')//pfarr[@name='Sta_Info']/pfarr">
<xforms:value value="upper-case(@name)"/>
<xforms:label><xforms:output value="concat(upper-case(@name),' - ',pfstring[@name='Description'])"/></xforms:label>
</xforms:itemset>
</xforms:select1>
<xforms:itemset nodeset="instance('stations')//pfarr[@name='Sta_Info']/pfarr">
<xforms:value value="upper-case(@name)"/>
<xforms:label><xforms:output value="concat(upper-case(@name),' - ',pfstring[@name='Description'])"/></xforms:label>
</xforms:itemset>
HTH,
Hank
On Mar 3, 2011, at 4:03 AM, Hasan wrote:
Hank Ratzesberger
NEES@UCSB
Earth Research Institute
6707 Ellison Hall
University of California, Santa Barbara
805-893-8042
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
OW2 mailing lists service home page:
http://www.ow2.org/wws