Skip to main content

scan_external

Function scan_external 

Source
pub fn scan_external(
    rng: &mut Relaxng,
    name: &str,
    inherit_ns: Option<&str>,
    search_paths: &[&Path],
) -> Result<Vec<Pattern>, ScanError>
Expand description

Locate, parse, and scan a single RelaxNG schema file.

Wraps the result in Pattern::Module whose name is the file’s basename without extension — matches scanExternal in Perl.

Tries the disk-side find_file first (developer overrides, system installs); if nothing is on the searchpath, falls through to the compile-time embedded RelaxNG table and parses those bytes directly via XmlParser::parse_string. No filesystem extraction is involved on the embed branch — the prebuilt binary can run --validate / --schemadocs against in-.rodata schemas.