OIML X 999:2026 — the OIML profile of NISO STS, defining how OIML publications (R/B/D/G/E) are encoded in NISO STS.
bundle install
bundle exec metanorma compile sources/sts-guidelines/document.adocOutputs (in sources/sts-guidelines/): document.xml,
document.presentation.xml, document.pdf, document.rxl.
The :mn-document-class: oiml flavor is provided by the released
metanorma-taste gem (a metanorma-core dependency), so the document
compiles with the standard Metanorma toolchain — no unreleased gems needed.
The HTML for the site is generated from the presentation XML with the
metanorma-document typed-model renderer (not the isodoc HTML).
metanorma-document >= 0.2.11 is required (earlier releases render an empty
body). It runs on the pubid 2.0 / relaton prerelease line, which cannot
share a bundle with the released metanorma-cli stack (metanorma-standoc pins
relaton-cli ~> 2.1.0, and RubyGems never satisfies a non-prerelease
requirement with a prerelease version) — so it has its own Gemfile,
Gemfile.renderer (used by CI the same way):
git clone --depth 1 https://github.com/metanorma/metanorma-oiml vendor/metanorma-oiml
BUNDLE_GEMFILE=Gemfile.renderer bundle install
BUNDLE_GEMFILE=Gemfile.renderer bundle exec ruby -e \
'require "metanorma/document"; doc = Metanorma::OimlDocument::Root.from_xml(File.read(ARGV[0])); File.write(ARGV[1], Metanorma::Html::Generator.generate(doc))' \
sources/sts-guidelines/document.presentation.xml sources/sts-guidelines/document.htmlThe metanorma-oiml gem provides a converter that transforms OIML
Metanorma presentation XML into OIML NISO STS XML.
require "metanorma/oiml/sts"
# Convert presentation XML string to STS XML
sts_xml = Metanorma::Oiml::Sts.convert(presentation_xml_string)
# Render STS XML to HTML (Liquid-based, OIML-branded, self-contained)
sts_html = Metanorma::Oiml::Sts::HtmlRenderer.render(sts_xml)# From metanorma-oiml gem
oiml-sts convert sources/sts-guidelines/document.presentation.xml output.sts.xml
# Add --validate to check the OIML X 999 Clause 6 rulesThe Liquid renderer converts STS XML to a self-contained branded HTML
page (inline CSS and logo, no external assets). Templates and the
stylesheet can be overridden without code changes:
HtmlRenderer::Ruby.new(templates_dir:, assets_dir:).