<xf:action ev:event="xforms-model-construct">
<xf:insert nodeset="instance('subInstance')/type" origin="instance('defaultType')/type"/>
</xf:action>
別のインスタンスに基づいてインスタンスを作成したいと考えています。上記のように xf:insert を使用してこれを行うことができます。
ただし、xf:inserts を開始する前に、インスタンス「subInstance」に空の型要素が含まれている必要があることに気付きました。
<subInstance>
<type/>
</subInstance>
したがって、すべての xf:inserts の後、次の手順を実行して最初の空のものを削除する必要があります。
<xf:delete nodeset="instance('subInstance')/type" at="1" />
このメソッドに何か問題がありますか、または最初の空なしで直接挿入できる方法はありますか?