Skip to main content

validate_prefixes

Function validate_prefixes 

Source
pub fn validate_prefixes(
    expr: &Expr,
    bindings: &dyn XPathBindings,
) -> Result<(), XmlError>
Expand description

Walk the expression AST checking that every namespace prefix used in a name test (prefix:local, prefix:*) resolves through the supplied bindings. Surfaces an XPathEvalError for the first unbound prefix encountered, matching libxml2’s XPATH_UNDEF_PREFIX_ERROR.

Function-name prefixes are validated at dispatch time inside eval_function; variable prefixes are not (variables are stored as raw names and looked up verbatim).