Skip to main content

dispatch

Function dispatch 

Source
pub fn dispatch<I: DocIndexLike>(
    ns_uri: &str,
    name: &str,
    args: Vec<Value>,
    idx: &I,
) -> Option<Result<Value, XmlError>>
Expand description

Dispatch an XPath function call to the matching EXSLT family. Returns Some(result) when ns_uri matches one of the EXSLT namespace URIs and the family recognises name; otherwise None, so the caller can fall through to its own table or surface “unregistered function.”

Generic over the doc index because some EXSLT functions (e.g. set:distinct, str:tokenize when given a nodeset) need to read string-values of nodes.