Mode:

Compact lists

Showing:

Documentation
Parameters
Used by
References
Included from
Source
Stylesheet tei2html-main.xsl
Documentation

Description

 checked. jawalsh. $Id$ 
Included from
Stylesheet version 2.0
Template /
Documentation
<xdoc:author>John A. Walsh</xdoc:author>

<xdoc:copyright>Copyright 2006 John A. Walsh</xdoc:copyright>

<xdoc:short>XSLT stylesheet to transform TEI P5 documents to XHTML.</xdoc:short>

Description

 naming conventions:
        
         named templates:
         parameters that indicate option material in output use "include...", e.g., "includeDocumentInformation"
        
    
Namespace No namespace
Match /
Mode #default
Import precedence 0
Priority 1
Source
<xsl:template match="/" priority="1">
  <xsl:apply-templates/>
</xsl:template>
Template TEI|teiCorpus
Documentation
<xdoc:doc>
        <xdoc:short>Matches root (TEI|teiCorpus) and starts things off.</xdoc:short>
        <xdoc:detail>By default, outputs full XHTML document. If $outputAsDiv is set to true, then
            an HTML div is output.</xdoc:detail>
    </xdoc:doc>

Description

 TEI|teiCorpus 
Namespace No namespace
Match TEI|teiCorpus
Mode #default
References
Import precedence 0
Source
<xsl:template match="TEI|teiCorpus">
  <xsl:choose>
    <xsl:when test="$outputAsDiv = true()">
      <div id="output-content">
        <xsl:call-template name="id"/>
        <xsl:if test="$includeDocumentInformation = true()">
          <xsl:call-template name="docinfo"/>
        </xsl:if>
        <div>
          <xsl:apply-templates/>
          <xsl:call-template name="endnotes"/>
          <xsl:if test="$displayThematicKeywords = true()">
            <xsl:call-template name="thematicKeywords"/>
          </xsl:if>
        </div>
      </div>
    </xsl:when>
    <xsl:otherwise>
      <html xmlns="http://www.w3.org/1999/xhtml">
        <!-- no id attribute on <html>.  Need to stick id in a <meta> tag somewhere -->
        <xsl:call-template name="htmlHead"/>
        <body onload="init();">
          <div id="output-content">
            <xsl:if test="contains(/TEI/text/body/@rendition,'#wide')">
              <xsl:attribute name="style" select="'width:100%;'"/>
            </xsl:if>
            <xsl:if test="$includeDocumentInformation = true()">
              <xsl:call-template name="docinfo"/>
            </xsl:if>
            <xsl:if test="$includeDocHeader = true()">
              <xsl:call-template name="docHeader"/>
            </xsl:if>
            <!-- div included to validate poetry line groups which are spans and must have a parent div. -->
            <div>
              <xsl:apply-templates/>
              <xsl:call-template name="endnotes"/>
              <xsl:if test="$displayThematicKeywords = true()">
                <xsl:call-template name="thematicKeywords"/>
              </xsl:if>
            </div>
          </div>
        </body>
      </html>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template body
Namespace No namespace
Match body
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="body">
  <div>
    <xsl:call-template name="atts"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template docHeader
Documentation
<xdoc:short>Creates a "header" for the HTML page with title, author, and other information.</xdoc:short>
Namespace No namespace
Used by
Template
Import precedence 0
Source
<xsl:template name="docHeader">
  <div id="docHeader">
    <div id="docTitle">
      <xsl:apply-templates select="/TEI/teiHeader/fileDesc/titleStmt/title"/>
    </div>
    <div id="docAuthor">
      <xsl:apply-templates select="/TEI/teiHeader/fileDesc/titleStmt/author"/>
    </div>
    <xsl:if test="/TEI/teiHeader/fileDesc/titleStmt/editor[not(persName[@key = 'jawalsh'])]">
      <div id="docEditor">
        <xsl:text>Edited by </xsl:text>
        <xsl:apply-templates select="/TEI/teiHeader/fileDesc/titleStmt/editor"/>
      </div>
    </xsl:if>
    <xsl:if test="/TEI/teiHeader/fileDesc/sourceDesc//ptr[@type='source']">
      <div id="docSource"> TEI/XML source: <xsl:apply-templates select="/TEI/teiHeader/fileDesc/sourceDesc//ptr[@type='source']"/>
      </div>
    </xsl:if>
    <hr/>
  </div>
</xsl:template>
Template teiCorpous/TEI
Namespace No namespace
Match teiCorpous/TEI
Mode #default
References
Templates
Parameter
Import precedence 0
Source
<xsl:template match="teiCorpous/TEI">
  <div>
    <xsl:call-template name="id"/>
    <xsl:if test="$includeDocumentInformation = true()">
      <xsl:call-template name="docinfo"/>
    </xsl:if>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template div|div0|div1|div2|div3|div4|div5|div6
Documentation
<xdoc:doc>divisions</xdoc:doc>
Namespace No namespace
Match div|div0|div1|div2|div3|div4|div5|div6
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="div|div0|div1|div2|div3|div4|div5|div6">
  <xsl:variable name="depth">
    <xsl:apply-templates select="." mode="depth"/>
  </xsl:variable>
  <div>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="concat('teidiv',$depth)"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="rend"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template div/head|div0/head|div1/head|div2/head|div3/head|div4/head|div5/head|div6/head|div7/head
Documentation
<xdoc:doc>division heads</xdoc:doc>
Namespace No namespace
Match div/head|div0/head|div1/head|div2/head|div3/head|div4/head|div5/head|div6/head|div7/head
Mode #default
References
Parameter
Template
Import precedence 0
Source
<xsl:template match="div/head|div0/head|div1/head|div2/head|div3/head|div4/head|div5/head|div6/head|div7/head">
  <xsl:variable name="depth">
    <xsl:apply-templates select="parent::*" mode="depth"/>
  </xsl:variable>
  <xsl:choose>
    <!-- need first when/@test to avoid duplicate heads in slides -->
    <xsl:when test="($depth = 0) and ($makingSlides = true())"/>
    <xsl:when test="($depth + 1) > 6">
      <xsl:element name="h6">
        <xsl:call-template name="atts"/>
        <xsl:apply-templates/>
      </xsl:element>
    </xsl:when>
    <xsl:otherwise>
      <xsl:element name="h{$depth + 1}">
        <xsl:call-template name="atts"/>
        <xsl:apply-templates/>
      </xsl:element>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template div|div0|div1|div2|div3|div4|div5|div6depth
Documentation
<xdoc:doc>divisions mode="depth". Returns the hierarchical level of the division, starting from
        0.</xdoc:doc>
Namespace No namespace
Match div|div0|div1|div2|div3|div4|div5|div6
Mode depth
Import precedence 0
Source
<xsl:template match="div|div0|div1|div2|div3|div4|div5|div6" mode="depth">
  <xsl:choose>
    <xsl:when test="name(.) = 'div'">
      <xsl:value-of select="count(ancestor::div)"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:choose>
        <xsl:when test="ancestor-or-self::div0">
          <xsl:value-of select="substring-after(name(.),'div')"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="number(substring-after(name(.),'div')) - 1"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template headplain
Namespace No namespace
Match head
Mode plain
Import precedence 0
Source
<xsl:template match="head" mode="plain">
  <xsl:apply-templates/>
</xsl:template>
Template head
Namespace No namespace
Match head
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="head">
  <div>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="'genericHeading'"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template ab
Namespace No namespace
Match ab
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="ab">
  <span>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="'ab'"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="rend"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template p
Namespace No namespace
Match p
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="p">
  <span>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="'p'"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="rend"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template htmlHead
Documentation
<xdoc:doc>
        <xdoc:short>Outputs XHTML head and child elements.</xdoc:short>
    </xdoc:doc>

Description

 named templates 
Namespace No namespace
Used by
Template
References
Template
Parameters
Import precedence 0
Source
<xsl:template name="htmlHead">
  <head>
    <xsl:variable name="headTitle">
      <xsl:call-template name="generateTitle"/>
    </xsl:variable>
    <title>
      <xsl:value-of select="$headTitle"/>
    </title>
    <xsl:if test="$cssFile != ''">
      <xsl:choose>
        <xsl:when test="$standalone = true()">
          <style type="text/css">
            <xsl:value-of select="unparsed-text($cssFile)"/>
          </style>
        </xsl:when>
        <xsl:otherwise>
          <link rel="stylesheet" type="text/css">
            <xsl:attribute name="href">
              <xsl:value-of select="$cssFile"/>
            </xsl:attribute>
          </link>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:if>
    <xsl:if test="$jsFile != ''">
      <xsl:choose>
        <xsl:when test="$standalone = true()">
          <!-- embedding js isn't working -->
          <script type="text/javascript" src="{$jsFile}">
            <xsl:comment> //IE doesn't like empty script tag. </xsl:comment>
          </script>
          <!--
                        <script type="text/javascript">
                            <xsl:comment>
                                <xsl:text>
                                </xsl:text>
                            <xsl:value-of select="unparsed-text($jsFile)"/>
                            </xsl:comment>
                        </script>
                        -->
        </xsl:when>
        <xsl:otherwise>
          <script type="text/javascript" src="{$jsFile}">
            <xsl:comment> //IE doesn't like empty script tag. </xsl:comment>
          </script>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:if>
  </head>
