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

w:

100

v2.0

WordProcessingML — main document content (paragraphs, runs, tables)

m:

65

v2.0

Office Math Markup Language — equations and formulas

a:

92

v2.0

DrawingML Main — graphics, effects, colors, fills

pic:

10

v2.0

Picture — embedded images and image properties

r:

5

v2.0

Relationships — document part relationships and references

wp:

27

v2.0

DrawingML WordProcessing Drawing — image positioning

ct:

3

v2.0

Content Types — MIME type definitions for package parts

v:

15

v2.0

VML — legacy vector graphics for backward compatibility

o:

40

v2.0

Office — shared properties for legacy formats

v:o:

25

v2.0

VML Office extensions — additional legacy drawing properties

dp:

20

v2.0

Document Properties — core and app metadata

w14:

25

v2.0

Word 2010 Extended — enhanced controls, text effects

w15:

20

v2.0

Word 2013 Extended — collaboration and comments

w16:

15

v2.0

Word 2016 Extended — accessibility, modern formatting

xls:

83

v2.0

SpreadsheetML — Excel integration elements

c:

70

v2.0

Chart — charts and graph elements

p:

50

v2.0

PresentationML — PowerPoint integration elements

cxml:

29

v2.0

Custom XML — structured data integration

b:

24

v2.0

Bibliography — citation management

g:

19

v2.0

Glossary — building blocks and AutoText

st:

15

v2.0

Shared Types — common type definitions

dv:

10

v2.0

Document Variables — variable substitution

Total: 760/760 elements complete (100%)

3. Namespace Groups

The namespaces fall into several functional groups:

Document content

w:, r:, ct:, dp:

Graphics and drawing

a:, pic:, wp:, v:, o:, v:o:

Math

m:

Office interoperability

xls:, c:, p:

Word extensions

w14:, w15:, w16:

Data and metadata

cxml:, b:, g:, st:, dv:

4. Usage in Generated Classes

All 760 elements across these namespaces are generated as lutaml-model classes from YAML schemas. Each class uses the appropriate namespace definition for correct XML serialization and deserialization.