Skip to content

feature: ooxml-inspector dev tool CLI and lib#815

Merged
harbournick merged 6 commits intodevelopfrom
feature/ooxml-spec-tool
Aug 27, 2025
Merged

feature: ooxml-inspector dev tool CLI and lib#815
harbournick merged 6 commits intodevelopfrom
feature/ooxml-spec-tool

Conversation

@harbournick
Copy link
Copy Markdown
Collaborator

@harbournick harbournick commented Aug 26, 2025

  • New package ooxml-spec-tool loads OOXML .xsd file definitions into a JSON schema
  • adds CLI tool for tag inspection
  • can be linked to SuperConverter for tag pre-processing, or SuperValidator for validation

OOXML Inspector

OOXML Inspector is a developer tool + library for working with Office Open XML (OOXML) schemas.
It bundles the transitional WordprocessingML schema into JSON and provides both:

  • a CLI (ooxml) for inspecting schema relationships, and
  • a JavaScript/TypeScript library for programmatic access.

Features

  • Query OOXML element children, attributes, and namespaces
  • Explore schema relationships and tag hierarchies
  • Use as a CLI or import as a library in Node.js/TypeScript

Installation

npm install @superdoc-dev/ooxml-inspector

CLI Usage

npx ooxml children w:p
npx ooxml tags --parents
npx ooxml namespaces
npx ooxml attrs w:p
  • children <prefix:local>: List allowed children for an element
  • tags [prefix] [--parents] [--plain]: List tags, optionally filtering by namespace or parent status
  • namespaces: List all namespaces in the schema
  • attrs <prefix:local>: List attributes for an element

Library Usage

import { childrenOf } from '@superdoc-dev/ooxml-inspector';

const children = childrenOf('w:p'); // Get children of <w:p>

Development

  • Build: npm run build
  • Test: npm run test
  • Coverage: npm run test:cov

License

AGPLv3

@harbournick harbournick self-assigned this Aug 26, 2025
Comment thread packages/ooxml-spec-tool/bin/children/schema.js Fixed
Comment thread packages/ooxml-spec-tool/coverage/sorter.js Fixed
@harbournick harbournick requested a review from Copilot August 26, 2025 16:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new ooxml-spec-tool package that loads OOXML .xsd file definitions into JSON schema format and provides a CLI tool for tag inspection. The package can be integrated with SuperConverter for tag pre-processing or SuperValidator for validation.

  • New package structure with OOXML schema definitions in XSD format
  • CLI tool implementation for tag inspection capabilities
  • JSON schema conversion functionality for OOXML specifications

Reviewed Changes

Copilot reviewed 23 out of 88 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vml-wordprocessingDrawing.xsd VML schema definitions for Word processing drawing elements including borders, wrapping, and anchoring
vml-spreadsheetDrawing.xsd VML schema for Excel spreadsheet drawing with client data and object types
vml-presentationDrawing.xsd Minimal VML schema for PowerPoint presentation drawing elements
vml-officeDrawing.xsd Comprehensive VML office drawing schema with shapes, fills, strokes, and visual effects
vml-main.xsd Core VML schema defining main shape elements, attributes, and type definitions
shared-relationshipReference.xsd Schema for relationship references between OOXML document parts
shared-math.xsd Mathematical expressions schema for OOXML documents
shared-documentPropertiesVariantTypes.xsd Variant data types for document properties
shared-documentPropertiesExtended.xsd Extended document properties schema
shared-documentPropertiesCustom.xsd Custom document properties schema
shared-customXmlSchemaProperties.xsd Schema for custom XML schema library properties
shared-customXmlDataProperties.xsd Schema for custom XML data properties
shared-commonSimpleTypes.xsd Common simple type definitions used across OOXML schemas
shared-bibliography.xsd Bibliography and citation schema definitions
shared-additionalCharacteristics.xsd Schema for additional document characteristics

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@harbournick harbournick force-pushed the feature/ooxml-spec-tool branch from b44e502 to 7d50751 Compare August 26, 2025 17:10
@harbournick harbournick changed the title feat: add new ooxml-spec-tool cli and lib feature: ooxml-inspector dev tool CLI and lib Aug 26, 2025
@harbournick harbournick marked this pull request as ready for review August 26, 2025 17:17
Comment thread packages/ooxml-inspector/generator/src/builder/collect-elements.js Outdated
@harbournick harbournick merged commit 0de3986 into develop Aug 27, 2025
7 checks passed
@harbournick harbournick deleted the feature/ooxml-spec-tool branch August 27, 2025 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants