saxon:eval
Evaluates a previously compiled expression.
eval($stored-expression as jt:net.sf.saxon.functions.Evaluate-PreparedExpression, $param1 as item()*, $param2 as item()*, $param3 as item()*) ➔ xs:double
Arguments | |||
| $stored-expression | jt:net.sf.saxon.functions.Evaluate-PreparedExpression | The compiled expression to be evaluated |
| $param1 | item()* | The value to be bound to $p1 |
| $param2 | item()* | The value to be bound to $p2 |
| $param3 | item()* | The value to be bound to $p3 ... |
Result | xs:double |
Namespace
http://saxon.sf.net/
Saxon availability
Requires Saxon-PE or Saxon-EE.
Notes on the Saxon implementation
Available since before Saxon 7.2. Dropped in 12.0, but then reinstated
in 12.4 for the benefit of XQuery users, where the xsl:evaluate
instruction is
not available.
Details
This function returns the result of evaluating the supplied stored expression. A stored expression may be obtained as the result of calling the saxon:expression function.
The stored expression is evaluated in the current dynamic context, that is, the context
node is the current node, and the context position and context size are the same as the
result of calling position()
or last()
respectively.
The second and subsequent arguments to saxon:eval
supply values for the
variables $p1
, $p2
, etc. within the stored expression. For
details see saxon:expression
.