2
如果我有一個XForms的情況下,像的XForms:將所有列表項的子項有一個週期
<xforms:instance id="myvrs">
<myvrs>
<subitem />
</myvrs>
</xforms:instance>
<xforms:instance id="tmp">
<temp>
<item><subitem>11</subitem></item>
<item><subitem>21</subitem><subitem>22</subitem></item>
<item></item>
</temp>
</xforms:instance>
如何使用週期像
<xforms:trigger>
<xforms:label>button</xforms:label>
<xforms:action events:event="DOMActivate">
forall in instance('tmp')/item
<xforms:insert context="instance('tmp')/item" origin="instance('myvrs')/subitem" />
endforall
</xforms:action>
</xforms:trigger>
我可以得到例如
<xforms:instance id="tmp">
<temp>
<item><subitem>11</subitem><subitem></subitem></item>
<item><subitem>21</subitem><subitem>22</subitem><subitem></subitem></item>
<item><subitem></subitem></item>
</temp>
</xforms:instance>
謝謝
感謝YOUT這麼多! – user2301515