RE: empty instance generates link exception?

> There are other situations where you need empty instances:
> 
>   * creating an instance ready to be populated by script also currently
>     requires creating a dummy node and then removing it;
> 
>   * in fP we allow lazy authoring to take place at the instance level
>     rather than the model. In other words, you can create an empty
>     instance and then have it populated by the use of lazy authoring.
>     This is not possible if exceptions are thrown.
> 
> So all in all, I see no purpose in enforcing the *presence* of an XML
> document--it doesn't gain us anything. (It goes without saying that if there
> is something within the xf:instance tags then it must be well-formed, etc.)
> 
> And in terms of mindset (what a new author might expect to be able to do
> having used other languages), I don't see why we don't support the
> equivalent of all of the following pseudo-code constructions:
> 
>   var inst = new Instance();
> 
>   var inst = new Instance("<dummy />");
> 
>   var inst = new Instance("http://example.org/data.xml");
> 
> (We currently only support the second and third.)
> 
> Regards,
>  
> Mark
> 
> PS Aaron--fP 1.4 does now throw the exception, as per XForms 1.0 SE...but as
> you can see, we don't like it!

also,
from
	http://www.w3.org/TR/xforms/slice4.html#evt-modelConstructDone

it gives detail about what must happen when an instance never exists, so presumably its possible to start out with zero instances. 
either this or we are placed in the ludicrous situation of having to provide a dummy instance which is then completely ignored whilst 
we load new instances after the form has started.
if both of these options is impossible then  the condition handled by this clause can never be reached.
they cant have it both ways! ;-)
am I missing something obvious here?

Cheers
Jason.

Received on Friday, 6 January 2006 14:23:39 UTC