Skip to content

feat: register WordprocessingML substitutions for omml types - #29

Open
ronaldtse wants to merge 1 commit into
mainfrom
fix/omml-register-substitution
Open

feat: register WordprocessingML substitutions for omml types#29
ronaldtse wants to merge 1 commit into
mainfrom
fix/omml-register-substitution

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

  • New OmmlIntegration module registers Uniword's WordprocessingML classes as substitutions for omml gem's minimal stubs via Register#register_global_type_substitution
  • Current substitution: Omml::Models::CTBr => Uniword::Wordprocessingml::Break
  • Architecture: omml owns the math schema, Uniword owns the WordprocessingML schema, register substitution is the integration point

Context

Per the architectural principle: omml defines its own minimal WordprocessingML classes (for standalone use); when used inside Uniword, register substitution replaces them with Uniword's richer equivalents. Single source of truth for WordprocessingML types.

Additional substitutions (CTRPr, CTFonts, etc.) can be added to the SUBSTITUTIONS hash as API compatibility is verified.

Test plan

  • omml gem: 280/280 round-trip tests pass
  • metanorma-iso: 9/9 math rendering specs pass
  • Rice DOCX opens correctly in Word (26 m:oMath, 4 m:oMathPara, 0 corruption)

OmmlIntegration module registers Uniword's WordprocessingML classes as
substitutions for omml gem's minimal stubs via Register#register_global_type_substitution.

Current substitutions:
- Omml::Models::CTBr => Uniword::Wordprocessingml::Break

This establishes the integration point architecture: omml owns the math
schema, Uniword owns the WordprocessingML schema, and the two meet through
register substitution rather than duplicate model definitions. Additional
substitutions (CTRPr, CTFonts, etc.) can be added to the SUBSTITUTIONS
hash as API compatibility is verified.
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