</xsl:template>
Template rendition
Documentation
<xdoc:doc>
        <xdoc:short>Transfers TEI @rendition values to XHTML @class values.</xdoc:short>
        <xdoc:detail>This template assumes a specific encoding practice whereby TEI @rendition values are analagous to XHTML classes, a whitespace separated list of styles. The template accepts a "defaultRend" parameter passed in from the calling template. The default rendition values will be concatenated with the content of @rendition. So, for instance, the title template may have a defaultRend of "i" (for italics), which could then be combined with additional styles listed in @rendition, e.g., "u" (for underlined) or "b" (for bold).</xdoc:detail>
    </xdoc:doc>
Namespace No namespace
Used by
Parameters
QName Namespace
defaultRend No namespace
Import precedence 0
Source
<xsl:template name="rendition">
  <xsl:param name="defaultRend"/>
  <xsl:choose>
    <xsl:when test="@rendition and @rendition != ''">
      <xsl:attribute name="class">
        <xsl:choose>
          <xsl:when test="$defaultRend != ''">
            <xsl:value-of select="concat($defaultRend,' ',translate(normalize-space(@rendition), '#', ''))"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="translate(normalize-space(@rendition), '#', '')"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:attribute>
    </xsl:when>
    <xsl:otherwise>
      <xsl:if test="$defaultRend !=''">
        <xsl:attribute name="class">
          <xsl:value-of select="$defaultRend"/>
        </xsl:attribute>
      </xsl:if>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template rend
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="rend">
  <xsl:if test="@rend and @rend != ''">
    <xsl:attribute name="style">
      <xsl:value-of select="@rend"/>
    </xsl:attribute>
  </xsl:if>
</xsl:template>
Template atts
Namespace No namespace
Used by
References
Templates
Import precedence 0
Source
<xsl:template name="atts">
  <xsl:call-template name="id"/>
  <xsl:call-template name="rendition"/>
  <xsl:call-template name="rend"/>
</xsl:template>
Template id
Documentation
<xdoc:doc>Passes xml:id from TEI element to corresponding XHTML element.</xdoc:doc>

Description

 
    <xsl:template name="rendition">
        <xsl:param name="defaultRend"/>
        <xsl:choose>
            <xsl:when test="@rend and @rend != ''">
                <xsl:attribute name="class">
                    <xsl:choose>
                        <xsl:when test="$defaultRend != ''">
                            <xsl:value-of select="concat($defaultRend,' ',@rend)"/>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:value-of select="@rend"/>
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:attribute>
            </xsl:when>
            <xsl:otherwise>

                <xsl:if test="$defaultRend !=''">
                    <xsl:attribute name="class">
                        <xsl:value-of select="$defaultRend"/>
                    </xsl:attribute>

                </xsl:if>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="id">
  <xsl:if test="@xml:id">
    <xsl:attribute name="id">
      <xsl:value-of select="@xml:id"/>
    </xsl:attribute>
  </xsl:if>
</xsl:template>
Template unclear
Documentation
<xdoc:doc>Outputs unclear readings with tool tip that provides certainty and responsibility
        information.</xdoc:doc>
