Project

General

Profile

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

    
7
  <xsl:template match="text()[not(ancestor::t:note)]">
8
      <xsl:param name="parm-edition-type" tunnel="yes" required="no"></xsl:param>
9
      <xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
10
      <xsl:choose>
11
          <xsl:when test="$parm-edition-type = 'diplomatic' and ancestor::t:div[@type='edition'] and not(ancestor::t:head)">
12
            <xsl:variable name="apos">
13
               <xsl:text><![CDATA[']]></xsl:text>
14
            </xsl:variable>
15
              <xsl:value-of select="translate(translate(translate(.,$apos,''), '··&#xA; ,.;‘’', ''), $all-grc, $grc-upper-strip)"/>
16
         </xsl:when>
17
          <xsl:when test="$parm-leiden-style='edh-names' and 
18
            normalize-space(.) = '' and 
19
            following-sibling::t:*[1][local-name()='w'][@lemma='filius' or @lemma='libertus' or @lemma='filia' or @lemma='liberta'] and
20
            preceding-sibling::t:*[1][descendant-or-self::t:expan]"/>
21
         <xsl:otherwise>
22
            <xsl:if test="matches(., '^\s.')">
23
               <xsl:text> </xsl:text>
24
            </xsl:if>
25
            <xsl:value-of select="normalize-space(.)"/>
26
            <xsl:if test="matches(.,'\s$') and not(local-name(following-sibling::t:*[1]) = 'lb')">
27
               <!--<xsl:if test="substring(., string-length(.)) = ' ' and not(local-name(following-sibling::t:*[1]) = 'lb')">-->
28
               <xsl:text> </xsl:text>
29
            </xsl:if>
30
         </xsl:otherwise>
31
      </xsl:choose>
32
  </xsl:template>
33

    
34
</xsl:stylesheet>
(75-75/95)