DMN → HTML

Render each DMN decision table to an HTML fragment for a page, via dmn2html.xslt and dmn.css.

Skills it satisfies

A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.

dak-preprocessing

What each DAK pre-processing step does before the IG Publisher runs, which steps exist only to feed the Publisher’s page index, and how the phase runs as the overlay on fhir-harness’s AST cache refresh (dak-pre-export.sh). Also which files in a DAK repository are authored and which are generated, and the SEMVER rule for DAK and IG versions. Read before changing, assuming or moving a pre-processing step.

Source: smart-base/L3/skills/smart-l3/dak-preprocessing.md.

Also satisfied by: dak-config-from-sushi, dmn-to-questionnaire.

The skill declares no I/O contract (schemas/skills/dak-preprocessing/{input,output}.schema.json).

Inputs and outputs

Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.

porttyperequireddescriptionconstraint
indmnDirRepoPathyesstring · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
outhtmlRepoPathOne HTML fragment per decision table.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.

Processes and tasks

Steps this Tool can carry out, because each names a skill it satisfies:

processsteplanevia skill
SMART Guideline end to end4 · Create / adapt L2 DAK assetsAuthoring agentdak-preprocessing

How it is deployed and reached

  • Command line. From the repository root: python3 input/scripts/transform_dmn.py.
  • GitHub Actions. No workflow in this checkout runs its command.

As an API: its operation in the OpenAPI document and the MCP tool list of its layer.

installnone
runtimepython3
networkno
when to choose it
whenA reader needs to see a decision table as a table.
limitsIts output is HTML, which the JSON-only render contract (ig-render-jekyll) does not accept as a representation. Whether the just-the-docs pipeline gets a structured output from it or carries the HTML as an embedded asset is undecided.
costSeconds; needs lxml for the XSLT.

What it is made of

rolefile
scriptinput/scripts/transform_dmn.pynot in this checkout

Linked data

The Tool is published as its own JSON-LD document at its IRI, http://smart.who.int/base/tools/dmn-to-html.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.

{
  "@context": "http://smart.who.int/base/smart-base.context.jsonld",
  "@id": "http://smart.who.int/base/tools/dmn-to-html.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "http://smart.who.int/base/smart-base.jsonld",
  "name": "dmn-to-html",
  "title": "DMN → HTML",
  "description": "Render each DMN decision table to an HTML fragment for a page, via `dmn2html.xslt` and `dmn.css`.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "python3 input/scripts/transform_dmn.py"
  },
  "io": {
    "inputs": [
      {
        "name": "dmnDir",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "required": true
      }
    ],
    "outputs": [
      {
        "name": "html",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "One HTML fragment per decision table."
      }
    ]
  },
  "satisfies": [
    "dak-preprocessing"
  ],
  "requirements": {
    "runtime": [
      "python3"
    ],
    "network": false
  },
  "selection": {
    "when": "A reader needs to see a decision table as a table.",
    "limits": "Its output is HTML, which the JSON-only render contract (`ig-render-jekyll`) does not accept as a representation. Whether the just-the-docs pipeline gets a structured output from it or carries the HTML as an embedded asset is undecided.",
    "cost": "Seconds; needs `lxml` for the XSLT."
  }
}

folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev