Perform comprehensive DOCX verification across three layers: OPC package, XSD schema, and semantic checks.

1. Usage

uniword verify FILE

2. Options

--verbose, -v

Show all issues including info-level findings.

--json

Output the verification report as JSON.

--yaml

Output the verification report as YAML.

--xsd

Enable XSD schema validation against bundled schemas. This is slower but more thorough.

3. Examples

Basic verification (OPC + semantic):

uniword verify document.docx

Enable XSD validation:

uniword verify document.docx --xsd

Machine-readable JSON output:

uniword verify document.docx --json

4. Three verification layers

Layer Checks Examples

OPC Package

ZIP integrity, content types, relationships, part presence

ZIP opens correctly, [Content_Types].xml is valid, document.xml exists

XSD Schema

XML schema validation using 40 bundled XSD files

Namespace-aware validation against ISO, ECMA, and Microsoft schemas

Word Document

Semantic checks for cross-references, styles, numbering

Undefined styles, orphaned numbering, missing footnote references

5. Built-in semantic rules

Category What it checks

Style references

Undefined or unused styles

Numbering

Missing or orphaned numbering definitions

Footnotes

footnotePr / footnotes.xml cross-reference, separator entries

Headers/footers

Missing reference targets

Bookmarks

Duplicate names, orphaned references

Images

Missing relationship targets, content type coverage

Tables

Missing or invalid table style references

Fonts

Empty font entries, missing font references

Theme

Missing theme part, incomplete color or font scheme

Settings

Missing or incomplete settings part

You can register custom rules with Uniword::Validation::Rules.register.

6. Exit codes

  • 0 — Document passed all checks

  • 1 — One or more issues found