Namespace No namespace
Match unclear
Mode #default
References
Import precedence 0
Source
<xsl:template match="unclear">
  <xsl:choose>
    <xsl:when test="@cert|@reason">
      <span class="tooltip" onmouseout="hideTip()">
        <xsl:attribute name="onmouseover">
          <xsl:text>doTooltip(event,'<b>unclear reading</b><br /></xsl:text>
          <xsl:if test="@cert">
            <xsl:text><b>certainty:</b> </xsl:text>
            <xsl:value-of select="@cert"/>
          </xsl:if>
          <xsl:if test="@resp">
            <xsl:if test="@cert">
              <xsl:text><br/></xsl:text>
            </xsl:if>
            <xsl:text><b>read by:</b> </xsl:text>
            <xsl:choose>
              <xsl:when test="@resp = 'jawalsh'">
                <xsl:text>John A. Walsh</xsl:text>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="@resp"/>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:if>
          <xsl:text>')</xsl:text>
        </xsl:attribute>
        <xsl:value-of select="$preEditorialIntervention"/>
        <i>
          <xsl:apply-templates/>
        </i>
        <xsl:value-of select="$postEditorialIntervention"/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <span class="tooltip" onmouseover="doTooltip(event,'reason: unknown')" onmouseout="hideTip()">
        <xsl:value-of select="$preEditorialIntervention"/>
        <i>illeg.</i>
        <xsl:value-of select="$postEditorialIntervention"/>
      </span>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template supplied
Documentation
<xdoc:doc>Outputs supplied tag within "editorial intervention" strings.</xdoc:doc>
Namespace No namespace
Match supplied
Mode #default
References
Import precedence 0
Source
<xsl:template match="supplied">
  <xsl:value-of select="$preEditorialIntervention"/>
  <xsl:apply-templates/>
  <xsl:value-of select="$postEditorialIntervention"/>
</xsl:template>
Template choice[abbr]
Documentation
<xdoc:doc>Handles choice between abbr and expan. Assumes one child abbr and one child expan.</xdoc:doc>
Namespace No namespace
Match choice[abbr]
Mode #default
References
Parameter
Import precedence 0
Source
<xsl:template match="choice[abbr]">
  <xsl:choose>
    <xsl:when test="expan and ($expandAbbr = true())">
      <xsl:apply-templates select="expan"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates select="abbr"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template choice[orig]
Documentation
<xdoc:doc>Handles choice between orig and reg. Assumes one child orig and one child reg.</xdoc:doc>
Namespace No namespace
Match choice[orig]
Mode #default
References
Parameter
Import precedence 0
Source
<xsl:template match="choice[orig]">
  <xsl:choose>
    <xsl:when test="reg and ($regularizeOrig = true())">
      <xsl:apply-templates select="reg"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates select="orig"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template choice[@n='eol']
Documentation
<xdoc:doc>Handles choice between orig and reg. Assumes one child orig and one child reg. Special mode for end-of-line hyphenation. See also: template for "lb[n='eol']".</xdoc:doc>

Description

 choice things 
Namespace No namespace
Match choice[@n='eol']
Mode #default
Import precedence 0
Priority 10
Source
<xsl:template match="choice[@n='eol']" priority="10">
  <xsl:choose>
    <xsl:when test="eol=true()">
      <xsl:apply-templates select="orig"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates select="reg"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template choice[sic]
Documentation
<xdoc:doc>Handles choice between sic and corr. Assumes one child sic and one child corr.</xdoc:doc>
Namespace No namespace
Match choice[sic]
Mode #default
References
Parameter
Import precedence 0
Source
<xsl:template match="choice[sic]">
  <xsl:choose>
    <xsl:when test="corr and ($correctSic = true())">
      <xsl:apply-templates select="corr"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates select="sic"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template del
Namespace No namespace
Match del
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="del">
  <span>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="'strike'"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template add
Documentation
<xdoc:doc>Tests @place attribute to superscript or subscript output.</xdoc:doc>
Namespace No namespace
Match add
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="add">
  <xsl:choose>
    <xsl:when test="@place = 'supralinear' or @place = 'above'">
      <span>
        <xsl:call-template name="rendition">
          <xsl:with-param name="defaultRend">
            <xsl:value-of select="'super'"/>
          </xsl:with-param>
        </xsl:call-template>
        <xsl:apply-templates/>
      </span>
    </xsl:when>
    <xsl:when test="@place = 'infralinear' or @place = 'below'">
      <span>
        <xsl:call-template name="rendition">
          <xsl:with-param name="defaultRend">
            <xsl:value-of select="'sub'"/>
          </xsl:with-param>
        </xsl:call-template>
        <xsl:apply-templates/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template activity
Documentation
<xdoc:doc>Placeholder for inline elements that are not handled in any special way.</xdoc:doc>
Namespace No namespace
Match activity
Mode #default
Import precedence 0
Source
<xsl:template match="activity">
  <xsl:apply-templates/>
</xsl:template>
Template title
Documentation
<xdoc:doc>general template for title</xdoc:doc>
Namespace No namespace
Match title
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="title">
  <span>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:if test="not(@rendition) or @rendition=''">
          <xsl:value-of select="'i'"/>
        </xsl:if>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template titlemulti-title
Documentation
<xdoc:doc>special mode to add a space between multiple title elements. E.g. in teiHeader one
        might have title[@type='main'] followed by title[@type='sub'], and one wants at least a
        space between these two title elements.</xdoc:doc>
Namespace No namespace
Match title
Mode multi-title
Import precedence 0
Source
<xsl:template match="title" mode="multi-title">
  <xsl:if test="preceding-sibling::title">
    <xsl:text>  </xsl:text>
  </xsl:if>
  <xsl:apply-templates/>
</xsl:template>
Template generateTitle
Namespace No namespace
Used by
Template
Import precedence 0
Source
<xsl:template name="generateTitle">
  <xsl:choose>
    <xsl:when test="/teiCorpus">
      <xsl:apply-templates select="ancestor-or-self::teiCorpus/teiHeader/fileDesc/titleStmt/title" mode="multi-title"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates select="ancestor-or-self::TEI/teiHeader/fileDesc/titleStmt/title" mode="multi-title"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template teiHeader
Documentation
<xdoc:doc>Do nothing by default with teiHeader, so elements can be accessed explicitly
        elsewhere.</xdoc:doc>
Namespace No namespace
Match teiHeader
Mode #default
Import precedence 0
Source
<xsl:template match="teiHeader"/>
Template salute
Namespace No namespace
Match salute
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="salute">
  <div>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="'salute'"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template div[@type='frontispiece']|div[@type='epistle']|div[@type='illustration']|byline
Namespace No namespace
Match div[@type='frontispiece']|div[@type='epistle']|div[@type='illustration']|byline
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="div[@type='frontispiece']|div[@type='epistle']|div[@type='illustration']|byline">
  <div>
    <xsl:call-template name="rendition"/>
    <xsl:call-template name="id"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template lg
Documentation
<xdoc:doc>Handling of poetic stanzas. Special case for lg[@rend='sublg'], which represents a
        "line group" within a stanza, that is not separated by white space from the recent of the
        stanza, e.g., the octect and sestet within a Petrarchan sonnet or the four quatrains and
        couplet in a Shakesperian sonnet.</xdoc:doc>
Namespace No namespace
Match lg
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="lg">
  <span>
    <xsl:choose>
      <xsl:when test="contains(@rendition,'sublg')">
        <xsl:call-template name="rendition"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="rendition">
          <xsl:with-param name="defaultRend">lg</xsl:with-param>
        </xsl:call-template>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <xsl:apply-templates select="head" mode="lgHead"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template headlgHead
Namespace No namespace
Match head
Mode lgHead
References
Templates
Import precedence 0
Source
<xsl:template match="head" mode="lgHead">
  <span>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="'genericHeading'"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="id"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template lg/head
Namespace No namespace
Match lg/head
Mode #default
Import precedence 0
Source
<xsl:template match="lg/head"/>
Template l
Documentation
<xdoc:doc>
        <xdoc:short>Handling of poetic lines</xdoc:short>
        <xdoc:detail>Wraps poetic lines in a series of divs that, when combined with the proper CSS,
            displays formated poetic lines with proper indentation (derived from l/@rend attributes)
            and line numbering (derived from l/@n attributes.</xdoc:detail>
    </xdoc:doc>
Namespace No namespace
Match l
Mode #default
References
Templates
Parameter
Import precedence 0
Source
<xsl:template match="l">
  <span class="lineWrapper">
    <span>
      <xsl:attribute name="class">
        <xsl:choose>
          <xsl:when test="label">
            <xsl:text>lineWithLabel</xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text>line</xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:attribute>
      <span>
        <xsl:call-template name="id"/>
        <xsl:call-template name="rend"/>
        <xsl:attribute name="class">
          <xsl:choose>
            <xsl:when test="not(contains(@rendition,'ti-'))">
              <xsl:call-template name="rendition">
                <xsl:with-param name="defaultRend">
                  <xsl:value-of select="'ti-0'"/>
                </xsl:with-param>
              </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
              <xsl:call-template name="rendition"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:apply-templates/>
      </span>
    </span>
    <xsl:if test="label">
      <span class="lineLabel">
        <xsl:apply-templates select="./label" mode="lineLabel"/>
      </span>
    </xsl:if>
    <span class="number">
      <xsl:choose>
        <xsl:when test="@n mod $lineNumberFrequency = 0">
          <xsl:value-of select="@n"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:comment>don't want empty div</xsl:comment>
        </xsl:otherwise>
      </xsl:choose>
    </span>
  </span>
</xsl:template>
Template l/label
Namespace No namespace
Match l/label
Mode #default
Import precedence 0
Source
<xsl:template match="l/label"/>
Template l/labellineLabel
Namespace No namespace
Match l/label
Mode lineLabel
Import precedence 0
Source
<xsl:template match="l/label" mode="lineLabel">
  <xsl:apply-templates/>
</xsl:template>
Template note
Namespace No namespace
Match note
Mode #default
References
Template
Import precedence 0
Priority 1
Source
<xsl:template match="note" priority="1">
  <span>
    <xsl:call-template name="atts"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template notehide
Namespace No namespace
Match note
Mode hide
References
Templates
Import precedence 0
Source
<xsl:template match="note" mode="hide">
  <div>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="'note suppress'"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template note[@type= 'gloss']
Namespace No namespace
Match note[@type= 'gloss']
Mode #default
Import precedence 0
Priority 1
Source
<xsl:template match="note[@type= 'gloss']" priority="1">
  <xsl:apply-templates select="." mode="generated-reference"/>
</xsl:template>
Template note[@type = 'gloss']/term
Documentation

Description

   
Namespace No namespace
Match note[@type = 'gloss']/term
Mode #default
Import precedence 0
Source
<xsl:template match="note[@type = 'gloss']/term">
  <span class="glossTerm">
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template note[@type = 'gloss']/gloss
Namespace No namespace
Match note[@type = 'gloss']/gloss
Mode #default
Import precedence 0
Source
<xsl:template match="note[@type = 'gloss']/gloss">
  <span class="gloss">
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template note[@type = 'dev']|note[@type = 'metadocument']
Namespace No namespace
Match note[@type = 'dev']|note[@type = 'metadocument']
Mode #default
Import precedence 0
Source
<xsl:template match="note[@type = 'dev']|note[@type = 'metadocument']"/>
Template jsInit
Documentation

Description

 jsInit not needed if use window.onload in .js file 
Namespace No namespace
Import precedence 0
Source
<xsl:template name="jsInit">
  <xsl:attribute name="onload">
    <xsl:value-of select="'Tooltip.init();'"/>
  </xsl:attribute>
</xsl:template>
Template persName|placeName|geogName|orgName|name|rs
Namespace No namespace
Match persName|placeName|geogName|orgName|name|rs
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="persName|placeName|geogName|orgName|name|rs">
  <span>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rendition"/>
    <xsl:apply-templates/>
    <xsl:if test="contains(@corresp,'#unfamiliar')">
      <xsl:call-template name="nameGloss">
        <xsl:with-param name="target">
          <xsl:value-of select="@key"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:if>
  </span>
</xsl:template>
Template listBibl
Namespace No namespace
Match listBibl
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="listBibl">
  <div>
    <xsl:call-template name="atts"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template listBibl/bibl
Documentation

Description

 need similar for biblStruct and biblFull 
Namespace No namespace
Match listBibl/bibl
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="listBibl/bibl">
  <div>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="'bibl'"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template listBibl/biblStruct
Namespace No namespace
Match listBibl/biblStruct
Mode #default
References
Import precedence 0
Source
<xsl:template match="listBibl/biblStruct">
  <div>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="'bibl'"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="get-author"/>
    <xsl:call-template name="get-editor-analytic"/>
    <xsl:if test="analytic/title">
      <xsl:call-template name="get-title-analytic"/>
    </xsl:if>
    <xsl:call-template name="get-title-monogr"/>
    <xsl:if test="analytic and not(analytic/author)">
      <xsl:call-template name="get-author-monogr"/>
    </xsl:if>
    <xsl:call-template name="get-editor-monogr"/>
    <xsl:call-template name="get-extent"/>
    <xsl:call-template name="get-pubPlace"/>
    <xsl:call-template name="get-publisher"/>
    <xsl:call-template name="get-date"/>
    <xsl:call-template name="get-biblScope"/>
    <xsl:call-template name="get-origPubInfo"/>
  </div>
</xsl:template>
Template get-author
Namespace No namespace
Used by
References
Template
Parameters
QName Namespace
author No namespace
Import precedence 0
Source
<xsl:template name="get-author">
  <xsl:param name="author">
    <xsl:choose>
      <xsl:when test="analytic">
        <xsl:choose>
          <xsl:when test="analytic/author/persName/@key">
            <xsl:call-template name="getXtmName">
              <xsl:with-param name="target" select="analytic/author/persName/@key"/>
            </xsl:call-template>
          </xsl:when>
          <xsl:when test="analytic/author">
            <xsl:value-of select="analytic/author"/>
          </xsl:when>
        </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
        <xsl:choose>
          <xsl:when test="monogr/author/persName/@key">
            <xsl:call-template name="getXtmName">
              <xsl:with-param name="target" select="monogr/author/persName/@key"/>
            </xsl:call-template>
          </xsl:when>
          <xsl:when test="monogr/author">
            <xsl:value-of select="monogr/author"/>
          </xsl:when>
          <xsl:when test="analytic/editor"/>
          <xsl:when test="monogr/editor"/>
          <xsl:otherwise>
            <xsl:value-of select="'unknown'"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:param>
  <xsl:if test="$author != ''">
    <xsl:choose>
      <xsl:when test="not(ends-with(normalize-space($author),'.'))">
        <xsl:value-of select="concat(normalize-space($author),'. ')"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="concat(normalize-space($author),' ')"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:if>
</xsl:template>
Template get-author-monogr
Namespace No namespace
Used by
References
Template
Parameters
QName Namespace
author No namespace
Import precedence 0
Source
<xsl:template name="get-author-monogr">
  <xsl:param name="author">
    <xsl:choose>
      <xsl:when test="monogr/author/persName/@key">
        <xsl:call-template name="getXtmName">
          <xsl:with-param name="target" select="monogr/author/persName/@key"/>
          <xsl:with-param name="scope" select="'display'"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:when test="mongr/author/persName">
        <xsl:value-of select="mongr/author/persName"/>
      </xsl:when>
      <xsl:when test="monogr/author">
        <xsl:value-of select="monogr/author"/>
      </xsl:when>
      <xsl:when test="analytic/editor"/>
      <xsl:when test="monogr/editor"/>
      <xsl:otherwise>
        <xsl:value-of select="'unknown'"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:param>
  <xsl:if test="$author != ''">
    <xsl:choose>
      <xsl:when test="not(ends-with(normalize-space($author),'.'))">
        <xsl:value-of select="concat('By ', normalize-space($author),'. ')"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="concat('By ', normalize-space($author),' ')"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:if>
</xsl:template>
Template get-editor-analytic
Namespace No namespace
Used by
References
Template
Parameters
QName Namespace
editor No namespace
Import precedence 0
Source
<xsl:template name="get-editor-analytic">
  <xsl:param name="editor">
    <xsl:choose>
      <xsl:when test="analytic/editor/persName/@key">
        <xsl:call-template name="getXtmName">
          <xsl:with-param name="target" select="analytic/editor/persName/@key"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:when test="analytic/editor">
        <xsl:value-of select="analytic/editor"/>
      </xsl:when>
      <!--
                    <xsl:when test="/TEI/teiHeader/fileDesc/sourceDesc/biblStruct/monogr/editor/persName/@key">
                    <xsl:call-template name="getXtmName">
                    <xsl:with-param name="target" select="/TEI/teiHeader/fileDesc/editor/author/persName/@key"/>
                    </xsl:call-template>
                    </xsl:when>
                -->
    </xsl:choose>
  </xsl:param>
  <xsl:if test="$editor != ''">
    <xsl:value-of select="concat(normalize-space($editor),', ed. ')"/>
  </xsl:if>
</xsl:template>
Template get-editor-monogr
Namespace No namespace
Used by
References
Template
Parameters
QName Namespace
editor No namespace
Import precedence 0
Source
<xsl:template name="get-editor-monogr">
  <xsl:param name="editor">
    <xsl:choose>
      <xsl:when test="monogr/editor/persName/@key">
        <xsl:call-template name="getXtmName">
          <xsl:with-param name="target" select="monogr/editor/persName/@key"/>
          <xsl:with-param name="scope" select="'display'"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:when test="monogr/editor">
        <xsl:value-of select="monogr/editor"/>
      </xsl:when>
      <!--
                    <xsl:when test="/TEI/teiHeader/fileDesc/sourceDesc/biblStruct/monogr/editor/persName/@key">
                    <xsl:call-template name="getXtmName">
                    <xsl:with-param name="target" select="/TEI/teiHeader/fileDesc/editor/author/persName/@key"/>
                    </xsl:call-template>
                    </xsl:when>
                -->
    </xsl:choose>
  </xsl:param>
  <xsl:if test="$editor != ''">
    <xsl:value-of select="concat('Ed. ',normalize-space($editor),'. ')"/>
  </xsl:if>
</xsl:template>
Template get-title-analytic
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="get-title-analytic">
  <xsl:variable name="title">
    <xsl:apply-templates select="analytic/title" mode="bibl"/>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="analytic/title/@level = 'm'">
      <cite>
        <xsl:value-of select="$title"/>.</cite>
      <xsl:value-of select="' '"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="'“'"/>
      <xsl:copy-of select="$title"/>
      <xsl:value-of select="'.” '"/>
      <!--
                <xsl:value-of select="concat('“',normalize-space($title),'.” ')"/>
                -->
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template analytic/titlebibl
Namespace No namespace
Match analytic/title
Mode bibl
Import precedence 0
Source
<xsl:template match="analytic/title" mode="bibl">
  <xsl:apply-templates/>
</xsl:template>
Template get-title-monogr
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="get-title-monogr">
  <xsl:choose>
    <xsl:when test="monogr/title/choice/reg">
      <cite>
        <xsl:value-of select="concat(normalize-space(monogr/title/choice/reg),'. ')"/>
      </cite>
    </xsl:when>
    <xsl:when test="monogr/title">
      <xsl:for-each select="monogr/title">
        <!-- this doesn't work with more than one title, e.g.,:
                        <monogr>
                        <author>Adams, Antoníeta</author>
                        <title>El Proyecto Crack</title>
                        <title type="sub">Cuentos Grises</title>
                        <imprint>
                        <pubPlace>Concepción, Chile</pubPlace>
                        <publisher>Ediciones Letra Nueva</publisher>
                        <date when="2005">2005</date>
                        </imprint>
                        </monogr>
                    -->
        <cite>
          <xsl:value-of select="concat(normalize-space(.),'. ')"/>
        </cite>
      </xsl:for-each>
    </xsl:when>
  </xsl:choose>
</xsl:template>
Template get-extent
Namespace No namespace
Used by
Parameters
QName Namespace Select
extent No namespace normalize-space(monogr/extent)
Import precedence 0
Source
<xsl:template name="get-extent">
  <xsl:param name="extent" select="normalize-space(monogr/extent)"/>
  <xsl:if test="$extent != ''">
    <xsl:choose>
      <xsl:when test="ends-with($extent,'.')">
        <xsl:value-of select="concat($extent,' ')"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="concat($extent,'. ')"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:if>
</xsl:template>
Template get-pubPlace
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="get-pubPlace">
  <xsl:if test="monogr/imprint/pubPlace">
    <xsl:value-of select="concat(normalize-space(monogr/imprint/pubPlace),': ')"/>
  </xsl:if>
</xsl:template>
Template get-publisher
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="get-publisher">
  <xsl:if test="monogr/imprint/publisher">
    <xsl:value-of select="concat(normalize-space(monogr/imprint/publisher),', ')"/>
  </xsl:if>
</xsl:template>
Template get-date
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="get-date">
  <xsl:choose>
    <xsl:when test="monogr/imprint/date/@from and monogr/imprint/date/@to">
      <xsl:value-of select="concat(normalize-space(monogr/imprint/date/@from),'-',normalize-space(monogr/imprint/date/@to),'. ')"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:if test="monogr/imprint/date/@when">
        <xsl:value-of select="concat(normalize-space(monogr/imprint/date/@when),'. ')"/>
      </xsl:if>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template get-biblScope
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="get-biblScope">
  <xsl:if test="monogr/imprint/biblScope[@type = 'vol']">
    <xsl:choose>
      <xsl:when test="monogr/imprint/biblScope[@type = 'pp']">
        <xsl:value-of select="concat(normalize-space(monogr/imprint/biblScope[@type = 'vol']),': ')"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="concat(normalize-space(monogr/imprint/biblScope[@type = 'vol']),'. ')"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:if>
  <xsl:if test="monogr/imprint/biblScope[@type = 'pp']">
    <xsl:value-of select="concat(normalize-space(monogr/imprint/biblScope[@type = 'pp']),'. ')"/>
  </xsl:if>
</xsl:template>
Template get-origPubInfo
Namespace No namespace
Used by
Parameters
QName Namespace Select
date No namespace normalize-space(relatedItem[@type = 'original_collection']/biblStruct/monogr/imprint/date/@when)
pubPlace No namespace normalize-space(relatedItem[@type = 'original_collection']/biblStruct/monogr/imprint/pubPlace)
publisher No namespace normalize-space(relatedItem[@type = 'original_collection']/biblStruct/monogr/imprint/publisher)
Import precedence 0
Source
<xsl:template name="get-origPubInfo">
  <xsl:param name="pubPlace" select="normalize-space(relatedItem[@type = 'original_collection']/biblStruct/monogr/imprint/pubPlace)"/>
  <xsl:param name="publisher" select="normalize-space(relatedItem[@type = 'original_collection']/biblStruct/monogr/imprint/publisher)"/>
  <xsl:param name="date" select="normalize-space(relatedItem[@type = 'original_collection']/biblStruct/monogr/imprint/date/@when)"/>
  <xsl:if test="$pubPlace != '' and $publisher != '' and $date != ''">
    <xsl:value-of select="concat($pubPlace,': ',$publisher,', ',$date,'.')"/>
  </xsl:if>
</xsl:template>
Template biblStruct
Namespace No namespace
Match biblStruct
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="biblStruct">
  <span>
    <xsl:call-template name="atts"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template lb
Namespace No namespace
Match lb
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="lb">
  <br>
    <xsl:call-template name="rendition"/>
    <xsl:call-template name="id"/>
  </br>
</xsl:template>
Template lb[n='eol']
Namespace No namespace
Match lb[n='eol']
Mode #default
References
Parameter
Templates
Import precedence 0
Source
<xsl:template match="lb[n='eol']">
  <xsl:if test="$eol = true()">
    <xsl:call-template name="rendition"/>
    <xsl:call-template name="id"/>
    <br/>
  </xsl:if>
</xsl:template>
Template docAuthor|s|seg|resp|emph|label|foreign|term|hi|quote[(contains(@rendition,'#sq') or contains(@rendition,'#dq')) and not(@prev) and not(@next)]|q[(contains(@rendition,'#sq') or contains(@rendition,'#dq')) and not(@prev) and not(@next)]
Documentation
<xdoc:doc>A generic template for (usually) inline elements.</xdoc:doc>

Description

 Will, eventually, need special case for castList/castItem, when they are in "list" format. 
 Long quote predicate to avoide matching quotes with @prev and @next, which typically would appear in verse and are handled as a special case. 
Namespace No namespace
Match docAuthor|s|seg|resp|emph|label|foreign|term|hi|quote[(contains(@rendition,'#sq') or contains(@rendition,'#dq')) and not(@prev) and not(@next)]|q[(contains(@rendition,'#sq') or contains(@rendition,'#dq')) and not(@prev) and not(@next)]
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="docAuthor|s|seg|resp|emph|label|foreign|term|hi|quote[(contains(@rendition,'#sq') or contains(@rendition,'#dq')) and not(@prev) and not(@next)]|q[(contains(@rendition,'#sq') or contains(@rendition,'#dq')) and not(@prev) and not(@next)]">
  <!-- |quote[parent::cit[contains(@rendition, '#block')]]-->
  <xsl:choose>
    <xsl:when test="((@rendition and @rendition != '') or (@rend and @rend != '') )">
      <span>
        <xsl:call-template name="atts"/>
        <xsl:apply-templates/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <span>
        <xsl:attribute name="class">
          <xsl:value-of select="name()"/>
        </xsl:attribute>
        <xsl:call-template name="id"/>
        <xsl:apply-templates/>
      </span>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template author|speaker|bibl|cit|w|c|publisher|titlePart|catDesc|castItem|title[@level = 'a' and contains(@rendition,'#nq')]|l[contains(@rendition,'#inline')]
Namespace No namespace
Match author|speaker|bibl|cit|w|c|publisher|titlePart|catDesc|castItem|title[@level = 'a' and contains(@rendition,'#nq')]|l[contains(@rendition,'#inline')]
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="author|speaker|bibl|cit|w|c|publisher|titlePart|catDesc|castItem|title[@level = 'a' and contains(@rendition,'#nq')]|l[contains(@rendition,'#inline')]">
  <span>
    <xsl:call-template name="atts"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template sp|stage|address|dateline|text|castList|docImprint|docTitle|epigraph|signed|sound|titlePage|addrLine|quote[contains(@rendition,'#block')]|opener|closer|imprimatur|floatingText|milestone|docDate
Documentation
<xdoc:doc>A generic template for (usually) block elements.</xdoc:doc>
Namespace No namespace
Match sp|stage|address|dateline|text|castList|docImprint|docTitle|epigraph|signed|sound|titlePage|addrLine|quote[contains(@rendition,'#block')]|opener|closer|imprimatur|floatingText|milestone|docDate
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="sp|stage|address|dateline|text|castList|docImprint|docTitle|epigraph|signed|sound|titlePage|addrLine|quote[contains(@rendition,'#block')]|opener|closer|imprimatur|floatingText|milestone|docDate">
  <div>
    <xsl:call-template name="atts"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template castItem[parent::castList[contains(@rendition,'#list')]]
Namespace No namespace
Match castItem[parent::castList[contains(@rendition,'#list')]]
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="castItem[parent::castList[contains(@rendition,'#list')]]">
  <span>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend">
        <xsl:value-of select="'castItem'"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template /TEI/teiHeader/fileDesc/titleStmt/title
Documentation

Description

 cit w/ block quote and block bibl, as commonly found in epigraphs. 
    <xsl:template match="cit/quote[contains(@rendition, '#block') and following-sibling::bibl]|cit/quote[contains(@rendition, '#block') and following-sibling::bibl]/lg">
        <div>
            <xsl:call-template name="id"/>
            <xsl:call-template name="rend"/>
            <xsl:call-template name="rendition">
                <xsl:with-param name="defaultRend">
                    <xsl:value-of select="'epiblock'"/>
                </xsl:with-param>
            </xsl:call-template>
            <xsl:apply-templates/>
        </div>
    </xsl:template>
    
    <xsl:template match="cit[contains(@rendition,'#block')]">
        <span>
            <xsl:call-template name="id"/>
            <xsl:call-template name="rendition">
                <xsl:with-param name="defaultRend">
                    <xsl:value-of select="'blockquote'"/>
                </xsl:with-param>
            </xsl:call-template>
            <xsl:call-template name="rend"/>
            <xsl:apply-templates/>
        </span>
    </xsl:template>
    
 assumes epigraphs are block elements by default 
 Template below was throwing ambiguous rule error, and the template itself doesn't appear to be necessary.  Not sure why I 
    wrote it in the first place.
    <xsl:template match="cit[contains(@rendition,'#block')]/quote|epigraph/cit/quote">
        <span>
           <xsl:call-template name="rendition"/>
           <xsl:call-template name="id"/>
            <xsl:apply-templates/>
        </span>
    </xsl:template>
    
Namespace No namespace
Match /TEI/teiHeader/fileDesc/titleStmt/title
Mode #default
Import precedence 0
Source
<xsl:template match="/TEI/teiHeader/fileDesc/titleStmt/title">
  <xsl:apply-templates/>
</xsl:template>
Template figure
Namespace No namespace
Match figure
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="figure">
  <div>
    <xsl:call-template name="atts"/>
    <!-- <xsl:apply-templates/> -->
    <xsl:apply-templates select="graphic"/>
    <xsl:apply-templates select="head" mode="caption"/>
  </div>
</xsl:template>
Template availability//figure
Namespace No namespace
Match availability//figure
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="availability//figure">
  <!-- special template, simple transformation for 
            creative commons icon in availability 
            statement -->
  <img>
    <xsl:call-template name="atts"/>
    <xsl:attribute name="src">
      <xsl:value-of select="graphic/@url"/>
    </xsl:attribute>
    <xsl:attribute name="alt">
      <xsl:choose>
        <xsl:when test="figDesc">
          <!--
                            <xsl:value-of select="normalize-space(../figDesc/text())"/>
                        -->
          <xsl:apply-templates mode="alt" select="figDesc"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="'graphic'"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:attribute>
  </img>
</xsl:template>
Template graphic
Namespace No namespace
Match graphic
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="graphic">
  <a href="{@url}" style="border-bottom:none;">
    <xsl:attribute name="href">
      <xsl:choose>
        <xsl:when test="../note[@type = 'figurePtr']">
          <xsl:value-of select="../note[@type = 'figurePtr']/ptr/@target"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="@url"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:attribute>
    <img>
      <xsl:call-template name="id"/>
      <xsl:call-template name="rend"/>
      <xsl:call-template name="rendition">
        <xsl:with-param name="defaultRend" select="'figure'"/>
      </xsl:call-template>
      <xsl:attribute name="src">
        <xsl:value-of select="@url"/>
      </xsl:attribute>
      <xsl:attribute name="alt">
        <xsl:choose>
          <xsl:when test="../figDesc">
            <!--
                                <xsl:value-of select="normalize-space(../figDesc/text())"/>
                            -->
            <xsl:apply-templates mode="alt" select="../figDesc"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="'graphic'"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:attribute>
    </img>
  </a>
</xsl:template>
Template figDesc//*alt
Namespace No namespace
Match figDesc//*
Mode alt
Import precedence 0
Source
<xsl:template match="figDesc//*" mode="alt">
  <xsl:value-of select="."/>
</xsl:template>
Template graphic[@mimeType = 'application/x-shockwave-flash']
Namespace No namespace
Match graphic[@mimeType = 'application/x-shockwave-flash']
Mode #default
Parameters
QName Namespace
height No namespace
width No namespace
Import precedence 0
Source
<xsl:template match="graphic[@mimeType = 'application/x-shockwave-flash']">
  <xsl:param name="width">
    <xsl:value-of select="substring-before(@width,'px')"/>
  </xsl:param>
  <xsl:param name="height">
    <xsl:value-of select="substring-before(@height,'px')"/>
  </xsl:param>
  <object>
    <xsl:if test="@width and @width != ''">
      <xsl:attribute name="width">
        <xsl:value-of select="$width"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:if test="@height and @height != ''">
      <xsl:attribute name="height">
        <xsl:value-of select="$height"/>
      </xsl:attribute>
    </xsl:if>
    <param name="movie" value="{@url}"/>
    <embed src="{@url}">
      <xsl:if test="@width and @width != ''">
        <xsl:attribute name="width">
          <xsl:value-of select="$width"/>
        </xsl:attribute>
      </xsl:if>
      <xsl:if test="@height and @height != ''">
        <xsl:attribute name="height">
          <xsl:value-of select="$height"/>
        </xsl:attribute>
      </xsl:if>
    </embed>
  </object>
</xsl:template>
Template figDesc
Namespace No namespace
Match figDesc
Mode #default
Import precedence 0
Source
<xsl:template match="figDesc"/>
Template ptr[@type = 'figure']
Namespace No namespace
Match ptr[@type = 'figure']
Mode #default
Import precedence 0
Priority 99
Source
<xsl:template match="ptr[@type = 'figure']" priority="99">
  <xsl:variable name="id" select="normalize-space(substring-after(@target,'#'))"/>
  <xsl:value-of select="'Figure '"/>
  <!-- <xsl:number select="id(substring-after(@target,'#'))" level="any" count="figure[head]"/> -->
  <xsl:number select="//*[@xml:id = $id]" level="any" count="figure[head]"/>
</xsl:template>
Template ptr[@type = 'eg']
Namespace No namespace
Match ptr[@type = 'eg']
Mode #default
Import precedence 0
Priority 10
Source
<xsl:template match="ptr[@type = 'eg']" priority="10">
  <xsl:value-of select="'Example '"/>
  <xsl:number select="id(substring-after(@target,'#'))" level="any" count="eg[following-sibling::note[@type = 'caption']]|eg:egXML[following-sibling::note[@type = 'caption']]"/>
</xsl:template>
Template headcaption
Namespace No namespace
Match head
Mode caption
References
Templates
Parameter
Import precedence 0
Source
<xsl:template match="head" mode="caption">
  <div class="caption">
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <xsl:call-template name="rendition">
      <xsl:with-param name="defaultRend" select="'caption'"/>
    </xsl:call-template>
    <xsl:if test="$numberFigures = true()">
      <b>
        <xsl:value-of select="'Figure '"/>
        <xsl:number level="any" count="figure[head]"/>
        <xsl:text>.</xsl:text>
      </b>
      <xsl:text>
					</xsl:text>
    </xsl:if>
    <xsl:apply-templates/>
    <xsl:apply-templates select="following-sibling::p"/>
  </div>
  <!--
        <span>
            <xsl:call-template name="id"/>
            <xsl:call-template name="rend"/>
            <xsl:call-template name="rendition">
                <xsl:with-param name="defaultRend" select="'caption'"/>
            </xsl:call-template>
            
            <xsl:apply-templates/>
        </span>-->
</xsl:template>
Template figure/head
Namespace No namespace
Match figure/head
Mode #default
Import precedence 0
Source
<xsl:template match="figure/head"/>
Template q|soCalled|title[contains(@rendition,'#quotes')]|title[@level='a' and not(contains(@rendition,'#dq')) and not(contains(@rendition,'#sq')) and not(contains(@rendition,'#nq'))]|analytic/title[not(contains(@rendition,'#dq'))]|quote[not(parent::cit[contains(@rendition,'#block')]) and not(contains(@rendition,'#block'))]
Namespace No namespace
Match q|soCalled|title[contains(@rendition,'#quotes')]|title[@level='a' and not(contains(@rendition,'#dq')) and not(contains(@rendition,'#sq')) and not(contains(@rendition,'#nq'))]|analytic/title[not(contains(@rendition,'#dq'))]|quote[not(parent::cit[contains(@rendition,'#block')]) and not(contains(@rendition,'#block'))]
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="q|soCalled|title[contains(@rendition,'#quotes')]|title[@level='a' and not(contains(@rendition,'#dq')) and not(contains(@rendition,'#sq')) and not(contains(@rendition,'#nq'))]|analytic/title[not(contains(@rendition,'#dq'))]|quote[not(parent::cit[contains(@rendition,'#block')]) and not(contains(@rendition,'#block'))]">
  <span>
    <xsl:call-template name="atts"/>
    <xsl:call-template name="quotes">
      <xsl:with-param name="contents">
        <xsl:apply-templates/>
      </xsl:with-param>
    </xsl:call-template>
  </span>
</xsl:template>
Template q[contains(@rendition,'#nq')]|quote[contains(@rendition,'#nq')]
Documentation

Description

 below for quotes that are not marked with quotation marks. 
Namespace No namespace
Match q[contains(@rendition,'#nq')]|quote[contains(@rendition,'#nq')]
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="q[contains(@rendition,'#nq')]|quote[contains(@rendition,'#nq')]">
  <span>
    <xsl:call-template name="atts"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template quotes
Namespace No namespace
Used by
References
Parameter
Parameters
QName Namespace
contents No namespace
Import precedence 0
Source
<xsl:template name="quotes">
  <xsl:param name="contents">
    <xsl:apply-templates/>
  </xsl:param>
  <xsl:variable name="level">
    <xsl:value-of select="count(ancestor::quote[contains(@rendition,'#inline')] |                 ancestor::soCalled |                 ancestor::q |                 ancestor::title[contains(@rendition,'#quotes')] |                 ancestor::title[@level='a' and not(contains(@rendition,'#nq'))] |                 ancestor::analytic/title[not(contains(@rendition,'#nq'))] |                 ancestor::quote[not(parent::cit[contains(@rendition,'#block')])])"/>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="$quotation_format = 'single'">
      <xsl:choose>
        <xsl:when test="$level mod 2">
          <xsl:text></xsl:text>
          <!--<xsl:copy-of select="$contents"/>-->
          <xsl:apply-templates/>
          <xsl:text></xsl:text>
        </xsl:when>
        <xsl:otherwise>
          <xsl:text></xsl:text>
          <!--<xsl:copy-of select="$contents"/>-->
          <xsl:apply-templates/>
          <xsl:text></xsl:text>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:when>
    <xsl:otherwise>
      <xsl:choose>
        <xsl:when test="$level mod 2">
          <xsl:text></xsl:text>
          <!--<xsl:copy-of select="$contents"/>-->
          <xsl:apply-templates/>
          <xsl:text></xsl:text>
        </xsl:when>
        <xsl:otherwise>
          <xsl:text></xsl:text>
          <!--<xsl:copy-of select="$contents"/>-->
          <xsl:apply-templates/>
          <xsl:text></xsl:text>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template soCalled[contains(@rendition,'#sq') or contains(@rendition,'#dq')]
Documentation

Description

 special quotes 
Namespace No namespace
Match soCalled[contains(@rendition,'#sq') or contains(@rendition,'#dq')]
Mode #default
References
Templates
Parameters
QName Namespace
rendition No namespace
Import precedence 0
Source
<xsl:template match="soCalled[contains(@rendition,'#sq') or contains(@rendition,'#dq')]">
  <xsl:param name="rendition">
    <xsl:value-of select="translate(translate(normalize-space(@rendition), '#sq', ''), '#dq', '')"/>
  </xsl:param>
  <span>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <!-- insteading of calling "rendition" template, need to remove #sq -->
    <xsl:if test="$rendition != ''">
      <xsl:attribute name="class">
        <xsl:value-of select="translate(normalize-space($rendition), '#', '')"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:choose>
      <xsl:when test="contains(@rendition,'#sq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:when test="contains(@rendition,'#dq')">
        <xsl:text></xsl:text>
      </xsl:when>
    </xsl:choose>
    <xsl:apply-templates/>
    <xsl:choose>
      <xsl:when test="contains(@rendition,'#sq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:when test="contains(@rendition,'#dq')">
        <xsl:text></xsl:text>
      </xsl:when>
    </xsl:choose>
  </span>
</xsl:template>
Template lg/l[position() = 1]//q[@next and @prev]
Documentation
<xdoc:doc>
        <xdoc:short>Special quotation</xdoc:short>
        <xdoc:detail>This template matches part of an extended quotation, the first line of a new stanza.  In Swinburne, 
            these lines have an initial double quotation mark.</xdoc:detail>
    </xdoc:doc>
Namespace No namespace
Match lg/l[position() = 1]//q[@next and @prev]
Mode #default
References
Templates
Parameter
Parameters
QName Namespace
rendition No namespace
Import precedence 0
Priority 10
Source
<xsl:template match="lg/l[position() = 1]//q[@next and @prev]" priority="10">
  <xsl:param name="rendition">
    <xsl:value-of select="translate(translate(normalize-space(@rendition), '#sq', ''), '#dq', '')"/>
  </xsl:param>
  <span>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <!-- insteading of calling "rendition" template, need to remove #sq -->
    <xsl:if test="$rendition != ''">
      <xsl:attribute name="class">
        <xsl:value-of select="translate(normalize-space($rendition), '#', '')"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:choose>
      <xsl:when test="contains(@rendition,'#sq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:when test="contains(@rendition,'#dq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:choose>
          <xsl:when test="$quotation_format = 'single'">
            <xsl:text></xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text></xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template lg/l[position() = 1]//q[@prev and not(@next)]
Namespace No namespace
Match lg/l[position() = 1]//q[@prev and not(@next)]
Mode #default
References
Templates
Parameter
Parameters
QName Namespace
rendition No namespace
Import precedence 0
Priority 10
Source
<xsl:template match="lg/l[position() = 1]//q[@prev and not(@next)]" priority="10">
  <xsl:param name="rendition">
    <xsl:value-of select="translate(translate(normalize-space(@rendition), '#sq', ''), '#dq', '')"/>
  </xsl:param>
  <span>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <!-- insteading of calling "rendition" template, need to remove #sq -->
    <xsl:if test="$rendition != ''">
      <xsl:attribute name="class">
        <xsl:value-of select="translate(normalize-space($rendition), '#', '')"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:choose>
      <xsl:when test="contains(@rendition,'#sq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:when test="contains(@rendition,'#dq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:choose>
          <xsl:when test="$quotation_format = 'single'">
            <xsl:text></xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text></xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:apply-templates/>
    <xsl:choose>
      <xsl:when test="contains(@rendition,'#sq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:when test="contains(@rendition,'#dq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:choose>
          <xsl:when test="$quotation_format = 'single'">
            <xsl:text></xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text></xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:otherwise>
    </xsl:choose>
  </span>
</xsl:template>
Template q[@next and @prev]
Namespace No namespace
Match q[@next and @prev]
Mode #default
References
Templates
Parameters
QName Namespace
rendition No namespace
Import precedence 0
Source
<xsl:template match="q[@next and @prev]">
  <xsl:param name="rendition">
    <xsl:value-of select="translate(translate(normalize-space(@rendition), '#sq', ''), '#dq', '')"/>
  </xsl:param>
  <span>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <!-- insteading of calling "rendition" template, need to remove #sq -->
    <xsl:if test="$rendition != ''">
      <xsl:attribute name="class">
        <xsl:value-of select="translate(normalize-space($rendition), '#', '')"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template q[@next and not(@prev)]
Documentation

Description

 first part of multi-part quote gets opening quotation mark 
Namespace No namespace
Match q[@next and not(@prev)]
Mode #default
References
Templates
Parameter
Parameters
QName Namespace
rendition No namespace
Import precedence 0
Source
<xsl:template match="q[@next and not(@prev)]">
  <xsl:param name="rendition">
    <xsl:value-of select="translate(translate(normalize-space(@rendition), '#sq', ''), '#dq', '')"/>
  </xsl:param>
  <span>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <!-- insteading of calling "rendition" template, need to remove #sq -->
    <xsl:if test="$rendition != ''">
      <xsl:attribute name="class">
        <xsl:value-of select="translate(normalize-space(@rendition), '#', '')"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:choose>
      <xsl:when test="contains(@rendition,'#sq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:when test="contains(@rendition,'#dq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:choose>
          <xsl:when test="$quotation_format = 'single'">
            <xsl:text></xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text></xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template q[@prev and not(@next)]
Documentation

Description

 final part of multi-part quote gets closing quotation mark 
Namespace No namespace
Match q[@prev and not(@next)]
Mode #default
References
Templates
Parameter
Parameters
QName Namespace
rendition No namespace
Import precedence 0
Source
<xsl:template match="q[@prev and not(@next)]">
  <xsl:param name="rendition">
    <xsl:value-of select="translate(translate(normalize-space(@rendition), '#sq', ''), '#dq', '')"/>
  </xsl:param>
  <span>
    <xsl:call-template name="id"/>
    <xsl:call-template name="rend"/>
    <!-- insteading of calling "rendition" template, need to remove #sq -->
    <xsl:if test="$rendition != ''">
      <xsl:attribute name="class">
        <xsl:value-of select="translate(normalize-space(@rendition), '#', '')"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:apply-templates/>
    <xsl:choose>
      <xsl:when test="contains(@rendition,'#sq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:when test="contains(@rendition,'#dq')">
        <xsl:text></xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:choose>
          <xsl:when test="$quotation_format = 'single'">
            <xsl:text></xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text></xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:otherwise>
    </xsl:choose>
  </span>
</xsl:template>
Template pb[@facs = 'dummy']
Documentation

Description

 pb 
Namespace No namespace
Match pb[@facs = 'dummy']
Mode #default
Import precedence 0
Source
<xsl:template match="pb[@facs = 'dummy']"/>
Template pb-handler
Namespace No namespace
Used by
Template
References
Template
Parameters
QName Namespace
page-id No namespace
pn No namespace
Import precedence 0
Source
<xsl:template name="pb-handler">
  <xsl:param name="pn"/>
  <xsl:param name="page-id"/>
  <span class="page-num">
    <xsl:call-template name="atts"/>
    <span class="pbNote">page: </span>
    <xsl:value-of select="@n"/>
    <xsl:text> </xsl:text>
  </span>
</xsl:template>
Template pb
Namespace No namespace
Match pb
Mode #default
References
Parameter
Template
Parameters
QName Namespace
pn No namespace
Import precedence 0
Source
<xsl:template match="pb">
  <xsl:param name="pn">
    <xsl:number count="//pb" level="any"/>
  </xsl:param>
  <xsl:if test="$displayPageBreaks = true()">
    <xsl:choose>
      <xsl:when test="parent::table">
        <tr>
          <td class="pb">
            <xsl:call-template name="pb-handler">
              <xsl:with-param name="pn" select="$pn"/>
              <xsl:with-param name="page-id" select="@facs"/>
            </xsl:call-template>
          </td>
        </tr>
      </xsl:when>
      <xsl:otherwise>
        <span class="pb">
          <xsl:call-template name="pb-handler">
            <xsl:with-param name="pn" select="$pn"/>
            <xsl:with-param name="page-id" select="@facs"/>
          </xsl:call-template>
        </span>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:if>
</xsl:template>
Template fw
Namespace No namespace
Match fw
Mode #default
References
Templates
Import precedence 0
Source
<xsl:template match="fw">
  <span>
    <xsl:call-template name="rendition"/>
    <xsl:call-template name="id"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Template space[@dim='vertical']
Namespace No namespace
Match space[@dim='vertical']
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="space[@dim='vertical']">
  <xsl:call-template name="verticalSpace">
    <xsl:with-param name="quantity">
      <xsl:value-of select="number(@quantity)"/>
    </xsl:with-param>
  </xsl:call-template>
</xsl:template>
Template verticalSpace
Namespace No namespace
Used by
References
Template
Parameters
QName Namespace
quantity No namespace
Import precedence 0
Source
<xsl:template name="verticalSpace">
  <xsl:param name="quantity"/>
  <xsl:choose>
    <xsl:when test="@quantity and $quantity > 0">
      <br/>
      <xsl:call-template name="verticalSpace">
        <xsl:with-param name="quantity">
          <xsl:value-of select="$quantity - 1"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise/>
  </xsl:choose>
</xsl:template>
Template pagePanel
Documentation

Description

 so prose page breaks aren't rendered 
    <xsl:template match="p//lb"/>
    
Namespace No namespace
References
Variable
Parameters
QName Namespace
fid No namespace
fn No namespace
id No namespace
n No namespace
pid No namespace
pn No namespace
Import precedence 0
Source
<xsl:template name="pagePanel">
  <!-- work in progress -->
  <xsl:param name="id"/>
  <xsl:param name="n"/>
  <!-- following page -->
  <xsl:param name="fid"/>
  <xsl:param name="fn"/>
  <!-- previous page -->
  <xsl:param name="pid"/>
  <xsl:param name="pn"/>
  <div style="visibility: hidden;" class="pMedRoot">
    <xsl:attribute name="id">
      <xsl:value-of select="concat($id,'_screen')"/>
    </xsl:attribute>
    <span class="pHandleLt">
      <xsl:value-of select="concat($n,'  ')"/>
    </span>
    <xsl:if test="$fid != ''">
      <a class="pHandleLink">
        <!-- onclick="showImgPanel(event, '1v_screen','img/ALCH00109-1v-screen.jpg');" -->
        <xsl:attribute name="title">
          <xsl:value-of select="concat('View page ', $fn)"/>
        </xsl:attribute>
        <xsl:attribute name="onclick">
          <xsl:value-of select="concat('showImgPanel(event, ',$apos,$fn, $apos,$pn,'_screen',$apos,',img/',$fid,'-screen.jpg',$apos)"/>
        </xsl:attribute>
      </a>
    </xsl:if>
  </div>
</xsl:template>
Template *[@copyOf]
Namespace No namespace
Match *[@copyOf]
Mode #default
Import precedence 0
Priority 1
Source
<xsl:template match="*[@copyOf]" priority="1">
  <xsl:apply-templates select="id(substring-after(@copyOf,'#'))"/>
</xsl:template>
Template milestone[@type='hr']
Namespace No namespace
Match milestone[@type='hr']
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="milestone[@type='hr']">
  <hr>
    <xsl:call-template name="atts"/>
  </hr>
</xsl:template>
Template milestone[contains(@rendition,'#hr')]
Namespace No namespace
Match milestone[contains(@rendition,'#hr')]
Mode #default
References
Template
Import precedence 0
Source
<xsl:template match="milestone[contains(@rendition,'#hr')]">
  <hr>
    <xsl:call-template name="atts"/>
  </hr>
</xsl:template>
Template date
Documentation

Description

 using parse date in old TEI version when format was YYYYMMDD, without hyphens 
<xsl:template name="parse-date">
    <xsl:param name="date"/>
    <xsl:value-of select="concat(substring($date,1,4),'-',substring($date,5,2),'-',substring(@when,6,2))"/>
</xsl:template>
 date just copied from P4, need to clean up 
Namespace No namespace
Match date
Mode #default
References
Parameters
Template
Import precedence 0
Source
<xsl:template match="date">
  <xsl:choose>
    <xsl:when test="$tooltipDates = true()">
      <xsl:choose>
        <!-- test for attribute and that attribute containts more that
                        a four-digit year -->
        <xsl:when test="(@when | @from | @to)">
          <xsl:choose>
            <xsl:when test="name() = 'date'">
              <span class="tooltip" onmouseout="hideTip()">
                <xsl:call-template name="atts"/>
                <xsl:attribute name="onmouseover">
                  <xsl:text>doTooltip(event,'</xsl:text>
                  <xsl:value-of select="@when"/>
                  <xsl:text>')</xsl:text>
                </xsl:attribute>
                <xsl:apply-templates/>
              </span>
            </xsl:when>
            <!-- dateRange -->
            <xsl:otherwise>
              <span class="tooltip" onmouseout="hideTip()">
                <xsl:call-template name="atts"/>
                <xsl:attribute name="onmouseover">
                  <xsl:text>doTooltip(event,'<div></xsl:text>
                  <xsl:value-of select="$headerFrom"/>
                  <xsl:text> </xsl:text>
                  <xsl:value-of select="@from"/>
                  <xsl:text><br/></xsl:text>
                  <xsl:value-of select="$headerTo"/>
                  <xsl:text> </xsl:text>
                  <xsl:value-of select="@to"/>
                  <xsl:text>')</xsl:text>
                </xsl:attribute>
                <xsl:apply-templates/>
              </span>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:when>
        <xsl:otherwise>
          <span>
            <xsl:call-template name="atts"/>
            <xsl:apply-templates/>
          </span>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:when>
    <xsl:otherwise>
      <span>
        <xsl:call-template name="atts"/>
        <xsl:choose>
          <!-- if date or dateRange is empty, then display @value or @from and @to -->
          <xsl:when test="not(child::*) and not(text())">
            <xsl:choose>
              <xsl:when test="name() = 'date'">
                <xsl:value-of select="@when"/>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="@from"/>
                <xsl:text></xsl:text>
                <xsl:value-of select="@to"/>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:when>
          <xsl:otherwise>
            <xsl:apply-templates/>
          </xsl:otherwise>
        </xsl:choose>
      </span>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template ab[@type = 'exam-answer']
Namespace No namespace
Match ab[@type = 'exam-answer']
Mode #default
Import precedence 0
Source
<xsl:template match="ab[@type = 'exam-answer']">
  <span class="exam-answer"/>
</xsl:template>
Template gap
Namespace No namespace
Match gap
Mode #default
References
Import precedence 0
Source
<xsl:template match="gap">
  <xsl:choose>
    <xsl:when test="contains(@reason,'cancelled')">
      <span class="tooltip" onmouseover="doTooltip(event,'<b>reason</b>: cancelled and illegible')" onmouseout="hideTip()">
        <xsl:value-of select="$preEditorialIntervention"/>
        <i>illeg.</i>
        <xsl:value-of select="$postEditorialIntervention"/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <span class="tooltip" onmouseover="doTooltip(event,'reason: unknown')" onmouseout="hideTip()">
        <xsl:value-of select="$preEditorialIntervention"/>
        <i>illeg.</i>
        <xsl:value-of select="$postEditorialIntervention"/>
      </span>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template date[@type='today']
Namespace No namespace
Match date[@type='today']
Mode #default
Import precedence 0
Source
<xsl:template match="date[@type='today']">
  <xsl:variable name="dt">
    <xsl:value-of select="current-dateTime()"/>
  </xsl:variable>
  <xsl:variable name="year">
    <xsl:value-of select="year-from-dateTime($dt)"/>
  </xsl:variable>
  <xsl:variable name="month">
    <xsl:value-of select="month-from-dateTime($dt)"/>
  </xsl:variable>
  <xsl:variable name="month-word">
    <xsl:choose>
      <xsl:when test="$month = '01' or $month = '1'">
        <xsl:value-of select="'January'"/>
      </xsl:when>
      <xsl:when test="$month = '02' or $month = '2'">
        <xsl:value-of select="'February'"/>
      </xsl:when>
      <xsl:when test="$month = '03' or $month = '3'">
        <xsl:value-of select="'March'"/>
      </xsl:when>
      <xsl:when test="$month = '04'or $month = '4'">
        <xsl:value-of select="'April'"/>
      </xsl:when>
      <xsl:when test="$month = '05' or $month = '5'">
        <xsl:value-of select="'May'"/>
      </xsl:when>
      <xsl:when test="$month = '06' or $month = '6'">
        <xsl:value-of select="'June'"/>
      </xsl:when>
      <xsl:when test="$month = '07' or $month = '7'">
        <xsl:value-of select="'July'"/>
      </xsl:when>
      <xsl:when test="$month = '08' or $month = '8'">
        <xsl:value-of select="'August'"/>
      </xsl:when>
      <xsl:when test="$month = '09' or $month = '9'">
        <xsl:value-of select="'September'"/>
      </xsl:when>
      <xsl:when test="$month = '10'">
        <xsl:value-of select="'October'"/>
      </xsl:when>
      <xsl:when test="$month = '11'">
        <xsl:value-of select="'November'"/>
      </xsl:when>
      <xsl:when test="$month = '12'">
        <xsl:value-of select="'December'"/>
      </xsl:when>
    </xsl:choose>
  </xsl:variable>
  <xsl:variable name="day">
    <xsl:value-of select="day-from-dateTime($dt)"/>
  </xsl:variable>
  <xsl:variable name="day-num">
    <xsl:choose>
      <xsl:when test="substring($day,1,1) = '0'">
        <xsl:value-of select="substring($day,2,1)"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$day"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <xsl:value-of select="concat($day-num,' ',$month-word,' ',$year)"/>
</xsl:template>
Template *[@sameAs]
Namespace No namespace
Match *[@sameAs]
Mode #default
Parameters
QName Namespace Select
id No namespace substring-after(@sameAs,'#')
Import precedence 0
Priority 10
Source
<xsl:template match="*[@sameAs]" priority="10">
  <xsl:param name="id" select="substring-after(@sameAs,'#')"/>
  <xsl:apply-templates select="//*[@xml:id = $id]"/>
</xsl:template>
Template note[@type = 'metadata']
Namespace No namespace
Match note[@type = 'metadata']
Mode #default
Import precedence 0
Source
<xsl:template match="note[@type = 'metadata']"/>
Template u
Documentation

Description

 utterance 
Namespace No namespace
Match u
Mode #default
Import precedence 0
Source
<xsl:template match="u">
  <div>
    <strong>
      <xsl:apply-templates select="id(substring-after(@who,'#'))"/>
    </strong>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Template fw[@type = 'header']
Documentation

Description

 suppressed elements 
Namespace No namespace
Match fw[@type = 'header']
Mode #default
Import precedence 0
Source
<xsl:template match="fw[@type = 'header']"/>
Parameter quotation_format
Documentation

Description

 debugging template 
match
    <xsl:template match="*">
        <xsl:message>
            <xsl:value-of select="concat(name(),': ')"/> ELEMENT UNACCOUNTED FOR BY STYLESHEET:
        </xsl:message>
        <xsl:apply-templates/>
    </xsl:template>
 Check for single or double quotation mark format 
Namespace No namespace
Type xs:string
Used by
Source
<xsl:param name="quotation_format" as="xs:string">
  <xsl:value-of select="TEI/teiHeader/encodingDesc/editorialDecl/quotation//*[@xml:id='quotation_format']"/>
</xsl:param>