Skip to main content

Module embedded

Module embedded 

Source
Expand description

Embedded RelaxNG schema tree — bundled at compile time so a single-binary distribution can serve compiled .model files and .rng schemas without an accompanying resources/RelaxNG/ tree on disk.

The manifest is generated by latexml_core/build.rs, which walks resources/RelaxNG/ and emits a static &[(relative_path, file_content)] array. Consumers call lookup with a tree-relative path and feed the returned &'static str straight into whatever parser needs it:

  • .model files (compiled tag/attr/content schema) → fed to Model::load_compiled_schema_str as text.
  • .rng files → fed to libxml::parser::Parser::parse_string in super::scan::scan_external, where <rng:include> recursion is handled at the Rust scanner level (each include re-enters scan_external and re-hits the lookup table).

Nothing is materialised to disk — the prebuilt binary runs every schema-driven feature (--validate, --schemadocs, the always-on .model lookup at startup) directly from .rodata.

Statics§

FILES

Functions§

lookup
Look up the embedded RelaxNG bytes by their tree-relative path (e.g. "LaTeXML.model", "LaTeXML-common.rng", or "svg/svg11.rng"). Returns None if the name isn’t in the generated manifest.