For a small project, I needed to convert German laws, found at https://www.gesetze-im-internet.de/, from XML format to text format.

The XML format is described here and is defined by this DTD file.

The source code in the following XSL file is pretty straight-forward. Only adding newlines and indenting definition lists posed an additional challenge.