blob: 697c1080f58e5670ef38e6f9c1cfb8ffc7e459d1 [file] [log] [blame]
Marc Kupietz28f48e12024-04-14 16:17:05 +02001<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 Kupietz164a2832024-04-14 21:00:48 +020012 <xsl:template match="p[not(normalize-space())]" priority="1.0"/>
Marc Kupietz28f48e12024-04-14 16:17:05 +020013
Marc Kupietz164a2832024-04-14 21:00:48 +020014 <xsl:template match="div[not(normalize-space())]" priority="1.0"/>
15
16 <xsl:template match="p[descendant::div|descendant::p]" priority="0.9">
Marc Kupietz28f48e12024-04-14 16:17:05 +020017 <div type="section">
18 <xsl:apply-templates/>
19 </div>
20 </xsl:template>
21
Marc Kupietz164a2832024-04-14 21:00:48 +020022 <xsl:template match="(ref|emph|hi|text())[parent::div]" priority="0.9">
Marc Kupietz28f48e12024-04-14 16:17:05 +020023 <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 Kupietz8d293632024-04-15 06:54:26 +020040 <xsl:template match="p[normalize-space(.) = '&#160;']"/>
41
Marc Kupietz28f48e12024-04-14 16:17:05 +020042</xsl:stylesheet>