insert action suggestion

Hi,

An insert action may occur on a node-set which is allowed to be empty. In order to have
something to copy to the instance in that case, the instance element should contain some
element in which the source for the copy can be found. This can't be the last element of
the node-set we are going to insert in, because then the node-set would have to contain
at least one element, which is not good because it is allowed to be empty.

As a consequence the xforms:instance element must contain two elements: one that will
be submitted and another in which initialisation elements reside. As an example:

<model>
   <instance>
     <my:doc>
       <my:things>
       </my:things>
     </my:doc>
     <my:doc-init>
       <my:things>
         <my:thing>...</my:thing>
       </my:things>
     </my:doc-init>
   </instance>

   <submitinfo
     ref="my:doc"
     ...
   />
</model>

<repeat id="things" nodeset="my:doc/my:things/my:thing">
   ...
</repeat>

<button>
   <action ev:event="ev:activate">
     <insert nodeset="my:doc-init/my:things/my:thing"
                 at="cursor('things')"
                 position="after"/>
   </action>
</button>

I suggest an alternative which consists of allowing to specify the element to be copied
to the instance in the insert element itself. The content of the insert element would be
an alternative to the nodeset attribute.

Regards,

Werner.
-- 
Werner Donné  --  Re BVBA
Engelbeekstraat 8		Papenhof 15
B-3300 Tienen			B-3583 Beringen
tel: (+32) 486 425803	e-mail: werner.donne@re.be

Received on Tuesday, 8 January 2002 11:47:00 UTC