pub struct CompiledExpr { /* private fields */ }Expand description
An expression ready to be evaluated: functions and variables resolved against a static context. It holds no node and can be shared between threads.
Implementations§
Source§impl CompiledExpr
impl CompiledExpr
Sourcepub const fn is_at_most_one(&self) -> bool
pub const fn is_at_most_one(&self) -> bool
Whether the value is statically known to have at most one item.
Sourcepub const fn is_never_numeric(&self) -> bool
pub const fn is_never_numeric(&self) -> bool
Whether its value is statically known never to be a number: its static type, as Saxon infers it once the expression is type-checked, is not numeric (nodes, untyped, string, boolean, URI or date values, or no item). A predicate with such a value is never positional: its effective boolean value decides.
Source§impl CompiledExpr
impl CompiledExpr
Sourcepub fn effective_boolean_value(
&self,
dc: &DynamicContext<'_>,
context: &Context,
) -> Result<bool>
pub fn effective_boolean_value( &self, dc: &DynamicContext<'_>, context: &Context, ) -> Result<bool>
Evaluates the effective boolean value of the expression, reading no more of the
sequence than needed (as xsl:if and xsl:when do).
§Errors
The dynamic error the evaluation raises.
Source§impl CompiledExpr
impl CompiledExpr
Sourcepub fn select_in_place(
&self,
dc: &DynamicContext<'_>,
context: &Context,
storage: SelectionStorage,
) -> Result<Option<NodeSelection>>
pub fn select_in_place( &self, dc: &DynamicContext<'_>, context: &Context, storage: SelectionStorage, ) -> Result<Option<NodeSelection>>
The value of the expression when it is an axis step without predicates on an
axis read in document order, or a union of up to four (@*|*,
*|comment()|processing-instruction()), or . when the context item is a node:
its nodes read from the tree, without the sequences of
CompiledExpr::evaluate (which gives the same nodes, and raises the same error
for a context item that is not a node). None for any other expression, which is
not evaluated.
§Errors
The context item is absent or is not a node.
storage holds the nodes when they are read; given back by
NodeSelection::into_storage, its memory serves many selections.