uor_addr/xml/shapes/bounds.rs
1//! XML realization grammar constant.
2//!
3//! ADR-060 removed the fixed-buffer capacity profile (`XmlAddrBounds`)
4//! and every byte/count ceiling it implied (`XML_VALUE_MAX_BYTES`,
5//! `MAX_XML_TEXT_BYTES`, `MAX_XML_ATTRIBUTES`,
6//! `MAX_XML_ELEMENT_NAME_BYTES`). Element names, attribute values, text
7//! runs, attribute counts, and child counts are now unbounded — the
8//! canonicalizer materializes the canonical form in an `alloc` buffer and
9//! the input flows through the pipeline as a borrowed carrier.
10//!
11//! The single remaining bound is a **native-stack-overflow guard** for
12//! the recursive-descent parser/canonicalizer: a maximally-nested
13//! document would otherwise exhaust the call stack. This is a safety
14//! bound on recursion, not a capacity ceiling on content.
15
16/// Maximum element nesting depth the recursive-descent canonicalizer
17/// will descend before reporting a depth-bound violation. Guards the
18/// native call stack against pathologically-nested input (e.g. the
19/// "billion laughs"-style deep-nesting denial of service); it is not a
20/// ceiling on document size, element count, or content width.
21pub const MAX_XML_DEPTH: usize = 1024;