Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<!-- $Id: txt-teidivedition.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
                version="2.0">
6

    
7
  <!-- General div match found in txt-teidiv.xsl -->
8

    
9
  <xsl:template match="t:div[@type = 'edition']" priority="1">
10
      <xsl:param name="parm-apparatus-style" tunnel="yes" required="no"></xsl:param>
11
      <xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
12
      <!-- Two line breaks to give space -->
13
    <xsl:choose>
14
        <xsl:when test="starts-with($parm-leiden-style, 'edh')"/>
15
         <xsl:otherwise>
16
            <xsl:text>
17
&#xD;
18
&#xD;</xsl:text>
19
         </xsl:otherwise>
20
      </xsl:choose>
21
    
22
      <xsl:apply-templates/>
23
    
24
      <!-- Apparatus creation: look in tpl-apparatus.xsl for documentation -->
25
      <xsl:if test="$parm-apparatus-style = 'ddbdp'">
26
      <!-- Framework found in txt-tpl-apparatus.xsl -->
27
      <xsl:call-template name="tpl-apparatus"/>
28
      </xsl:if>
29
  </xsl:template>
30

    
31

    
32
  <xsl:template match="t:div[@type = 'textpart']" priority="1">
33
      <xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
34
      <xsl:choose>
35
          <xsl:when test="starts-with($parm-leiden-style, 'edh')">
36
            <xsl:variable name="cur_parent" select="generate-id(parent::node())"/>
37
            <xsl:if test="preceding::t:div[@type='textpart'][1][generate-id(parent::node())=$cur_parent]">
38
               <xsl:text>// </xsl:text>
39
            </xsl:if>
40
            <xsl:text>(</xsl:text>
41
            <xsl:value-of select="@n"/>
42
            <xsl:text>) </xsl:text>
43
         </xsl:when>
44
         <xsl:otherwise>
45
            <xsl:text>
46
&#xD;</xsl:text>
47
            <xsl:value-of select="@n"/>
48
         </xsl:otherwise>
49
      </xsl:choose>
50
    
51
      <xsl:apply-templates/>
52
  </xsl:template>
53

    
54
</xsl:stylesheet>
(79-79/95)