-
Notifications
You must be signed in to change notification settings - Fork 0
/
tei2pandoc.xslt
43 lines (34 loc) · 1.08 KB
/
tei2pandoc.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<xsl:stylesheet version = '1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="head">
# <xsl:value-of select="."/>
<xsl:text xml:space='preserve'>
</xsl:text>
</xsl:template>
<xsl:template match="argument">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="hi">
<xsl:choose>
<xsl:when test='@rend="antiqua"'>
*<xsl:value-of select="."/>*
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test='@rend="gesperrt"'>
**<xsl:value-of select="."/>**
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="note">^[<xsl:value-of select="."/>]
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="."/><xsl:text xml:space='preserve'>
</xsl:text>
</xsl:template>
<xsl:template match="@*|*|processing-instruction()|comment()" mode="recursive-copy">
<xsl:copy>
<xsl:apply-templates select="*|@*|text()|processing-instruction()|comment()" mode="recursive-copy"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>