Assert MathML namespace survives in opaque-stem Sanitizer test - #118
Merged
andrew2net merged 1 commit intoJun 26, 2026
Merged
Conversation
The opaque-stem test fed <math xmlns=...> but never asserted the xmlns survived. Add that assertion: basicdoc-models#35 requires MathML to round-trip "namespace and all". lutaml-model 0.8.16 preserves it (XML + key-value); this guards the Sanitizer half and tripwires a revert of the opaque-stem handling (#116/#117). Refs #116 Refs metanorma/basicdoc-models#35
andrew2net
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #116
Refs metanorma/basicdoc-models#35
The opaque-stem Sanitizer test (#117) already fed a namespaced
<math xmlns="http://www.w3.org/1998/Math/MathML">, but only asserted the inner elements survived — not the namespace itself. basicdoc-models#35 makes MathML an explicit, namespaced grammar, so thexmlnssurviving the round-trip is the actual requirement ("namespace and all").This adds the missing assertion. Verified separately that lutaml-model 0.8.16 preserves the
xmlnsthroughmap_all rawin both XML and key-value round-trips, so the model half needs no change — this guards the Sanitizer half, and would fail loudly if the opaque-stem handling (#116/#117) were reverted.🤖