<instance>
<my:order>
<my:item>
<my:amount />
<my:discount />
</my:item>
</my:order>
</instance>
<bind nodeset="my:item/my:discount"
calculate="../my:amount * 0.1"
type="xsd:decimal" />
bind element in the model associates an XPath calculation with particular elements in the instance
nodeset attribute chooses the nodes whose values are calculated
calculate attribute contains the XPath expression that's evaluated to give the values for those nodes
Optional type attribute specifies schema type for the expression result
Side-effect free (unlike JavaScript)