Skip to main content

Module namespaces

Module namespaces 

Source
Expand description

WordprocessingML and related namespace / XName constants. WordprocessingML and related namespace / XName constants ported from PtOpenXmlUtil.ts (the subset the comparer references) — M1.7.

Each namespace is exposed as a unit struct with three associated items:

  • Ns::ns() returns the XNamespace for the URI;
  • Ns::name(local) returns an XName for local in that namespace;
  • Ns::URI is the namespace URI string (a const for switch arms).

The hottest element and attribute names — those hit on most documents during hash-cloning, finalize, and the LCS walks — are predefined on W and PT as OnceLock-cached methods (e.g. W::p, PT::unid). Anything else is reachable via Ns::name("local"), which still benefits from the thread-local intern pool.

Used by every code path that touches WML/DML/MC names: the comparer, edit pipeline, accept / reject, inspect, audit, markdown projection, revision_processor. CLI: these constants back every comparison the jubarte subcommands perform.

Structs§

A
DrawingML main (a:) — the shared shape / drawing element vocabulary.
A14
Microsoft drawing 2010 (a14:) — DrawingML shape extensions (line / fill / effect extras).
C
DrawingML chart (c:) — chart parts referenced from w:drawing / wp:inline / wp:anchor.
DGM
DrawingML diagram (dgm:) — SmartArt diagrams.
M
Office Math (m:) — equations embedded in a paragraph.
MC
Markup compatibility (mc:) — mc:AlternateContent, mc:Choice, mc:Fallback, mc:Ignorable, and the prefix-list attributes (Ignorable, PreserveAttributes, PreserveElements, ProcessContent, MustUnderstand, and the unqualified Requires on mc:Choice) that the serializer must rewrite when prefixes are rebound.
O
Microsoft office:o (VML / Office compatibility markup).
PT
PowerTools correlation namespace — pt:Unid, pt:SHA1Hash, pt:CorrelatedSHA1Hash, pt:StructureSHA1Hash, pt:Status, pt:UniqueId, pt:RunIds, and the Word-mode stamps pt:DefaultLine, pt:HasDefaultTableStyle. Attributes stamped on every comparison unit and read back to keep the LCS / move detection deterministic; stripped from the output before the package is written.
PTInsert
PowerTools ptOpenXml “Insert” namespace — used by the original DocumentBuilder to carry dataBinding / build traces.
R
Office relationships namespace (r:) — r:id references between parts (word/_rels/document.xml.rels).
VML
VML (v:) — legacy vector markup still used by text boxes, shapes, and some legacy drawings.
W
WordprocessingML (w:) — the main namespace for Word body, paragraph, run, table, and property elements and attributes. The hottest element and attribute constants are predefined on this struct (W::p, W::r, W::sect_pr, …) as OnceLock-cached methods.
W10
Microsoft office:word (w10:) — Word’s VML extensions (w10:wrap, w10:anchorlock), distinct from w14 / w15.
W14
Microsoft Word 2010 wordml (w14:) — paragraph / run extensions (e.g. w14:paraId, w14:textId) introduced in Word 2010.
W15
Microsoft Word 2012 wordml (w15:) — the Word 2013 extensions (w15:commentEx, w15:person, w15:dataBinding, …).
WNE
Microsoft wne: namespace — Word-specific extension attributes (notably used by w:noProof, w:dataBinding, and notification helpers).
WP
DrawingML wordprocessingDrawing (wp:) — drawing anchors and inlines inside a run; the parent namespace for inline and anchor wrapper elements.
WP14
Microsoft Word 2010 wordprocessingDrawing (wp14:) — drawing extensions co-namespaced with wp: for the 2010 wordprocessing surface.