--- Jos Vos <[EMAIL PROTECTED]> wrote:
> Sounds like it's not an easy thing... :-( For, now, I include the
> complete form instance as a branch in the action result and I copy
> it completely with XUpdate, replacement the whole form.
Jos,
See the XUpdate in the attached test case. If I understand what you are
trying to do correctly, that should do the trick. It assumes that in the
"target document" you have the same structure as in the "source document".
Alex
<test description="Iterate of nodeset" name="oxf:xupdate">
<input name="data">
<root xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">
<source>
<form>
<person/>
<givenName valid="false"/>
<country valid="false"/>
</form>
</source>
<target>
<form>
<person/>
<givenName/>
<country/>
</form>
</target>
</root>
</input>
<input name="config">
<xu:modifications xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">
<xu:variable name="target" select="/root/target//*"/>
<xu:for-each select="/root/source//*">
<xu:variable name="i" select="position()"/>
<xu:variable name="valid" select="@valid"/>
<xu:message><xu:value-of select="$valid"/></xu:message>
<xu:if test="$valid">
<xu:append select="$target[$i]">
<xu:attribute name="xxforms:valid"><xu:value-of select="$valid"/></xu:attribute>
</xu:append>
</xu:if>
</xu:for-each>
</xu:modifications>
</input>
<output name="data">
<root xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">
<source>
<form>
<person/>
<givenName valid="false"/>
<country valid="false"/>
</form>
</source>
<target>
<form>
<person/>
<givenName xxforms:valid="false"/>
<country xxforms:valid="false"/>
</form>
</target>
</root>
</output>
</test>