xslt

Convert XML files using XML Stylesheets (XSLT) transformations to a specified schema

Command line usage

/*^babelfsh
xslt
   --xml XML --xslt XSLT [--dont-filter-duplicate-codes]
   [--dont-merge-duplicate-codes-by-designation]
   [--dont-rewrite-html-to-markdown]
   [--filter-concepts-without-display-and-designations] [--help]
^babelfsh*/

Command line argument reference

Argument name
Description

--xml XML

Required

The relative path to the XML file to be converted

--xslt XSLT

Required

The relative path to the XSLT file for converting to the target schema

--dont-filter-duplicate-codes

--filter-duplicate-codes

Filter out codes with duplicate codes

--dont-merge-duplicate-codes-by-designation

--merge-duplicate-codes-by-designation

Merge duplicate codes (their designations)

--dont-rewrite-html-to-markdown

--rewrite-html-to-markdown

Rewrite HTMl in string fields to Markdown, default false

--filter-concepts-without-display-and-designations

--dont-filter-concepts

Filter out concepts that have neither display nor designation, default false

--help

-h

show this help message and exit

BabelFSH XML Schema

The XML schema for the XSLT transformations' output is defined in an XSD file available in the repo. Here's an annotated snapshot:

Example XSLT file

An example XSLT file is available in the resources for the ORPHAcodes nomenclature. That plugin utilizes the XSLT plugin to then post-process the results of the transformation, so that is a suitable example. Note, however, that the XSLT for ORPHAcodes uses two xsl:param parameters that are provided when the stylesheet is executed, which at this point in time is not implemented for the core XSLT plugin. Nevertheless, the XSLT file should illustrate the output format nicely.

Last updated