Re: The initial property - draft

How about this?

Steven

============

The initial Property

This property is evaluated once during model initialization, to calculate 
an initial value for a node. It overwrites any existing value the node may 
have.

Computed Expression: Yes.
Legal Values: Any expression.
Default Value: none.
Inheritance Rules: does not inherit.

The expression is evaluated and if it succeeds, the result is converted to 
string and stored as the value content of the associated data node. If the 
evaluation fails, the value content is set to the empty sequence.

Examples

<bind ref="today" initial="now()"/>
<bind ref="year" initial="substring(local-date(), 1, 4"/>
<bind ref="balance" initial="0" calculate="sum(../credit) - 
sum(../debit)"/>

[Note: not allowed on controls, as with @calculate]
[Processing for <insert/> still to be defined]


Model Initialization

The XML Schemas, if any, are loaded.

For each instance element an XPath data model is constructed as described 
in The instance Element section.

Instance initializations are done using the instance model item properties 
in an order necessitated by dependencies, as is done with the calculate 
property.

An update is then done for this model. (A refresh is not performed since 
the user interface has not yet been initialized.)

Received on Friday, 11 October 2024 09:27:27 UTC