pub struct XPathParserContext {
pub namespaces: Namespaces,
pub variable_names: VariableNames,
}
Fields§
§namespaces: Namespaces
§variable_names: VariableNames
Implementations§
Source§impl XPathParserContext
impl XPathParserContext
Sourcepub fn new(namespaces: Namespaces, variable_names: VariableNames) -> Self
pub fn new(namespaces: Namespaces, variable_names: VariableNames) -> Self
Construct a new XPath parser context.
This consists of information about namespaces and variable names available.
Sourcepub fn parse_xpath(&self, s: &str) -> Result<XPath, ParserError>
pub fn parse_xpath(&self, s: &str) -> Result<XPath, ParserError>
Given an XPath string, parse into an XPath AST
This uses the namespaces and variable names with which this static context has been initialized.
Sourcepub fn parse_pattern(&self, s: &str) -> Result<Pattern<ExprS>, ParserError>
pub fn parse_pattern(&self, s: &str) -> Result<Pattern<ExprS>, ParserError>
Given an XSLT pattern, parse into an AST
Sourcepub fn parse_value_template_xpath(&self, s: &str) -> Result<XPath, ParserError>
pub fn parse_value_template_xpath(&self, s: &str) -> Result<XPath, ParserError>
Parse an XPath string as it would appear in an XSLT value template.
This means it should have a closing }
following the xpath expression.
Trait Implementations§
Source§impl Debug for XPathParserContext
impl Debug for XPathParserContext
Source§impl Default for XPathParserContext
impl Default for XPathParserContext
Source§fn default() -> XPathParserContext
fn default() -> XPathParserContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for XPathParserContext
impl RefUnwindSafe for XPathParserContext
impl Send for XPathParserContext
impl Sync for XPathParserContext
impl Unpin for XPathParserContext
impl UnwindSafe for XPathParserContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more