Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<!-- $Id: htm-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
   exclude-result-prefixes="t" version="2.0">
6

    
7
   <!-- Other div matches can be found in htm-teidiv.xsl -->
8

    
9
   <!-- Text edition div -->
10
   <xsl:template match="t:div[@type = 'edition']" priority="1">
11
       <xsl:param name="parm-apparatus-style" tunnel="yes" required="no"></xsl:param>
12
       <div id="edition">
13
         <!-- Found in htm-tpl-lang.xsl -->
14
         <xsl:call-template name="attr-lang"/>
15
         <xsl:apply-templates/>
16

    
17
         <!-- Apparatus creation: look in tpl-apparatus.xsl for documentation and templates -->
18
           <xsl:if test="$parm-apparatus-style = 'ddbdp'">
19
            <!-- Framework found in htm-tpl-apparatus.xsl -->
20
            <xsl:call-template name="tpl-apparatus"/>
21
         </xsl:if>
22

    
23
      </div>
24
   </xsl:template>
25

    
26

    
27
   <!-- Textpart div -->
28
   <xsl:template match="t:div[@type='textpart']" priority="1">
29
       <xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
30
       <xsl:variable name="div-type">
31
           <xsl:for-each select="ancestor::t:div[@type!='edition']">
32
               <xsl:value-of select="@type"/>
33
               <xsl:text>-</xsl:text>
34
           </xsl:for-each>
35
       </xsl:variable>
36
       <xsl:variable name="div-loc">
37
         <xsl:for-each select="ancestor::t:div[@type='textpart'][@n]">
38
            <xsl:value-of select="@n"/>
39
            <xsl:text>-</xsl:text>
40
         </xsl:for-each>
41
      </xsl:variable>
42
      <xsl:if test="@n">
43
         <span class="textpartnumber" id="{$div-type}ab{$div-loc}{@n}">
44
           <!-- add ancestor textparts -->
45
             <xsl:if test="($parm-leiden-style = 'ddbdp' or $parm-leiden-style = 'sammelbuch') and @subtype">
46
              <xsl:value-of select="@subtype"/>
47
              <xsl:text> </xsl:text>
48
           </xsl:if>
49
              <xsl:value-of select="@n"/>
50
         </span>
51
      </xsl:if>
52
      <xsl:apply-templates/>
53
   </xsl:template>
54
</xsl:stylesheet>
(11-11/95)