instance fallback

A recurring use case I have is initialising an instance from an external  
resource, and if that resource doesn't exist using a template.

The way to do it now is to initialise the instance:

<instance id="list">
    <list xmlns="">
       <item>Enter data here</item>

and then attempt to replace it on startup:

<submission id="init" resource="list.xml" replace="instance"  
    <action ev:event="xforms-submit-error" ev:propagate="stop"  

<action ev:event="xforms-ready">
    <send submission="init"/>

How much easier would life be if we could include fallback in the instance:

<instance src="list.xml">
    <list xmlns="">
       <item>Enter data here</item>

(I think it would have to be @src, since that has priority over inline  


Received on Thursday, 12 July 2018 11:20:40 UTC