I'm new to XForms and I have a question about using values of elements in setting values of other elements. The following code snippet shows what I want to do. The value of the element "item" should set as the current date + 5 more days. Works fine! But what if the number of the days are variable and depends on values of another element. For example there is another element in the path items/ called "item2". Is it possible to add the value of item2 (which is a number) to the current date? Thanks for answers!
<xf:action>
<xf:setvalue ref="//items/item" value="current-dateTime() + xs:dayTimeDuration('P5D')"/>
</xf:action>
Best regards, Felix
You need to create a valid
xs:dayTimeDurationvalue. For example this should work: