Skip to main content

StaticContext

Trait StaticContext 

Source
pub trait StaticContext {
    // Required methods
    fn variable(&self, name: &QName) -> Option<VariableInfo>;
    fn function(&self, name: &QName, arity: usize) -> Option<FunctionId>;
    fn xslt_functions(&self) -> bool;
    fn namespace_uri(&self, prefix: &str) -> Option<String>;
}
Expand description

The static context of an expression (XPath 2.0 section 2.1.1), as far as the compiler needs it: names are already resolved by the parser.

Required Methods§

Source

fn variable(&self, name: &QName) -> Option<VariableInfo>

The variable of that expanded name in scope, if any.

Source

fn function(&self, name: &QName, arity: usize) -> Option<FunctionId>

The host function of that expanded name and arity, if any.

Source

fn xslt_functions(&self) -> bool

Whether the XSLT functions current(), document() and system-property() are available.

Source

fn namespace_uri(&self, prefix: &str) -> Option<String>

The namespace bound to a prefix, for the QName argument of system-property().

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§