pub enum SchematronEvalError {
Parse(ParseError),
Eval(EvalError),
ContextNotNodeSet {
context: String,
},
UnknownPhase {
phase: String,
},
}Expand description
An error evaluating a Schema against a document.
Distinct from xpath_eval::EvalError (note the different name) so
callers can use both without a collision. Wraps both failure modes
xpath-eval can produce — a context/test string that is not
syntactically valid XPath (SchematronEvalError::Parse), and a
well-formed expression that fails at evaluation time
(SchematronEvalError::Eval) — plus one failure mode specific to
this crate’s context-as-path-selection simplification: a context
expression that parses but does not evaluate to a node-set
(SchematronEvalError::ContextNotNodeSet).
Variants§
Parse(ParseError)
A context or test expression failed to parse as XPath.
Eval(EvalError)
A well-formed expression failed at evaluation time.
ContextNotNodeSet
A rule’s context, once evaluated as descendant-or-self::node()/
prefixed onto the raw context string, did not evaluate to a
node-set (e.g. it evaluated to a number or string instead) —
context must be a location-path/node-set expression.
UnknownPhase
evaluate_with_phase was called with a phase_id that does not
match any Schema.phases[_].id (or Schema.default_phase names
such an unknown phase).
Trait Implementations§
Source§impl Clone for SchematronEvalError
impl Clone for SchematronEvalError
Source§fn clone(&self) -> SchematronEvalError
fn clone(&self) -> SchematronEvalError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SchematronEvalError
impl Debug for SchematronEvalError
Source§impl Display for SchematronEvalError
impl Display for SchematronEvalError
Source§impl Error for SchematronEvalError
impl Error for SchematronEvalError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()