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>;
// Provided method
fn function_type(&self, id: FunctionId) -> ValueType { ... }
}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§
Sourcefn variable(&self, name: &QName) -> Option<VariableInfo>
fn variable(&self, name: &QName) -> Option<VariableInfo>
The variable of that expanded name in scope, if any.
Sourcefn function(&self, name: &QName, arity: usize) -> Option<FunctionId>
fn function(&self, name: &QName, arity: usize) -> Option<FunctionId>
The host function of that expanded name and arity, if any.
Sourcefn xslt_functions(&self) -> bool
fn xslt_functions(&self) -> bool
Whether the XSLT functions current(), document() and system-property() are
available.
Sourcefn namespace_uri(&self, prefix: &str) -> Option<String>
fn namespace_uri(&self, prefix: &str) -> Option<String>
The namespace bound to a prefix, for the QName argument of system-property().
Provided Methods§
Sourcefn function_type(&self, id: FunctionId) -> ValueType
fn function_type(&self, id: FunctionId) -> ValueType
The static type of what a host function returns, once its call is type-checked:
ValueType::declared with the declared result type of an xsl:function. By
default, nothing is known.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".