Dynamic dependencies

https://www.w3.org/community/xformsusers/wiki/XForms_2.0#Dynamic_Dependencies

This section lists some functions that are safe and dangerous for using in  
model binding expressions.

It lists position(), last(), and count() as safe and then goes on to say:

"functions such as id(), instance(), and index() can establish dynamic  
dependencies that can necessitate invoking a rebuild if they are used in  
model binding expressions or computed expressions because the results of  
the functions are affected by changing the values of instance nodes, not  
by inserting or deleting nodes."

index() I understand perfectly. The value comes from outside the model,  
and so changes to the index don't trigger rebuild/recalculate.

id() I think I understand. id('X Y', instance('Z')) also doesn't get  
triggered I suppose.

But instance() I don't understand. Can anyone give me an example of a  
model binding that uses instance(), and is unsafe?

Steven

Received on Thursday, 22 December 2016 09:13:42 UTC