Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<!-- $Id: htm-teinum.xsl 2090 2013-10-24 15:23:22Z gabrielbodard $ -->
3
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
   xmlns:t="http://www.tei-c.org/ns/1.0"
5
   exclude-result-prefixes="t" version="2.0">
6
   <!-- Template in teinum.xsl -->
7
   <xsl:import href="teinum.xsl"/>
8

    
9
   <xsl:template match="t:num">
10
       <xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
11
       <xsl:choose>
12
         <xsl:when
13
             test="$parm-leiden-style=('ddbdp','sammelbuch') 
14
            and string(.)">
15
            <span>
16
               <xsl:attribute name="title">
17
                  <xsl:choose>
18
                     <xsl:when test="contains(@value,'/') or @type='fraction'">
19
                        <xsl:text>fraction</xsl:text>
20
                     </xsl:when>
21
                     <xsl:otherwise>
22
                        <xsl:text>number</xsl:text>
23
                     </xsl:otherwise>
24
                  </xsl:choose>
25
                  <xsl:choose>
26
                     <xsl:when test="string(@value)">
27
                        <xsl:text>: </xsl:text>
28
                        <xsl:value-of select="@value"/>
29
                     </xsl:when>
30
                     <xsl:when test="string(@atLeast) or string(@atMost)">
31
                        <xsl:text>: </xsl:text>
32
                        <xsl:if test="string(@atLeast)">
33
                           <xsl:value-of select="@atLeast"/>
34
                        </xsl:if>
35
                        <xsl:text>-</xsl:text>
36
                        <xsl:if test="string(@atMost)">
37
                           <xsl:value-of select="@atMost"/>
38
                        </xsl:if>
39
                     </xsl:when>
40
                  </xsl:choose>
41
                  <xsl:if test="child::t:certainty[@match='../@value']">
42
                     <xsl:text>(?)</xsl:text>
43
                  </xsl:if>
44
               </xsl:attribute>
45
               <xsl:apply-imports/>
46
            </span>
47
         </xsl:when>
48
         <xsl:when
49
             test="$parm-leiden-style = 'panciera' and
50
            ancestor::t:*[@xml:lang][1][@xml:lang = 'la']">
51
            <span class="latinnum">
52
               <xsl:apply-imports/>
53
            </span>
54
         </xsl:when>
55
         <xsl:otherwise>
56
            <xsl:apply-imports/>
57
         </xsl:otherwise>
58
      </xsl:choose>
59
   </xsl:template>
60

    
61
</xsl:stylesheet>
(24-24/95)