pub struct TransformOptions<'r> {
pub implicit_timezone: Option<i16>,
pub current_date_time: Option<DateTime>,
pub parameters: Vec<(QName, Vec<Item>)>,
pub resolver: Option<&'r dyn DocumentResolver>,
pub max_depth: u32,
pub max_nesting: u32,
pub max_stack: u32,
pub max_tail_calls: u32,
}Expand description
Options of a transformation.
Fields§
§implicit_timezone: Option<i16>The implicit timezone in minutes east of UTC (Saxon takes the JVM’s). Default: UTC.
current_date_time: Option<DateTime>The value of fn:current-dateTime(), with a timezone. Default: the system clock,
read once per transformation; required on targets without one
(wasm32-unknown-unknown).
parameters: Vec<(QName, Vec<Item>)>Values of the global parameters (xsl:param), by name.
resolver: Option<&'r dyn DocumentResolver>Where document() gets documents other than the source document.
max_depth: u32The maximum element depth of the source document and of the documents document()
loads (the document element is at depth 1): a document with an element nested
deeper is refused with a LIMIT error (TransformError::limit). Default:
DEFAULT_MAX_DEPTH.
max_nesting: u32The maximum nesting of template rules, built-in template rules, named templates
and stylesheet functions invoked one inside another: beyond it, the transformation
ends with a LIMIT error (TransformError::limit) instead of overflowing the
stack. Default: DEFAULT_MAX_NESTING. A larger value needs a larger stack.
max_stack: u32The most stack, in bytes, the invocations in progress and the expressions they
evaluate may use, measured from the start of the transformation: beyond it, the
transformation ends with a LIMIT error (LimitExceeded::Stack) instead of
overflowing the stack. It bounds what the nesting alone cannot, the stack of each
level, which depends on the stylesheet: a function calling itself from a nested
expression needs much more than a template rule applied to a child. The thread
must have this much stack and some more, for its caller and for the deepest level.
Default: DEFAULT_MAX_STACK.
max_tail_calls: u32The most tail calls in a row (xsl:call-template at the end of a template, run in
its place): beyond it, the transformation ends with a LIMIT error
(LimitExceeded::TailCalls) rather than run for ever. Default:
DEFAULT_MAX_TAIL_CALLS.