Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<!-- $Id: htm-teiref.xsl 1725 2012-01-10 16:08:31Z gabrielbodard $ -->
3
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
                xmlns:t="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="t" 
5
                version="2.0">
6
  <xsl:include href="teiref.xsl"/>
7
  
8
  <xsl:template match="t:ref">
9
      <xsl:choose>
10
         <xsl:when test="@type = 'reprint-from'">
11
            <br/>
12
            <!-- Found in teiref.xsl -->
13
        <xsl:call-template name="reprint-text">
14
               <xsl:with-param name="direction" select="'from'"/>
15
            </xsl:call-template>
16
         </xsl:when>
17
         <xsl:when test="@type = 'reprint-in'">
18
            <br/>
19
            <!-- Found in teiref.xsl -->
20
        <xsl:call-template name="reprint-text">
21
               <xsl:with-param name="direction" select="'in'"/>
22
            </xsl:call-template>
23
         </xsl:when>
24
         <xsl:when test="@type = 'Perseus'">
25
            <xsl:variable name="col" select="substring-before(@href, ';')"/>
26
            <xsl:variable name="vol" select="substring-before(substring-after(@href,';'),';')"/>
27
            <xsl:variable name="no" select="substring-after(substring-after(@href,';'),';')"/>
28
            <a href="http://www.perseus.tufts.edu/cgi-bin/ptext?doc=Perseus:text:1999.05.{$col}:volume={$vol}:document={$no}">
29
               <xsl:apply-templates/>
30
            </a>
31
         </xsl:when>
32
         <xsl:otherwise>
33
            <xsl:apply-templates/>
34
         </xsl:otherwise>
35
      </xsl:choose>
36
  </xsl:template>
37
  
38

    
39
  <xsl:template name="link-text">
40
      <xsl:param name="href-link"/>
41
      <xsl:param name="val-doc"/>
42
    
43
      <a href="{$href-link}">
44
         <xsl:value-of select="$val-doc"/>
45
      </a>
46
  </xsl:template>
47
  
48
</xsl:stylesheet>
(26-26/95)