Skip to content

Viewer and version comparison (from #2 and #3) - #4

Merged
MathiasVDA merged 5 commits into
mainfrom
viewer-and-diff
Oct 21, 2026
Merged

MathiasVDA merged 5 commits into
mainfrom
viewer-and-diff

Conversation

@MathiasVDA

Copy link
Copy Markdown
Contributor

Requested by Mathias · project thread

PRs #2 and #3 were merged into their stacked base branches (xsd-model and viewer-mvp) instead of main, so their changes never reached main. This PR brings them over: the same four commits rebased onto current main, with the already-merged step 1 commits dropped. The content matches viewer-mvp exactly.


Generated by Claude Code

The web viewer reads XSD sets indexed by the core: dropped files and
folders are indexed in a WebAssembly worker, bundles open by URL
(?bundle=, &sources= for the source view), and the CLI serves the
embedded viewer with a pre-built bundle and the source files.

- Sidebar with virtualised lists of complex and simple types, global
  elements, groups and files, a namespace filter, and search over names
  and documentation.
- Pages for complex types, elements (global and local), simple types,
  groups, attribute groups, attributes, identity constraints and files:
  derivation chain, effective content model with inherited rows grouped
  and foldable, attributes, facets and enumerations, where used, and
  the component's XSD cut from its file with linked type names.
- UML-like class diagrams laid out by ELK in a worker (extension,
  restriction, composition with multiplicities, enumeration boxes),
  expandable, with depth/direction options, full screen and SVG, PNG,
  PlantUML and Mermaid export; content-model trees in the style of XML
  editors, expanded on demand; an overview map per namespace or folder.
- Share links restore page, tab, diagram options, expanded boxes, open
  tree nodes and zoom; light and dark themes; a short manual.
- core: expand() restores what the compact form leaves out; the wasm
  module exposes it for compact bundles.
- Pages: an examples catalog with NeTEx only, cloned and pre-indexed at
  build time (scripts/build-examples.sh).
build-examples.sh fetches each schema set from its publisher's pinned URL
(cached in tests/fixtures/downloads, restored by actions/cache in pages.yml),
pre-indexes it with the CLI and writes a catalog entry with version and
source link. An example whose download fails is left out with a warning.
The example cards show the version and link to the source. Attribution and
reuse terms (ERA, OASIS IPR Policy, W3C Document License) are in the README
and third-party notices.
diff(old, new) matches global components by qualified name, falling back
to kind and local name when the target namespace changed, and reports
fine-grained changes with their impact (breaking, non-breaking, info),
possible renames and summaries per kind, namespace and file. The CLI's
diff command writes the diff as JSON, Markdown or HTML.
Two schema sets can be loaded side by side (two drop zones on the open
page, or ?bundle=<new>&compare=<old>). The changes overview has counts per
kind, namespace and file, a filterable list kept in the link and Markdown,
HTML and JSON downloads; each changed component gets a page with both
versions side by side. Diagrams and content trees mark added (+, green),
removed (−, red, struck through) and changed (~, amber) boxes, lines and
arrows, in both themes.
@MathiasVDA MathiasVDA self-assigned this Oct 21, 2026
@MathiasVDA
MathiasVDA merged commit 3e964c7 into main Oct 21, 2026
6 checks passed
@MathiasVDA
MathiasVDA deleted the viewer-and-diff branch October 21, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant