Re: Get the values of an element and combine them
"Steven Pemberton" <[email protected]> Mon, 24 Feb 2014 17:50:58 +0100
| Newsgroups | gmane.comp.web.xforms |
|---|---|
| Organization | CWI, Amsterdam |
| Message-ID | <op.xbso282jsmjzpq@steven-ux21a> |
Here is an example of how I would do it:
http://www.cwi.nl/~steven/forms/dcterms.xml
I'm not sure of all the requirements of your problem, but what I do is:
1. At initialisation, extract the values of east and north from your
input spatial value:
<action ev:event="xforms-ready">
<setvalue ref="east"
value="substring-before(substring-after(instance('in')/spatial, 'east='),
';')"/>
<setvalue ref="north"
value="substring-before(substring-after(instance('in')/spatial, 'north='),
';')"/>
</action>
2. Bind a calculation to the output spatial value:
<bind ref="spatial" calculate="concat('east=', ../east, '; north=',
../north, ';')"/>
I hope this helps.
Steven Pemberton
On Thu, 20 Feb 2014 16:13:50 +0100, Jean-Baptiste Pressac
<[email protected]> wrote:
> Hello,
> I would like to use Xform to edit the following element :
> <dcterms:spatial xsi:type="dcterms:Point">east=456;
> north=123;</dcterms:spatial>
>
> I could use :
> <xf:input ref="dcterms:spatial[@xsi:type='dcterms:Point']"
> class="dcterms:spatial">
> <xf:label>Latitude / Longitude:</xf:label>
> </xf:input>
>
> But is there a way to display two inputs to let the user enter the east
> value and the north value separately ?
>
> Thanks,