Skip to main content

TransformOptions

Struct TransformOptions 

Source
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: u32

The 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: u32

The 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: u32

The 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: u32

The 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.

Trait Implementations§

Source§

impl Debug for TransformOptions<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TransformOptions<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'r> !RefUnwindSafe for TransformOptions<'r>

§

impl<'r> !Send for TransformOptions<'r>

§

impl<'r> !Sync for TransformOptions<'r>

§

impl<'r> !UnwindSafe for TransformOptions<'r>

§

impl<'r> Forget for TransformOptions<'r>

§

impl<'r> Freeze for TransformOptions<'r>

§

impl<'r> Unpin for TransformOptions<'r>

§

impl<'r> UnsafeUnpin for TransformOptions<'r>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.