| Marc Kupietz | 28f48e1 | 2024-04-14 16:17:05 +0200 | [diff] [blame] | 1 | <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 2 | xmlns:saxon="http://saxon.sf.net/" |
| 3 | exclude-result-prefixes="saxon"> |
| 4 | |
| 5 | <xsl:output method="xml" indent="yes" saxon:line-length="1000" |
| 6 | doctype-public="-//IDS//DTD IDS-I5 1.0//EN" |
| 7 | doctype-system="http://corpora.ids-mannheim.de/I5/DTD/i5.dtd" |
| 8 | /> |
| 9 | |
| 10 | <xsl:mode on-no-match="shallow-copy"/> |
| 11 | |
| Marc Kupietz | 164a283 | 2024-04-14 21:00:48 +0200 | [diff] [blame] | 12 | <xsl:template match="p[not(normalize-space())]" priority="1.0"/> |
| Marc Kupietz | 28f48e1 | 2024-04-14 16:17:05 +0200 | [diff] [blame] | 13 | |
| Marc Kupietz | 164a283 | 2024-04-14 21:00:48 +0200 | [diff] [blame] | 14 | <xsl:template match="div[not(normalize-space())]" priority="1.0"/> |
| 15 | |
| 16 | <xsl:template match="p[descendant::div|descendant::p]" priority="0.9"> |
| Marc Kupietz | 28f48e1 | 2024-04-14 16:17:05 +0200 | [diff] [blame] | 17 | <div type="section"> |
| 18 | <xsl:apply-templates/> |
| 19 | </div> |
| 20 | </xsl:template> |
| 21 | |
| Marc Kupietz | 164a283 | 2024-04-14 21:00:48 +0200 | [diff] [blame] | 22 | <xsl:template match="(ref|emph|hi|text())[parent::div]" priority="0.9"> |
| Marc Kupietz | 28f48e1 | 2024-04-14 16:17:05 +0200 | [diff] [blame] | 23 | <p> |
| 24 | <xsl:apply-templates/> |
| 25 | </p> |
| 26 | </xsl:template> |
| 27 | |
| 28 | <xsl:template match="head[parent::p]"> |
| 29 | <hi rend="bold"> |
| 30 | <xsl:value-of select="."/> |
| 31 | </hi> |
| 32 | </xsl:template> |
| 33 | |
| 34 | <xsl:template match="hi[parent::div]"> |
| 35 | <p> |
| 36 | <xsl:apply-templates/> |
| 37 | </p> |
| 38 | </xsl:template> |
| 39 | |
| Marc Kupietz | 8d29363 | 2024-04-15 06:54:26 +0200 | [diff] [blame^] | 40 | <xsl:template match="p[normalize-space(.) = ' ']"/> |
| 41 | |
| Marc Kupietz | 28f48e1 | 2024-04-14 16:17:05 +0200 | [diff] [blame] | 42 | </xsl:stylesheet> |