Skip to main content

Module value

Module value 

Source
Expand description

XmlValue — the typed XML input handle (ADR-023 amended by ADR-060) with W3C Canonical XML 1.1 (subset) byte-output discipline.

See crate::xml for the supported subset and deviations from full XML-C14N 1.1.

§ADR-060 carrier model

XML canonicalization is not a streaming transform: XML-C14N 1.1 §1.1 rule 3 sorts each element’s attributes lexicographically, and well-formedness checking matches nested close tags — both inherently need storage proportional to the element / nesting size. The realization therefore materializes the canonical form once, in an alloc buffer (canonicalize), with no width or count ceilings: element names, attribute values, text runs, attribute counts, and child counts are unbounded. The handle then flows through the pipeline as a zero-copy [TermValue::Borrowed] carrier over those canonical bytes, and ψ₉ folds them through the σ-axis.

The single bound retained is MAX_XML_DEPTH — a native-stack overflow guard on the recursive-descent canonicalizer, not a content ceiling.

Structs§

XmlValue
Typed XML input handle (ADR-060 borrowed carrier). A thin, Copy borrow of canonical-XML bytes produced by canonicalize; as_binding_value returns the Borrowed carrier zero-copy.

Functions§

canonicalize
Parse + canonicalize per the W3C XML-C14N 1.1 subset documented in crate::xml. Single recursive-descent pass over raw that emits the canonical form directly — no fixed buffer, no width/count caps.