1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
3
|
xmlns:t="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="t" version="2.0">
|
4
|
<!-- html hi part of transformation in htm-teihi.xsl -->
|
5
|
|
6
|
<xsl:template match="t:hi">
|
7
|
<xsl:param name="parm-apparatus-style" tunnel="yes" required="no"></xsl:param>
|
8
|
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
|
9
|
<xsl:choose>
|
10
|
<xsl:when test="@rend='ligature'">
|
11
|
<xsl:choose>
|
12
|
<xsl:when test="$parm-leiden-style = 'rib'">
|
13
|
<xsl:choose>
|
14
|
<xsl:when test="string-length(normalize-space(.))=2"><xsl:value-of select="substring(.,1,1)"/><xsl:text>͡</xsl:text><xsl:value-of select="substring(.,2,1)"/></xsl:when>
|
15
|
<xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
|
16
|
</xsl:choose>
|
17
|
</xsl:when>
|
18
|
<xsl:otherwise>
|
19
|
<xsl:if test="$parm-leiden-style='seg'">
|
20
|
<xsl:if test="string-length(normalize-space(.))=2">
|
21
|
<xsl:text>͜</xsl:text>
|
22
|
</xsl:if>
|
23
|
</xsl:if>
|
24
|
<xsl:apply-templates/>
|
25
|
</xsl:otherwise>
|
26
|
</xsl:choose>
|
27
|
</xsl:when>
|
28
|
<xsl:when
|
29
|
test="@rend = 'diaeresis' or @rend = 'grave' or @rend = 'acute' or @rend = 'asper' or @rend = 'lenis' or @rend = 'circumflex'">
|
30
|
<xsl:apply-templates/>
|
31
|
<xsl:choose>
|
32
|
<!-- if context is inside the app-part of an app-like element, print diacritic in parens here -->
|
33
|
<xsl:when test="$parm-apparatus-style = 'ddbdp' and
|
34
|
ancestor::t:*[local-name()=('reg','corr','rdg')
|
35
|
or self::t:del[@rend='corrected']]">
|
36
|
<!--ancestor::t:*[local-name()=('orig','reg','sic','corr','lem','rdg')
|
37
|
or self::t:del[@rend='corrected']
|
38
|
or self::t:add[@place='inline']][1][local-name()=('reg','corr','del','rdg')]">-->
|
39
|
<xsl:text>(</xsl:text>
|
40
|
<!-- found in tpl-apparatus.xsl -->
|
41
|
<xsl:call-template name="hirend">
|
42
|
<xsl:with-param name="hicontext" select="'no'"/>
|
43
|
</xsl:call-template>
|
44
|
<xsl:text>)</xsl:text>
|
45
|
</xsl:when>
|
46
|
<xsl:when test="$parm-apparatus-style = 'ddbdp'">
|
47
|
<!-- found in [htm|txt]-tpl-apparatus.xsl -->
|
48
|
<xsl:call-template name="app-link">
|
49
|
<xsl:with-param name="location" select="'text'"/>
|
50
|
</xsl:call-template>
|
51
|
</xsl:when>
|
52
|
</xsl:choose>
|
53
|
</xsl:when>
|
54
|
<xsl:otherwise>
|
55
|
<xsl:apply-templates/>
|
56
|
</xsl:otherwise>
|
57
|
</xsl:choose>
|
58
|
</xsl:template>
|
59
|
|
60
|
</xsl:stylesheet>
|