Skip to main content

Module xml

Module xml 

Source
Expand description

uor_addr::xml — the XML realization of UOR-ADDR (ARCHITECTURE.md “Format-specific realizations” § uor-addr-xml).

XML typed-input content-addressing under a subset of W3C Canonical XML 1.1 (XML-C14N 1.1), with the σ-projection bound to prism::crypto::Sha256Hasher.

§Authoritative sources

§Supported canonical-XML subset

Per ARCHITECTURE.md the typed-input shape XmlValue is a partition_coproduct! over five XML grammar cases (Element, Attribute, Text, CDATA, ProcessingInstruction). The shipped conformance subset implements the rules in XML-C14N 1.1 §1.1 that apply to structurally-typed XML — without external entities, DTDs, or namespace-prefix manipulation, which are out of scope for typed content-addressing:

  1. Elements are emitted as <name>...</name> with no namespace prefixes (the typed input shape does not carry namespace qualification).
  2. Attributes are emitted in lexicographic byte order by attribute name per XML-C14N 1.1 §1.1 rule 3.
  3. Attribute values are double-quoted; the value bytes are character-escaped per XML-C14N 1.1 §1.1 rule 4 (<&lt;, >&gt;, &&amp;, "&quot;, \t&#x9;, \n&#xA;, \r&#xD;).
  4. Text content is character-escaped per the C14N 1.1 §1.1 rule 5 (<&lt;, >&gt;, &&amp;, \r&#xD;).
  5. CDATA sections are expanded to text content before canonicalization (XML-C14N 1.1 §1.1 — CDATA is informationally equivalent to escaped text).
  6. Processing instructions are emitted as <?target data?>.

§Out-of-scope rules (documented deviations)

The shipped canonicalizer does not handle: namespace prefix rewriting (we don’t admit namespaced input), DTD-internal entity resolution (we don’t admit DTDs), xml: reserved attributes beyond the structural typing the parser enforces, and document whitespace outside element content (we admit only element content). These rules apply to deserialization from arbitrary XML 1.0 documents — out of scope for the typed-input pipeline. Conformance tests pin the supported subset; the deviation is documented in STANDARDS.md.

Re-exports§

pub use model::AddressModel;
pub use model::AddressModelBlake3;
pub use model::AddressModelKeccak256;
pub use model::AddressModelSha3_256;
pub use model::AddressModelSha512;
pub use model::AddressRoute;
pub use pipeline::address;
pub use pipeline::address_blake3;
pub use pipeline::address_keccak256;
pub use pipeline::address_sha3_256;
pub use pipeline::address_sha512;
pub use pipeline::AddressFailure;
pub use pipeline::AddressOutcome;
pub use pipeline::AddressWitness;
pub use pipeline::VerifyError;
pub use shapes::MAX_XML_DEPTH;
pub use value::canonicalize;
pub use value::XmlValue;
pub use verbs::address_inference;
pub use verbs::VERB_TERMS_ADDRESS_INFERENCE;
pub use crate::resolvers::AddressResolverTuple;

Modules§

model
xml::AddressModel* — the xml realization’s PrismModel declarations, one per admissible σ-axis (crate::hash). Each binds the shared AddressResolverTuple ψ-tower and the axis’s capacity profile (AddrBounds for the 32-byte axes, AddrBounds64 for sha512). AddressModel (sha256) is the default.
pipeline
xml::address — the XML realization’s public entry point.
shapes
Grammar constant for the XML realization. The capacity profile is the shared crate::bounds::AddrBounds; only the recursion stack-safety bound lives here.
value
XmlValue — the typed XML input handle (ADR-023 amended by ADR-060) with W3C Canonical XML 1.1 (subset) byte-output discipline.
verbs
XML realization’s ψ-chain content-address derivation verb (wiki ADR-024 + ADR-035 + ADR-036 + ARCHITECTURE.md “Common verb arena”).