Skip to content

serial: eliminate implicit xml namespace for exclusive c14n#5

Merged
jonwiggins merged 1 commit intojonwiggins:mainfrom
williamareynolds:wr/exc-c14n-ns
Apr 22, 2026
Merged

serial: eliminate implicit xml namespace for exclusive c14n#5
jonwiggins merged 1 commit intojonwiggins:mainfrom
williamareynolds:wr/exc-c14n-ns

Conversation

@williamareynolds
Copy link
Copy Markdown
Contributor

Summary

I was working on integrating xml oxide into a library I'm building at work. When running the Exclusive C14N tests
I was having issues with xmlns:xml being emitted in cannonicalized output. This change just prevents that being written out by seeding the namespace stack with the xml namespace.

Type of Change

  • Bug fix (corrects an existing issue)
  • New feature (adds new functionality)
  • Conformance fix (aligns behavior with the W3C spec or libxml2)
  • Refactoring (no functional change)
  • Documentation (docs, comments, examples)
  • CI / tooling (build scripts, workflows, hooks)

Spec Reference

To finish processing L, simply process every namespace node in L, except omit namespace node with local name xml, which defines the xml prefix, if its string value is http://www.w3.org/XML/1998/namespace.

And by extension:

The data model, processing, input parameters, and output data for Exclusive XML Canonicalization are the same as for Canonical XML...

Test Plan

  • Added unit tests
  • Added roundtrip test (parse -> serialize -> parse -> compare)
  • Added regression test for the bug being fixed
  • Verified against W3C Conformance Test Suite
  • Tested manually with xmllint

Checklist

  • Code is formatted (cargo fmt --all)
  • No clippy warnings (cargo clippy --all-targets --all-features -- -D warnings)
  • All tests pass (cargo test --all-features)
  • Documentation updated for any public API changes
  • Commit messages follow the <module>: <summary> convention
  • No new dependencies added (or discussed and approved in an issue)

@jonwiggins jonwiggins merged commit dc398aa into jonwiggins:main Apr 22, 2026
5 of 7 checks passed
@jonwiggins
Copy link
Copy Markdown
Owner

Thanks so much for the contribution, @williamareynolds! Clean fix — seeding the namespace stack with the implicit xml binding lets the existing dedup logic do all the work without any special-casing in the collectors. Spec citations and the subtree test case were especially appreciated. Merged!

@williamareynolds williamareynolds deleted the wr/exc-c14n-ns branch April 22, 2026 16:28
jonwiggins added a commit that referenced this pull request Apr 22, 2026
Bump to 0.4.2 and apply the hardened release workflow that was committed
as .github/release.yml.pending in PR #7 but couldn't be moved into
.github/workflows/ from a token without the workflow scope.

Release changes since 0.4.1:
- serial: eliminate implicit xml namespace for exclusive c14n (#5)
- ci: release workflow with per-platform xmllint binaries (#4, #7)
- release profile: strip = true for smaller binaries
- dependabot: weekly github-actions updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants