-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteisicandcorr.xsl
58 lines (54 loc) · 2.44 KB
/
teisicandcorr.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
<?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">
<!-- Contains templates for choice/sic and choice/corr and surplus -->
<xsl:template match="t:choice/t:sic">
<xsl:param name="parm-edition-type" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<xsl:choose>
<xsl:when test="$parm-edition-type='diplomatic' or $parm-leiden-style=('ddbdp','dclp','sammelbuch')">
<xsl:apply-templates/>
<!-- if context is inside the app-part of an app-like element... -->
<xsl:if test="ancestor::t:*[local-name()=('reg','corr','rdg')
or self::t:del[@rend='corrected']]">
<xsl:text> (i.e. </xsl:text>
<xsl:apply-templates select="../t:corr/node()"/>
<xsl:text>)</xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:template>
<!--<xsl:template match="t:surplus">
MOVED TO teisurplus.xsl -->
<xsl:template match="t:choice/t:corr">
<xsl:param name="parm-edition-type" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<xsl:choose>
<xsl:when test="$parm-edition-type='diplomatic' or $parm-leiden-style=('ddbdp','dclp','sammelbuch')"/>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$parm-leiden-style = 'seg'">
<xsl:text><</xsl:text>
<xsl:apply-templates/>
<!-- cert-low template found in tpl-certlow.xsl -->
<xsl:call-template name="cert-low"/>
<xsl:text>></xsl:text>
</xsl:when>
<xsl:when test="starts-with($parm-leiden-style, 'edh')">
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
<xsl:text>⸢</xsl:text>
<xsl:apply-templates/>
<!-- cert-low template found in tpl-certlow.xsl -->
<xsl:call-template name="cert-low"/>
<xsl:text>⸣</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>