Uniword uses native namespace support via lutaml-model v0.7+ XmlNamespace classes, providing 100% coverage of all 22 OOXML namespaces with 760 modeled elements.
1. Namespace Definition
Each namespace is defined as a Ruby class that inherits from Lutaml::Model::XmlNamespace:
module Namespaces
class WordProcessingML < Lutaml::Model::XmlNamespace
uri 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'
prefix_default 'w'
element_form_default :qualified
end
end
Namespaces are then referenced in model classes:
class Document < Lutaml::Model::Serializable
xml do
root 'document'
namespace Namespaces::WordProcessingML
map_element 'body', to: :body
end
attribute :body, Body
end
2. Supported Namespaces
| Prefix | Elements | Version | Description |
|---|---|---|---|
|
100 |
v2.0 |
WordProcessingML — main document content (paragraphs, runs, tables) |
|
65 |
v2.0 |
Office Math Markup Language — equations and formulas |
|
92 |
v2.0 |
DrawingML Main — graphics, effects, colors, fills |
|
10 |
v2.0 |
Picture — embedded images and image properties |
|
5 |
v2.0 |
Relationships — document part relationships and references |
|
27 |
v2.0 |
DrawingML WordProcessing Drawing — image positioning |
|
3 |
v2.0 |
Content Types — MIME type definitions for package parts |
|
15 |
v2.0 |
VML — legacy vector graphics for backward compatibility |
|
40 |
v2.0 |
Office — shared properties for legacy formats |
|
25 |
v2.0 |
VML Office extensions — additional legacy drawing properties |
|
20 |
v2.0 |
Document Properties — core and app metadata |
|
25 |
v2.0 |
Word 2010 Extended — enhanced controls, text effects |
|
20 |
v2.0 |
Word 2013 Extended — collaboration and comments |
|
15 |
v2.0 |
Word 2016 Extended — accessibility, modern formatting |
|
83 |
v2.0 |
SpreadsheetML — Excel integration elements |
|
70 |
v2.0 |
Chart — charts and graph elements |
|
50 |
v2.0 |
PresentationML — PowerPoint integration elements |
|
29 |
v2.0 |
Custom XML — structured data integration |
|
24 |
v2.0 |
Bibliography — citation management |
|
19 |
v2.0 |
Glossary — building blocks and AutoText |
|
15 |
v2.0 |
Shared Types — common type definitions |
|
10 |
v2.0 |
Document Variables — variable substitution |
Total: 760/760 elements complete (100%)