Skip to main content

stream_split

Function stream_split 

Source
pub fn stream_split(
    source_path: &str,
    union_xpath: &str,
    naming: SplitNaming,
    destination: Option<&str>,
    spill_dir: &Path,
) -> Result<Option<StreamSplitOutcome>, String>
Expand description

Split a core-XML file into per-page spill files, streaming.

Returns Ok(None) when the union selected no pages (the “[not split]” case) — the caller should use the whole-DOM pipeline. Err means the stream could not be processed faithfully (malformed XML, unresolvable namespace shape, I/O failure); the caller decides whether to fall back.