Re: Get the values of an element and combine them

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  
<Jean-Baptiste.Pressac@univ-brest.fr> 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,

Received on Monday, 24 February 2014 16:51:34 UTC