blob: dbc72810eba42f223df1a77897e8130ffa53ea08 (
plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" encoding="UTF-8" />
<xsl:include href="util.xsl"/>
<!-- Convert endnote style definitions declarations to html tags -->
<!-- TODO: <author>Editors,</author> bzw <author>Editor,</author> -->
<xsl:template match="style" name="style">
<xsl:param name="oldface" select="@face"/>
<xsl:param name="exclude" select="''" />
<xsl:variable name="face">
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="$oldface" />
<xsl:with-param name="replace" select="$exclude" />
<xsl:with-param name="by" select="''" />
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="contains($face, 'subscript')">
<sub>
<xsl:call-template name="style">
<xsl:with-param name="oldface" select="$face"/>
<xsl:with-param name="exclude" select="'subscript'"/>
</xsl:call-template>
</sub>
</xsl:when>
<xsl:when test="contains($face, 'superscript')">
<sub>
<xsl:call-template name="style">
<xsl:with-param name="oldface" select="$face"/>
<xsl:with-param name="exclude" select="'superscript'"/>
</xsl:call-template>
</sub>
</xsl:when>
<xsl:when test="contains($face, 'italic')">
<em>
<xsl:call-template name="style">
<xsl:with-param name="oldface" select="$face"/>
<xsl:with-param name="exclude" select="'italic'"/>
</xsl:call-template>
</em>
</xsl:when>
<xsl:when test="contains($face, 'boldface')">
<strong>
<xsl:call-template name="style">
<xsl:with-param name="oldface" select="$face"/>
<xsl:with-param name="exclude" select="'boldface'"/>
</xsl:call-template>
</strong>
</xsl:when>
<xsl:when test="contains($face, 'normal')">
<xsl:call-template name="style">
<xsl:with-param name="oldface" select="$face"/>
<xsl:with-param name="exclude" select="'normal'"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Drop style definitions from author-tags -->
<xsl:template match="author/style">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
</xsl:stylesheet>
|