0.0
The project is in a healthy, maintained state
The moxml model's committed answers as a certifiable test suite. Engines implement the certification facade (parse, serialize, canonicalize, XSD validation, and the pure-logic decision faces) and run the seven-family dataset - builtin lexical spaces, XSD pattern translation, namespace wildcards, the entity registry, serialization shapes, C14N vectors, and XSD structural validation. Any engine can certify against the model.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 0.6
~> 1.18
~> 13
~> 3.13
 Project Readme

moxml-testsuite

Gem Version

The moxml conformance test suite: certify any XML engine against the moxml model.

The moxml processing model (https://github.com/lutaml/moxml — docs/_references/processing-model.adoc) is a set of committed answers: one object model, one document order, one serialization shape, one canonicalization, one validation verdict — for every question an XML program can ask. The moxml conformance dataset (schema 5, 177 cases across seven families) IS those answers as data, and this gem is the runner that drives any engine through them.

The seven families

Family Cases Facade faces

builtin_lexical

81

lexical_valid?(type_name, lexical)

xsd_regex_translation

21

regex_translates?(pattern)

schema_wildcards

24

wildcard_covers?(…​), wildcard_exclusion?(…​)

entity_registry

11

entity_declared?(…​) and the registry faces

serialization

20

parse(xml), serialize(doc)

c14n

14

canonicalize(doc)

xsd_structural

6

validate_xsd(schema, instance)

Certifying an engine

The quick path is the CLI:

$ moxml-testsuite
moxml-testsuite (facade: Moxml::TestSuite::Reference)
  PASS decisions (126 cases)
  PASS entity_registry (11 cases)
  PASS serialization (20 cases)
  PASS c14n (14 cases)
  PASS xsd_structural (6 cases)

$ moxml-testsuite --adapter leptris
$ moxml-testsuite --families c14n,serialization

The exit code mirrors the verdict (0 certified, 1 failed, 2 unusable adapter), so it drops straight into CI.

The library path - any object implementing the certification protocol can be certified:

require "moxml/testsuite"

report = Moxml::TestSuite.run(Moxml::TestSuite::Reference.new)
puts report
report.passed? # => true

Reference implements the whole protocol on moxml itself — pin the engine when the host carries several:

Moxml::TestSuite::Reference.new(adapter: :leptris)
Moxml::TestSuite::Reference.new(adapter: :nokogiri)

A facade that cannot answer a family’s faces sees that family SKIP — loudly, in the report — never a quiet pass. A facade that answers against the dataset FAILs with the offending case named.

The one-directional contract

The model’s degradation is one-directional: an engine that cannot evaluate a construct stays silent (under-report); it never produces a different answer. The suite pins that too — unevaluatable rows expect under-reporting, and "answered wrong" and "answered differently per engine" are both failures. Equivalence is to the model, not merely engine-to-engine.

Provenance

The dataset is generated from the moxml suite (rake conformance:export in lutaml/moxml) and consumed by the cross-language runners: moxml-rs (Rust) and moxml-ts (TypeScript). schema 5 is the row-shape version; generator names the producing moxml release.

Development

bundle install
bundle exec rake