Here is what I have found works:
<xforms:select1 id="activity-status-select"
ref="/iati-activities/iati-activity/activity-status">
<xforms:label>Activity Status</xforms:label>
<xforms:action ev:event="xforms-value-changed">
<xforms:setvalue ref="/iati-activities/iati-activity/activity-status/@code"
value="instance('activity-status')/ActivityStatus[name=/iati-activities/iati-activity/activity-status]/code"/>
</xforms:action>
<xforms:itemset nodeset="instance('activity-status')/ActivityStatus">
<xforms:label ref="./name"/>
<xforms:value ref="./name"/>
</xforms:itemset>
</xforms:select1>
> -----Original Message-----
> From: [email protected]
> Sent: Fri, 26 Apr 2013 14:37:28 -0800
> To: [email protected]
> Subject: [Xsltforms-support] getting value from select1 into attribute
> and label into element
>
> Hello List
>
> I know this is perhaps more a generic XForms question, but I hope some
> list member might be able to help me.
>
> I am creating a select1 element and I want to put the value into an
> attribute of my model instance and the label into the corresponding
> element.
>
> e.g. <activity-status code="4">Post-completion</activity-status> where
> "4" is the value and "Post-completion" is the label in the select1 box.
>
> Many thanks
>
> Peter
>
> ____________________________________________________________
> FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on
> your desktop!
> Check it out at http://www.inbox.com/marineaquarium
>
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring
> service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt!
> http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> Xsltforms-support mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xsltforms-support
____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and
family!
Visit http://www.inbox.com/photosharing to find out more!
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support