forked from EpiDoc/Stylesheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
htm-teinum.xsl
61 lines (59 loc) · 2.29 KB
/
htm-teinum.xsl
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:t="http://www.tei-c.org/ns/1.0"
exclude-result-prefixes="t" version="2.0">
<!-- Template in teinum.xsl -->
<xsl:import href="teinum.xsl"/>
<xsl:template match="t:num">
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<xsl:choose>
<xsl:when
test="$parm-leiden-style=('ddbdp','dclp','sammelbuch')
and string(.)">
<span>
<xsl:attribute name="title">
<xsl:choose>
<xsl:when test="contains(@value,'/') or @type='fraction'">
<xsl:text>fraction</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>number</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string(@value)">
<xsl:text>: </xsl:text>
<xsl:value-of select="@value"/>
</xsl:when>
<xsl:when test="string(@atLeast) or string(@atMost)">
<xsl:text>: </xsl:text>
<xsl:if test="string(@atLeast)">
<xsl:value-of select="@atLeast"/>
</xsl:if>
<xsl:text>-</xsl:text>
<xsl:if test="string(@atMost)">
<xsl:value-of select="@atMost"/>
</xsl:if>
</xsl:when>
</xsl:choose>
<xsl:if test="child::t:certainty[@match='../@value']">
<xsl:text>(?)</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:apply-imports/>
</span>
</xsl:when>
<xsl:when
test="$parm-leiden-style = 'panciera' and
ancestor::t:*[@xml:lang][1][@xml:lang = 'la']">
<span class="latinnum">
<xsl:apply-imports/>
</span>
</xsl:when>
<xsl:otherwise>
<xsl:apply-imports/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>