Skip to content

serial: eliminate implicit xml namespace for exclusive c14n#5

Open
williamareynolds wants to merge 1 commit intojonwiggins:mainfrom
williamareynolds:wr/exc-c14n-ns
Open

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

Conversation

@williamareynolds
Copy link
Copy Markdown

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)

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.

1 participant