Summary
Implement W3C C14N spec requirements for document subsets:
-
xml: attribute inheritance (G001)* — When Inclusive C14N processes a document subset and an element's parent is NOT in the node set, inheritable xml:* attributes from ancestor elements are propagated to the topmost included element per W3C C14N §2.4:
- C14N 1.0:
xml:lang, xml:space, xml:base
- C14N 1.1: adds
xml:id to the above
- Exclusive C14N omits this inheritance entirely per Exc-C14N §3
-
C14N 1.1 mode enabled (P1-007) — Previously returned UnsupportedAlgorithm. Now routes to inclusive renderer with xml:id propagation and xml:base URI resolution
-
xml:base URI fixup (G004) — C14N 1.1 resolves relative xml:base URIs in document subsets via RFC 3986 §5. The effective URI is absolute only if the ancestor chain includes a scheme-bearing base; otherwise it may remain relative. Both inherited and own xml:base values are resolved against the effective ancestor chain
Test Plan
- 9 unit tests for xml:* inheritance (serialize.rs) — including no-inheritance-past-included-ancestor
- 5 unit tests for C14N 1.1 mode (mod.rs)
- 27 unit tests for RFC 3986 URI resolver (xml_base.rs) — including schemeless base, file: scheme, empty xml:base
- 9 integration tests for C14N 1.1 + xml:base fixup (c14n_integration.rs)
- All 148 tests pass, clippy clean
Summary
Implement W3C C14N spec requirements for document subsets:
xml: attribute inheritance (G001)* — When Inclusive C14N processes a document subset and an element's parent is NOT in the node set, inheritable
xml:*attributes from ancestor elements are propagated to the topmost included element per W3C C14N §2.4:xml:lang,xml:space,xml:basexml:idto the aboveC14N 1.1 mode enabled (P1-007) — Previously returned
UnsupportedAlgorithm. Now routes to inclusive renderer with xml:id propagation and xml:base URI resolutionxml:base URI fixup (G004) — C14N 1.1 resolves relative
xml:baseURIs in document subsets via RFC 3986 §5. The effective URI is absolute only if the ancestor chain includes a scheme-bearing base; otherwise it may remain relative. Both inherited and ownxml:basevalues are resolved against the effective ancestor chainTest Plan