Showing:

Documentation
Parameters
Used by
References
Supersedes
Overriding
Included from
Source
Stylesheet core.xsl
Documentation

Description

TEI stylesheet dealing with elements from the core module, making HTML output.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Author: See AUTHORS

Id: $Id: core.xsl 7901 2010-07-25 11:43:34Z rahtz $

Copyright: 2008, TEI Consortium

Included from
Stylesheet version 2.0
Template tei:*maketoc
Documentation

Description

Process elements tei:*

anything with a head can go in the TOC

Parameters

forcedepth forcedepth

Namespace No namespace
Match tei:*
Mode maketoc
References
Parameters autoHead; tocDepth
Templates continuedToc; header
Parameters
QName Namespace
forcedepth No namespace
Import precedence 3
Source
<xsl:template match="tei:*" mode="maketoc">
  <xsl:param name="forcedepth"/>
  <xsl:variable name="myName">
    <xsl:value-of select="local-name(.)"/>
  </xsl:variable>
  <xsl:if test="tei:head or $autoHead='true'">
    <xsl:variable name="Depth">
      <xsl:choose>
        <xsl:when test="not($forcedepth='')">
          <xsl:value-of select="$forcedepth"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="$tocDepth"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="thislevel">
      <xsl:choose>
        <xsl:when test="$myName = 'div'">
          <xsl:value-of select="count(ancestor::tei:div)"/>
        </xsl:when>
        <xsl:when test="starts-with($myName,'div')">
          <xsl:value-of select="number(substring-after($myName,'div')) - 1"/>
        </xsl:when>
        <xsl:otherwise>99</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="pointer">
      <xsl:apply-templates mode="generateLink" select="."/>
    </xsl:variable>
    <li class="toc">
      <xsl:call-template name="header">
        <xsl:with-param name="toc" select="$pointer"/>
        <xsl:with-param name="minimal">false</xsl:with-param>
        <xsl:with-param name="display">plain</xsl:with-param>
      </xsl:call-template>
      <xsl:if test="$thislevel < $Depth">
        <xsl:call-template name="continuedToc"/>
      </xsl:if>
    </li>
  </xsl:if>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:ab
Documentation

Description

Process element ab
Namespace No namespace
Match tei:ab
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:ab">
  <xsl:choose>
    <xsl:when test="parent::tei:title or parent::tei:stage">
      <xsl:apply-templates/>
      <xsl:if test="following-sibling::tei:ab">
        <br/>
      </xsl:if>
    </xsl:when>
    <xsl:otherwise>
      <div>
        <xsl:call-template name="rendToClass"/>
        <xsl:apply-templates/>
      </div>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:addrLine
Documentation

Description

Process element addrLine
Namespace No namespace
Match tei:addrLine
Mode #default
Import precedence 3
Source
<xsl:template match="tei:addrLine">
  <xsl:apply-templates/>
  <br/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:address
Documentation

Description

Process element address
Namespace No namespace
Match tei:address
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:address">
  <address>
    <xsl:call-template name="rendToClass"/>
    <xsl:apply-templates/>
  </address>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:bibl
Documentation

Description

Process element bibl
Namespace No namespace
Match tei:bibl
Mode #default
Import precedence 3
Source
<xsl:template match="tei:bibl">
  <xsl:choose>
    <xsl:when test="parent::tei:cit">
      <div class="citbibl">
        <xsl:text>(</xsl:text>
        <xsl:apply-templates/>
        <xsl:text>)</xsl:text>
      </div>
    </xsl:when>
    <xsl:otherwise>
      <span>
        <xsl:attribute name="class">
          <xsl:text>bibl</xsl:text>
          <xsl:if test="@type">
            <xsl:text> bibl-</xsl:text>
            <xsl:value-of select="@type"/>
          </xsl:if>
        </xsl:attribute>
        <xsl:apply-templates/>
      </span>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:byline
Documentation

Description

Process element byline
Namespace No namespace
Match tei:byline
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:byline">
  <div>
    <xsl:call-template name="rendToClass"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:change
Documentation

Description

Process element change
Namespace No namespace
Match tei:change
Mode #default
Import precedence 3
Source
<xsl:template match="tei:change">
  <tr>
    <td valign="top" width="15%">
      <xsl:value-of select="tei:date"/>
    </td>
    <td width="85%">
      <xsl:value-of select="tei:item"/>
    </td>
  </tr>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:choice
Documentation

Description

Process element choice
Namespace No namespace
Match tei:choice
Mode #default
Import precedence 3
Source
<xsl:template match="tei:choice">
  <xsl:choose>
    <xsl:when test="tei:abbr and tei:expan">
      <xsl:apply-templates select="tei:expan"/>
      <xsl:text> (</xsl:text>
      <xsl:apply-templates select="tei:abbr"/>
      <xsl:text>)</xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:cit
Documentation

Description

Process element cit

quoting

Namespace No namespace
Match tei:cit
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:cit">
  <xsl:choose>
    <xsl:when test="@rend='display'">
      <blockquote>
        <xsl:call-template name="rendToClass"/>
        <p>
          <xsl:if test="@n">
            <xsl:text>(</xsl:text>
            <xsl:value-of select="@n"/>
            <xsl:text>) </xsl:text>
          </xsl:if>
          <xsl:apply-templates select="tei:q|tei:quote"/>
          <xsl:apply-templates select="tei:bibl"/>
        </p>
      </blockquote>
    </xsl:when>
    <xsl:when test="tei:bibl">
      <div>
        <xsl:call-template name="rendToClass"/>
        <xsl:if test="@n">
          <xsl:text>(</xsl:text>
          <xsl:value-of select="@n"/>
          <xsl:text>) </xsl:text>
        </xsl:if>
        <xsl:apply-templates/>
      </div>
    </xsl:when>
    <xsl:otherwise>
      <span>
        <xsl:call-template name="rendToClass"/>
        <xsl:if test="@n">
          <xsl:text>(</xsl:text>
          <xsl:value-of select="@n"/>
          <xsl:text>) </xsl:text>
        </xsl:if>
        <xsl:apply-templates/>
      </span>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:code
Documentation

Description

Process element code
Namespace No namespace
Match tei:code
Mode #default
Import precedence 3
Source
<xsl:template match="tei:code">
  <code>
    <xsl:apply-templates/>
  </code>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:corr
Documentation

Description

Does not do anything yet.
Namespace No namespace
Match tei:corr
Mode #default
Supersedes
Template tei:corr
Import precedence 3
Source
<xsl:template match="tei:corr">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:del
Documentation

Description

Namespace No namespace
Match tei:del
Mode #default
Import precedence 3
Source
<xsl:template match="tei:del">
  <del>
    <xsl:apply-templates/>
  </del>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:eg
Documentation

Description

Process element eg
Namespace No namespace
Match tei:eg
Mode #default
References
Parameter cssFile
Import precedence 3
Source
<xsl:template match="tei:eg">
  <div>
    <xsl:if test="$cssFile">
      <xsl:attribute name="class">
        <xsl:text>pre_eg</xsl:text>
        <xsl:if test="not(*)">
          <xsl:text> cdata</xsl:text>
        </xsl:if>
      </xsl:attribute>
    </xsl:if>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:emph
Documentation

Description

Process element emph
Namespace No namespace
Match tei:emph
Mode #default
References
Import precedence 3
Source
<xsl:template match="tei:emph">
  <xsl:choose>
    <xsl:when test="@rend">
      <xsl:call-template name="rendering"/>
    </xsl:when>
    <xsl:when test="@rendition">
      <span>
        <xsl:call-template name="applyRendition"/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <em>
        <xsl:apply-templates/>
      </em>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:epigraph
Documentation

Description

Process element epigraph
Namespace No namespace
Match tei:epigraph
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:epigraph">
  <div>
    <xsl:call-template name="rendToClass"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:epigraph/tei:lg
Documentation

Description

Process element epigraph/lg
Namespace No namespace
Match tei:epigraph/tei:lg
Mode #default
Import precedence 3
Source
<xsl:template match="tei:epigraph/tei:lg">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:foreign|tei:unclear
Documentation

Description

Process element foreign and unclear
Namespace No namespace
Match tei:foreign|tei:unclear
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:foreign|tei:unclear">
  <span>
    <xsl:call-template name="rendToClass"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:caesura
Documentation

Description

Process element caesura
Namespace No namespace
Match tei:caesura
Mode #default
Import precedence 3
Source
<xsl:template match="tei:caesura">
  <span class="caesura">    </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:gap
Documentation

Description

Process element gap
Namespace No namespace
Match tei:gap
Mode #default
Import precedence 3
Source
<xsl:template match="tei:gap">
  <span class="gap">
    <xsl:if test="tei:desc">
      <xsl:attribute name="title">
        <xsl:value-of select="tei:desc"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:text> [...]</xsl:text>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:gi
Documentation

Description

Process element gi

special purpose

Namespace No namespace
Match tei:gi
Mode #default
Import precedence 3
Source
<xsl:template match="tei:gi">
  <span class="gi">
    <xsl:text><</xsl:text>
    <xsl:apply-templates/>
    <xsl:text>></xsl:text>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:giplain
Documentation

Description

Process element gi
Namespace No namespace
Match tei:gi
Mode plain
Import precedence 3
Source
<xsl:template match="tei:gi" mode="plain">
  <span class="gi">
    <xsl:text><</xsl:text>
    <xsl:apply-templates/>
    <xsl:text>></xsl:text>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:att
Documentation

Description

Process element att

special purpose

Namespace No namespace
Match tei:att
Mode #default
Import precedence 3
Source
<xsl:template match="tei:att">
  <span class="gi">
    <b>@<xsl:apply-templates/>
    </b>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:gloss
Documentation

Description

Namespace No namespace
Match tei:gloss
Mode #default
Import precedence 3
Source
<xsl:template match="tei:gloss">
  <span class="gloss">
    <xsl:apply-templates/>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:head
Documentation

Description

Process element head

headings etc

Namespace No namespace
Match tei:head
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:head">
  <xsl:variable name="parent" select="local-name(..)"/>
  <xsl:choose>
    <xsl:when test="parent::tei:body">
      <h1>
        <xsl:call-template name="rendToClass"/>
        <xsl:apply-templates/>
      </h1>
    </xsl:when>
    <xsl:when test="not(starts-with($parent,'div'))">
      <xsl:apply-templates/>
    </xsl:when>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:headplain
Documentation

Description

Process element head in plain mode
Namespace No namespace
Match tei:head
Mode plain
Import precedence 3
Source
<xsl:template match="tei:head" mode="plain">
  <xsl:if test="preceding-sibling::tei:head">
    <xsl:text> </xsl:text>
  </xsl:if>
  <xsl:apply-templates mode="plain"/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:headmakeheading
Documentation

Description

Process element head in heading mode
Namespace No namespace
Match tei:head
Mode makeheading
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:head" mode="makeheading">
  <xsl:if test="preceding-sibling::tei:head">
    <br/>
  </xsl:if>
  <span>
    <xsl:call-template name="rendToClass"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:hi
Documentation

Description

Process element hi
Namespace No namespace
Match tei:hi
Mode #default
References
Import precedence 3
Source
<xsl:template match="tei:hi">
  <xsl:choose>
    <xsl:when test="@rend">
      <xsl:call-template name="rendering"/>
    </xsl:when>
    <xsl:when test="@rendition">
      <span>
        <xsl:call-template name="applyRendition"/>
        <xsl:apply-templates/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <strong>
        <xsl:apply-templates/>
      </strong>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:ident
Documentation

Description

Process element ident
Namespace No namespace
Match tei:ident
Mode #default
Import precedence 3
Source
<xsl:template match="tei:ident">
  <xsl:choose>
    <xsl:when test="@type">
      <span class="ident-{@type}">
        <xsl:apply-templates/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <strong>
        <xsl:apply-templates/>
      </strong>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:itembibl
Documentation

Description

Process element item
Namespace No namespace
Match tei:item
Mode bibl
References
Template makeAnchor
Import precedence 3
Source
<xsl:template match="tei:item" mode="bibl">
  <p>
    <xsl:call-template name="makeAnchor"/>
    <xsl:apply-templates/>
  </p>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:itemglosstable
Documentation

Description

Process element item
Namespace No namespace
Match tei:item
Mode glosstable
References
Template makeAnchor
Import precedence 3
Source
<xsl:template match="tei:item" mode="glosstable">
  <tr>
    <td valign="top">
      <strong>
        <xsl:apply-templates mode="print" select="preceding-sibling::tei:*[1]"/>
      </strong>
    </td>
    <td>
      <xsl:call-template name="makeAnchor"/>
      <xsl:apply-templates/>
    </td>
  </tr>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:itemgloss
Documentation

Description

Process element item
Namespace No namespace
Match tei:item
Mode gloss
References
Template makeAnchor
Import precedence 3
Source
<xsl:template match="tei:item" mode="gloss">
  <dt>
    <xsl:call-template name="makeAnchor"/>
    <xsl:apply-templates mode="print" select="preceding-sibling::tei:label[1]"/>
  </dt>
  <dd>
    <xsl:apply-templates/>
  </dd>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:item
Documentation

Description

Process element item
Namespace No namespace
Match tei:item
Mode #default
References
Import precedence 3
Source
<xsl:template match="tei:item">
  <li>
    <xsl:call-template name="rendToClass"/>
    <xsl:if test="@n">
      <xsl:attribute name="value">
        <xsl:value-of select="@n"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:choose>
      <xsl:when test="@xml:id">
        <xsl:call-template name="makeAnchor">
          <xsl:with-param name="name">
            <xsl:value-of select="@xml:id"/>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:when test="$generateParagraphIDs='true'">
        <xsl:call-template name="makeAnchor">
          <xsl:with-param name="name">
            <xsl:value-of select="generate-id()"/>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:when>
    </xsl:choose>
    <xsl:apply-templates/>
  </li>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:iteminline
Documentation

Description

Process element item
Namespace No namespace
Match tei:item
Mode inline
Import precedence 3
Source
<xsl:template match="tei:item" mode="inline">
  <xsl:if test="preceding-sibling::tei:item">,</xsl:if>
  <xsl:if test="not(following-sibling::tei:item) and preceding-sibling::tei:item">and</xsl:if>
  <xsl:text></xsl:text>
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:item/tei:label
Documentation

Description

Process element item/tei:label
Namespace No namespace
Match tei:item/tei:label
Mode #default
References
Import precedence 3
Source
<xsl:template match="tei:item/tei:label">
  <xsl:choose>
    <xsl:when test="@rend">
      <xsl:call-template name="rendering"/>
    </xsl:when>
    <xsl:when test="@rendition">
      <span>
        <xsl:call-template name="applyRendition"/>
        <xsl:apply-templates/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <strong>
        <xsl:apply-templates/>
      </strong>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:lCopying
Documentation

Description

Process element l
Namespace No namespace
Match tei:l
Mode Copying
Import precedence 3
Source
<xsl:template match="tei:l" mode="Copying">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:l[@copyOf]|lg[@copyOf]
Documentation

Description

Process element l[@copyOf]|lg[@copyOf]

copyOf handling

Namespace No namespace
Match tei:l[@copyOf]|lg[@copyOf]
Mode #default
References
Key IDS
Import precedence 3
Source
<xsl:template match="tei:l[@copyOf]|lg[@copyOf]">
  <xsl:variable name="W">
    <xsl:choose>
      <xsl:when test="starts-with(@copyof,'#')">
        <xsl:value-of select="substring-after(@copyof,'#')"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="@copyof"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <xsl:apply-templates mode="Copying" select="key('IDS',$W)"/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:label
Documentation

Description

Process element label
Namespace No namespace
Match tei:label
Mode #default
References
Template makeAnchor
Import precedence 3
Source
<xsl:template match="tei:label">
  <span>
    <xsl:call-template name="makeAnchor"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:labelprint
Documentation

Description

Process element label
Namespace No namespace
Match tei:label
Mode print
References
Import precedence 3
Source
<xsl:template match="tei:label" mode="print">
  <span>
    <xsl:call-template name="makeAnchor"/>
    <xsl:choose>
      <xsl:when test="@rend">
        <xsl:call-template name="rendering"/>
      </xsl:when>
      <xsl:when test="@rendition">
        <span>
          <xsl:call-template name="applyRendition"/>
          <xsl:apply-templates/>
        </span>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates/>
      </xsl:otherwise>
    </xsl:choose>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:lb
Documentation

Description

Process element lb
Namespace No namespace
Match tei:lb
Mode #default
Import precedence 3
Source
<xsl:template match="tei:lb">
  <xsl:choose>
    <xsl:when test="parent::tei:body"/>
    <xsl:when test="parent::tei:back"/>
    <xsl:when test="parent::tei:front"/>
    <xsl:otherwise>
      <br>
        <xsl:if test="@rend and not(@rend='-')">
          <xsl:attribute name="class" select="@rend"/>
        </xsl:if>
      </br>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:l
Documentation

Description

Process element l
Namespace No namespace
Match tei:l
Mode #default
References
Template rendToClass
Overriding
Template tei:l
Import precedence 3
Source
<xsl:template match="tei:l">
  <div>
    <xsl:call-template name="rendToClass"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:lg
Documentation

Description

Process element lg
Namespace No namespace
Match tei:lg
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:lg">
  <div>
    <xsl:call-template name="rendToClass"/>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:lg/tei:l
Documentation

Description

Process element lg/tei:l
Namespace No namespace
Match tei:lg/tei:l
Mode #default
References
Template applyRendition
Import precedence 3
Source
<xsl:template match="tei:lg/tei:l">
  <div>
    <xsl:attribute name="class">
      <xsl:choose>
        <xsl:when test="@rend='Alignr'">
          <xsl:text>right</xsl:text>
        </xsl:when>
        <xsl:when test="@rend='Alignc'">
          <xsl:text>center</xsl:text>
        </xsl:when>
        <xsl:when test="starts-with(@rend,'indent(')">
          <xsl:text>indent</xsl:text>
          <xsl:value-of select="concat(substring-before(substring-after(@rend,'('),')'),'em')"/>
        </xsl:when>
        <xsl:when test="@rend='indent'">
          <xsl:text>indent1</xsl:text>
        </xsl:when>
        <xsl:when test="@rend">
          <xsl:attribute name="class">
            <xsl:value-of select="@rend"/>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="@rendition">
          <xsl:call-template name="applyRendition"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:attribute name="class">
            <xsl:value-of select="local-name()"/>
          </xsl:attribute>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:attribute>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:lgCopying
Documentation

Description

Process element lg
Namespace No namespace
Match tei:lg
Mode Copying
Import precedence 3
Source
<xsl:template match="tei:lg" mode="Copying">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:list
Documentation

Description

Process element list

Lists. Depending on the value of the 'type' attribute, various HTML lists are generated:

bibl
Items are processed in mode 'bibl'
catalogue
A gloss list is created, inside a paragraph
gloss
A gloss list is created, expecting alternate label and item elements
glosstable
Label and item pairs are laid out in a two-column table
inline
A comma-separate inline list
runin
An inline list with bullets between items
unordered
A simple unordered list
ordered
A simple ordered list
valList
(Identical to glosstable)

Namespace No namespace
Match tei:list
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:list">
  <xsl:if test="tei:head">
    <p class="listhead">
      <xsl:apply-templates select="tei:head"/>
    </p>
  </xsl:if>
  <xsl:choose>
    <xsl:when test="@type='catalogue'">
      <p>
        <dl>
          <xsl:call-template name="rendToClass">
            <xsl:with-param name="default"/>
          </xsl:call-template>
          <xsl:for-each select="tei:item">
            <p/>
            <xsl:apply-templates mode="gloss" select="."/>
          </xsl:for-each>
        </dl>
      </p>
    </xsl:when>
    <xsl:when test="@type='gloss' and @rend='multicol'">
      <xsl:variable name="nitems">
        <xsl:value-of select="count(tei:item)div 2"/>
      </xsl:variable>
      <p>
        <table>
          <xsl:call-template name="rendToClass">
            <xsl:with-param name="default"/>
          </xsl:call-template>
          <tr>
            <td valign="top">
              <dl>
                <xsl:apply-templates mode="gloss" select="tei:item[position()<=$nitems ]"/>
              </dl>
            </td>
            <td valign="top">
              <dl>
                <xsl:apply-templates mode="gloss" select="tei:item[position() >$nitems]"/>
              </dl>
            </td>
          </tr>
        </table>
      </p>
    </xsl:when>
    <xsl:when test="@type='gloss' or  tei:label">
      <dl>
        <xsl:call-template name="rendToClass">
          <xsl:with-param name="default"/>
        </xsl:call-template>
        <xsl:apply-templates mode="gloss" select="tei:item"/>
      </dl>
    </xsl:when>
    <xsl:when test="@type='glosstable' or @type='valList'">
      <table>
        <xsl:call-template name="rendToClass">
          <xsl:with-param name="default"/>
        </xsl:call-template>
        <xsl:apply-templates mode="glosstable" select="tei:item"/>
      </table>
    </xsl:when>
    <xsl:when test="@type='inline'">
      <!--<xsl:if test="not(tei:item)">None</xsl:if>-->
      <xsl:apply-templates mode="inline" select="tei:item"/>
    </xsl:when>
    <xsl:when test="@type='runin'">
      <p>
        <xsl:apply-templates mode="runin" select="tei:item"/>
      </p>
    </xsl:when>
    <xsl:when test="@type='unordered' or @type='simple'">
      <ul>
        <xsl:call-template name="rendToClass">
          <xsl:with-param name="default"/>
        </xsl:call-template>
        <xsl:apply-templates select="tei:item"/>
      </ul>
    </xsl:when>
    <xsl:when test="@type='bibl'">
      <xsl:apply-templates mode="bibl" select="tei:item"/>
    </xsl:when>
    <xsl:when test="starts-with(@type,'ordered')">
      <ol>
        <xsl:call-template name="rendToClass">
          <xsl:with-param name="default"/>
        </xsl:call-template>
        <xsl:if test="starts-with(@type,'ordered:')">
          <xsl:attribute name="start">
            <xsl:value-of select="substring-after(@type,':')"/>
          </xsl:attribute>
        </xsl:if>
        <xsl:apply-templates select="tei:item"/>
      </ol>
    </xsl:when>
    <xsl:otherwise>
      <ul>
        <xsl:call-template name="rendToClass">
          <xsl:with-param name="default"/>
        </xsl:call-template>
        <xsl:apply-templates select="tei:item"/>
      </ul>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:list/tei:label
Documentation

Description

Process element list/tei:label
Namespace No namespace
Match tei:list/tei:label
Mode #default
Import precedence 3
Source
<xsl:template match="tei:list/tei:label"/>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:listBibl
Documentation

Description

Process element listBibl
Namespace No namespace
Match tei:listBibl
Mode #default
References
Variables lc; uc
Template makeAnchor
Import precedence 3
Source
<xsl:template match="tei:listBibl">
  <xsl:choose>
    <xsl:when test="tei:biblStruct">
      <dl class="listBibl">
        <xsl:for-each select="tei:biblStruct">
          <xsl:sort select="translate((tei:*/tei:author/tei:surname|          tei:*[1]/tei:author/tei:orgName|  tei:*[1]/tei:author/tei:name|  tei:*[1]/tei:editor/tei:surname|  tei:*[1]/tei:editor/tei:name|  tei:*[1]/tei:title[1])[1],  $uc,$lc)"/>
          <xsl:sort select="tei:monogr/tei:imprint/tei:date"/>
          <dt>
            <xsl:call-template name="makeAnchor"/>
            <xsl:apply-templates select="." mode="xref"/>
          </dt>
          <dd>
            <xsl:apply-templates select="."/>
          </dd>
        </xsl:for-each>
      </dl>
    </xsl:when>
    <xsl:otherwise>
      <ol class="listBibl">
        <xsl:for-each select="tei:bibl|tei:biblItem">
          <li>
            <xsl:call-template name="makeAnchor">
              <xsl:with-param name="name">
                <xsl:apply-templates mode="ident" select="."/>
              </xsl:with-param>
            </xsl:call-template>
            <xsl:apply-templates select="."/>
          </li>
        </xsl:for-each>
      </ol>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:mentioned
Documentation

Description

Process element mentioned
Namespace No namespace
Match tei:mentioned
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:mentioned">
  <span>
    <xsl:call-template name="rendToClass"/>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:nameplain
Documentation

Description

Process element name in mode "plain"
Namespace No namespace
Match tei:name
Mode plain
References
Template makeAnchor
Import precedence 3
Source
<xsl:template match="tei:name" mode="plain">
  <xsl:variable name="ident">
    <xsl:apply-templates mode="ident" select="."/>
  </xsl:variable>
  <span>
    <xsl:call-template name="makeAnchor">
      <xsl:with-param name="name">
        <xsl:value-of select="$ident"/>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:note
Documentation

Description

Process element note
Namespace No namespace
Match tei:note
Mode #default
References
Import precedence 3
Source
<xsl:template match="tei:note">
  <xsl:variable name="identifier">
    <xsl:text>Note</xsl:text>
    <xsl:call-template name="noteID"/>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="@place='none'"/>
    <xsl:when test="ancestor::tei:bibl">
      <xsl:text>(</xsl:text>
      <xsl:apply-templates/>
      <xsl:text>)</xsl:text>
    </xsl:when>
    <xsl:when test="@place='marg' and tei:p">
      <div class="margnote">
        <xsl:call-template name="makeAnchor">
          <xsl:with-param name="name" select="$identifier"/>
        </xsl:call-template>
        <xsl:apply-templates/>
      </div>
    </xsl:when>
    <xsl:when test="@place='marg'">
      <span class="margnote">
        <xsl:call-template name="makeAnchor">
          <xsl:with-param name="name" select="$identifier"/>
        </xsl:call-template>
        <xsl:apply-templates/>
      </span>
    </xsl:when>
    <xsl:when test="@place='inline'">
      <span>
        <xsl:call-template name="makeAnchor">
          <xsl:with-param name="name" select="$identifier"/>
        </xsl:call-template>
        <xsl:text> (</xsl:text>
        <xsl:apply-templates/>
        <xsl:text>)</xsl:text>
      </span>
    </xsl:when>
    <xsl:when test="@place='display'">
      <blockquote>
        <xsl:call-template name="makeAnchor">
          <xsl:with-param name="name" select="$identifier"/>
        </xsl:call-template>
        <xsl:call-template name="rendToClass"/>
        <p>
          <xsl:apply-templates/>
        </p>
      </blockquote>
    </xsl:when>
    <xsl:when test="@place='foot' or @place='bottom' or @place='end' or $autoEndNotes='true'">
      <span>
        <xsl:call-template name="makeAnchor">
          <xsl:with-param name="name" select="concat($identifier,'_return')"/>
        </xsl:call-template>
        <xsl:choose>
          <xsl:when test="$footnoteFile='true'">
            <a class="notelink" title="Go to note" href="{$masterFile}-notes.html#{$identifier}">
              <sup>
                <xsl:call-template name="noteN"/>
              </sup>
            </a>
          </xsl:when>
          <xsl:otherwise>
            <a class="notelink" title="Go to note" href="#{$identifier}">
              <sup>
                <xsl:call-template name="noteN"/>
              </sup>
            </a>
          </xsl:otherwise>
        </xsl:choose>
      </span>
    </xsl:when>
    <xsl:when test="parent::tei:div">
      <div class="note">
        <xsl:call-template name="makeAnchor">
          <xsl:with-param name="name" select="$identifier"/>
        </xsl:call-template>
        <span class="noteLabel">
          <xsl:call-template name="i18n">
            <xsl:with-param name="word">Note</xsl:with-param>
          </xsl:call-template>
          <xsl:text>: </xsl:text>
        </span>
        <xsl:apply-templates/>
      </div>
    </xsl:when>
    <xsl:otherwise>
      <span>
        <xsl:call-template name="makeAnchor">
          <xsl:with-param name="name" select="$identifier"/>
        </xsl:call-template>
        <xsl:text> [</xsl:text>
        <xsl:call-template name="i18n">
          <xsl:with-param name="word">Note</xsl:with-param>
        </xsl:call-template>
        <xsl:text>: </xsl:text>
        <xsl:apply-templates/>
        <xsl:text>]</xsl:text>
      </span>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:noteprintallnotes
Documentation

Description

Check whether a note should be processed if we are at the top
Namespace No namespace
Match tei:note
Mode printallnotes
References
Parameter splitLevel
Template makeaNote
Import precedence 3
Source
<xsl:template match="tei:note" mode="printallnotes">
  <xsl:choose>
    <xsl:when test="$splitLevel=-1">
      <xsl:call-template name="makeaNote"/>
    </xsl:when>
    <xsl:when test="not(ancestor::tei:div or ancestor::tei:div1)">
      <xsl:call-template name="makeaNote"/>
    </xsl:when>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:noteprintnotes
Documentation

Description

Check whether a note should be processed
Namespace No namespace
Match tei:note
Mode printnotes
References
Parameters autoEndNotes; splitLevel
Template makeaNote
Import precedence 3
Source
<xsl:template match="tei:note" mode="printnotes">
  <xsl:choose>
    <xsl:when test="ancestor::tei:bibl"/>
    <xsl:when test="$splitLevel=-1"/>
    <xsl:when test="@place='foot' or @place='bottom' or @place='end' or $autoEndNotes='true'">
      <xsl:call-template name="makeaNote"/>
    </xsl:when>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template makeaNote
Documentation

Description

Process element note
Namespace No namespace
Used by
References
Templates makeAnchor; noteID; noteN
Parameters footnoteBackLink; verbose
Import precedence 3
Source
<xsl:template name="makeaNote">
  <xsl:variable name="identifier">
    <xsl:text>Note</xsl:text>
    <xsl:call-template name="noteID"/>
  </xsl:variable>
  <xsl:if test="$verbose='true'">
    <xsl:message>Make note
      <xsl:value-of select="$identifier"/>
    </xsl:message>
  </xsl:if>
  <div class="note">
    <xsl:call-template name="makeAnchor">
      <xsl:with-param name="name" select="$identifier"/>
    </xsl:call-template>
    <span class="noteLabel">
      <xsl:call-template name="noteN"/>
      <xsl:text>. </xsl:text>
    </span>
    <div class="noteBody">
      <xsl:apply-templates/>
    </div>
    <xsl:if test="$footnoteBackLink= 'true'">
      <xsl:text> </xsl:text>
      <a class="link_return" title="Go back to text" href="#{concat($identifier,'_return')}"></a>
    </xsl:if>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:note[@type='action']
Documentation

Description

Process element note[@type='action']
Namespace No namespace
Match tei:note[@type='action']
Mode #default
Import precedence 3
Source
<xsl:template match="tei:note[@type='action']">
  <div class="right">
    <b>Action <xsl:number count="tei:note[@type='action']" level="any"/>
    </b>: <i><xsl:apply-templates/></i>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:pb
Documentation

Description

Process element pb

Indication of a page break. For the purposes of HTML, we simply make it an anchor if it has an ID.

Namespace No namespace
Match tei:pb
Mode #default
References
Parameter pagebreakStyle
Templates i18n; makeAnchor; rendToClass
Import precedence 3
Source
<xsl:template match="tei:pb">
  <xsl:choose>
    <xsl:when test="$pagebreakStyle='active'">
      <div class="pagebreak">
        <xsl:call-template name="rendToClass"/>
      </div>
    </xsl:when>
    <xsl:when test="$pagebreakStyle='visible' and parent::tei:body">
      <div class="pagebreak">
        <xsl:call-template name="makeAnchor"/>
        <xsl:text> [</xsl:text>
        <xsl:call-template name="i18n">
          <xsl:with-param name="word">page</xsl:with-param>
        </xsl:call-template>
        <xsl:if test="@n">
          <xsl:text> </xsl:text>
          <xsl:value-of select="@n"/>
        </xsl:if>
        <xsl:text>] </xsl:text>
      </div>
    </xsl:when>
    <xsl:when test="$pagebreakStyle='visible'">
      <span class="pagebreak">
        <xsl:call-template name="makeAnchor"/>
        <xsl:text> [</xsl:text>
        <xsl:call-template name="i18n">
          <xsl:with-param name="word">page</xsl:with-param>
        </xsl:call-template>
        <xsl:if test="@n">
          <xsl:text> </xsl:text>
          <xsl:value-of select="@n"/>
        </xsl:if>
        <xsl:text>] </xsl:text>
      </span>
    </xsl:when>
    <xsl:otherwise/>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:p
Documentation

Description

Process element p
Namespace No namespace
Match tei:p
Mode #default
References
Import precedence 3
Source
<xsl:template match="tei:p">
  <xsl:variable name="wrapperElement">
    <xsl:choose>
      <xsl:when test="tei:q[tei:p]|tei:specList|tei:quote|tei:moduleSpec|tei:list|tei:eg|teix:egXML|tei:table|tei:specGrp|tei:specGrpRef|tei:q[@rend='display']|tei:figure">
        <xsl:text>div</xsl:text>
      </xsl:when>
      <xsl:when test="parent::tei:p">
        <xsl:text>div</xsl:text>
      </xsl:when>
      <xsl:when test="parent::tei:remarks">
        <xsl:text>div</xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:text>p</xsl:text>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <xsl:element name="{$wrapperElement}">
    <xsl:variable name="ident">
      <xsl:choose>
        <xsl:when test="@xml:id">
          <xsl:value-of select="@xml:id"/>
        </xsl:when>
        <xsl:when test="$generateParagraphIDs='true'">
          <xsl:value-of select="generate-id()"/>
        </xsl:when>
      </xsl:choose>
    </xsl:variable>
    <xsl:call-template name="rendToClass">
      <xsl:with-param name="id" select="$ident"/>
      <xsl:with-param name="default">
        <xsl:if test="$wrapperElement='div'">p</xsl:if>
      </xsl:with-param>
    </xsl:call-template>
    <xsl:if test="$numberParagraphs='true'">
      <xsl:text>[</xsl:text>
      <xsl:number/>
      <xsl:text>] </xsl:text>
    </xsl:if>
    <xsl:apply-templates/>
  </xsl:element>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:p[@rend='box']
Documentation

Description

Process element p[@rend='box']
Namespace No namespace
Match tei:p[@rend='box']
Mode #default
Import precedence 3
Source
<xsl:template match="tei:p[@rend='box']">
  <p class="box">
    <xsl:apply-templates/>
  </p>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:q|tei:said
Documentation

Description

Process element q and tei:said
Namespace No namespace
Match tei:q|tei:said
Mode #default
References
Template makeQuote
Import precedence 3
Source
<xsl:template match="tei:q|tei:said">
  <xsl:choose>
    <xsl:when test="tei:p|tei:floatingText|tei:lg|tei:l">
      <div class="blockquote">
        <xsl:apply-templates/>
      </div>
    </xsl:when>
    <xsl:when test="@rend='display'">
      <p class="blockquote">
        <xsl:apply-templates/>
      </p>
    </xsl:when>
    <xsl:when test="tei:text">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:when test="tei:lg">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:call-template name="makeQuote"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:q[@rend='display']
Documentation

Description

Process element q[@rend='display']
Namespace No namespace
Match tei:q[@rend='display']
Mode #default
References
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:q[@rend='display']">
  <blockquote>
    <xsl:call-template name="rendToClass"/>
    <xsl:choose>
      <xsl:when test="tei:p">
        <xsl:apply-templates/>
      </xsl:when>
      <xsl:otherwise>
        <p>
          <xsl:apply-templates/>
        </p>
      </xsl:otherwise>
    </xsl:choose>
  </blockquote>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:q[@rend='eg']
Documentation

Description

Process element q[@rend='eg']
Namespace No namespace
Match tei:q[@rend='eg']
Mode #default
References
Parameter cssFile
Import precedence 3
Source
<xsl:template match="tei:q[@rend='eg']">
  <div>
    <xsl:if test="$cssFile">
      <xsl:attribute name="class">eg</xsl:attribute>
    </xsl:if>
    <xsl:apply-templates/>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:quote
Documentation

Description

Process element quote
Namespace No namespace
Match tei:quote
Mode #default
References
Parameters postQuote; preQuote
Template rendToClass
Import precedence 3
Source
<xsl:template match="tei:quote">
  <xsl:choose>
    <xsl:when test="parent::tei:cit">
      <div class="citquote">
        <xsl:apply-templates/>
      </div>
    </xsl:when>
    <xsl:when test="contains(concat(' ', @rend, ' '), ' quoted ')">
      <xsl:value-of select="$preQuote"/>
      <xsl:apply-templates/>
      <xsl:value-of select="$postQuote"/>
      <xsl:if test="following-sibling::tei:bibl">
        <span class="quotedbibl">
          <xsl:text>(</xsl:text>
          <xsl:apply-templates select="following-sibling::tei:bibl"/>
          <xsl:text>)</xsl:text>
        </span>
      </xsl:if>
    </xsl:when>
    <xsl:when test="parent::tei:p or parent::tei:note">
      <div class="blockquote">
        <xsl:choose>
          <xsl:when test="tei:p|tei:l">
            <xsl:apply-templates/>
          </xsl:when>
          <xsl:otherwise>
            <p>
              <xsl:apply-templates/>
            </p>
          </xsl:otherwise>
        </xsl:choose>
      </div>
    </xsl:when>
    <xsl:otherwise>
      <blockquote>
        <xsl:call-template name="rendToClass"/>
        <xsl:choose>
          <xsl:when test="tei:p">
            <xsl:apply-templates/>
          </xsl:when>
          <xsl:when test="tei:l">
            <xsl:apply-templates/>
          </xsl:when>
          <xsl:otherwise>
            <p>
              <xsl:apply-templates/>
            </p>
          </xsl:otherwise>
        </xsl:choose>
      </blockquote>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:resp
Documentation

Description

Process element resp
Namespace No namespace
Match tei:resp
Mode #default
Import precedence 3
Source
<xsl:template match="tei:resp">
  <xsl:apply-templates/>
  <xsl:text> </xsl:text>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:respStmt
Documentation

Description

Process element respStmt
Namespace No namespace
Match tei:respStmt
Mode #default
Import precedence 3
Source
<xsl:template match="tei:respStmt">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:salute
Documentation

Description

Process element salute
Namespace No namespace
Match tei:salute
Mode #default
Import precedence 3
Source
<xsl:template match="tei:salute">
  <div class="left">
    <xsl:apply-templates/>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:seg
Documentation

Description

Process element seg
Namespace No namespace
Match tei:seg
Mode #default
Import precedence 3
Source
<xsl:template match="tei:seg">
  <span>
    <xsl:choose>
      <xsl:when test="@type">
        <xsl:attribute name="class">
          <xsl:value-of select="@type"/>
        </xsl:attribute>
      </xsl:when>
      <xsl:when test="@rend">
        <xsl:attribute name="class">
          <xsl:value-of select="@rend"/>
        </xsl:attribute>
      </xsl:when>
    </xsl:choose>
    <xsl:apply-templates/>
  </span>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:sic
Documentation

Description

put (sic) after text
Namespace No namespace
Match tei:sic
Mode #default
Supersedes
Template tei:sic
Import precedence 3
Source
<xsl:template match="tei:sic">
  <xsl:apply-templates/>
  <xsl:text> (sic)</xsl:text>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:signed
Documentation

Description

Process element signed
Namespace No namespace
Match tei:signed
Mode #default
Import precedence 3
Source
<xsl:template match="tei:signed">
  <div class="left">
    <xsl:apply-templates/>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:space
Documentation

Description

Process element space
Namespace No namespace
Match tei:space
Mode #default
References
Template space_loop
Import precedence 3
Source
<xsl:template match="tei:space">
  <xsl:choose>
    <xsl:when test="@quantity|@extent">
      <xsl:call-template name="space_loop">
        <xsl:with-param name="extent" select="@quantity|@extent"/>
      </xsl:call-template>
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:text> </xsl:text>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:term
Documentation

Description

Process element term
Namespace No namespace
Match tei:term
Mode #default
References
Import precedence 3
Source
<xsl:template match="tei:term">
  <xsl:choose>
    <xsl:when test="@rend">
      <xsl:call-template name="rendering"/>
    </xsl:when>
    <xsl:when test="@rendition">
      <span>
        <xsl:call-template name="applyRendition"/>
        <xsl:apply-templates/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <span class="term">
        <xsl:apply-templates/>
      </span>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:titlewithbr
Documentation

Description

Process element title in "withbr" mode
Namespace No namespace
Match tei:title
Mode withbr
Import precedence 3
Source
<xsl:template match="tei:title" mode="withbr">
  <xsl:value-of select="."/>
  <br/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:body/tei:title
Documentation

Description

Process element title when it is a child of body
Namespace No namespace
Match tei:body/tei:title
Mode #default
Import precedence 3
Source
<xsl:template match="tei:body/tei:title">
  <div class="title">
    <xsl:apply-templates/>
  </div>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:witList
Documentation

Description

Process element witList
Namespace No namespace
Match tei:witList
Mode #default
Import precedence 3
Source
<xsl:template match="tei:witList">
  <xsl:apply-templates select="./witness"/>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:witness
Documentation

Description

Process element witness
Namespace No namespace
Match tei:witness
Mode #default
Import precedence 3
Source
<xsl:template match="tei:witness">
  <p id="{@sigil}">
    <b>Sigle: <xsl:value-of select="@sigil"/>
    </b>
    <br/>
    <xsl:value-of select="text()"/>
    <br/>
    <xsl:apply-templates select="tei:biblStruct"/>
    <xsl:if test="child::tei:note">
      <br/>Zie noot: <xsl:apply-templates select="child::tei:note"/></xsl:if>
  </p>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template applyRendition
Documentation

Description

[html] Activate a value for @rendition

Parameters

value value

Namespace No namespace
Used by
References
Template findRendition
Import precedence 3
Source
<xsl:template name="applyRendition">
  <xsl:attribute name="class">
    <xsl:for-each select="tokenize(normalize-space(@rendition),' ')">
      <xsl:call-template name="findRendition">
        <xsl:with-param name="value">
          <xsl:value-of select="."/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:for-each>
  </xsl:attribute>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template findRendition
Documentation

Description

[html] Look up rendition value

Parameters

value value

Namespace No namespace
Used by
Template applyRendition
Parameters
QName Namespace
value No namespace
Import precedence 3
Source
<xsl:template name="findRendition">
  <xsl:param name="value"/>
  <xsl:choose>
    <xsl:when test="starts-with($value,'#')">
      <xsl:value-of select="substring-after($value,'#')"/>
      <xsl:text> </xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:for-each select="document($value)">
        <xsl:apply-templates select="@xml:id"/>
        <xsl:text> </xsl:text>
      </xsl:for-each>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template applyRend
Documentation

Description

[html] Active a value for @rend

Parameters

value value

Namespace No namespace
Used by
References
Parameter rendSeparator
Template renderingInner
Parameters
QName Namespace
value No namespace
Import precedence 3
Source
<xsl:template name="applyRend">
  <xsl:param name="value"/>
  <xsl:choose>
    <xsl:when test="not($value='')">
      <xsl:variable name="thisparm" select="substring-before($value,$rendSeparator)"/>
      <xsl:call-template name="renderingInner">
        <xsl:with-param name="value" select="$thisparm"/>
        <xsl:with-param name="rest" select="substring-after($value,$rendSeparator)"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template continuedToc
Documentation

Description

[html]
Namespace No namespace
Used by
Template tei:*maketoc
Import precedence 3
Source
<xsl:template name="continuedToc">
  <xsl:if test="tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6">
    <ul class="toc">
      <xsl:apply-templates mode="maketoc" select="tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6"/>
    </ul>
  </xsl:if>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template noteID
Documentation

Description

[html] How to identify a note
Namespace No namespace
Used by
Import precedence 3
Source
<xsl:template name="noteID">
  <xsl:choose>
    <xsl:when test="@xml:id">
      <xsl:value-of select="@xml:id"/>
    </xsl:when>
    <xsl:when test="@n and not(@n='*')">
      <xsl:value-of select="@n"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:number count="tei:note" level="any"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template noteN
Documentation

Description

[html] How to label a note
Namespace No namespace
Used by
Templates makeaNote; tei:note
References
Parameter consecutiveFNs
Import precedence 3
Source
<xsl:template name="noteN">
  <xsl:choose>
    <xsl:when test="@n">
      <xsl:value-of select="@n"/>
    </xsl:when>
    <xsl:when test="not(@place) and $consecutiveFNs='true'">
      <xsl:number count="tei:note[not(@place)]" level="any"/>
    </xsl:when>
    <xsl:when test="not(@place)">
      <xsl:choose>
        <xsl:when test="ancestor::tei:front">
          <xsl:number count="tei:note[not(@place)]" from="tei:front" level="any"/>
        </xsl:when>
        <xsl:when test="ancestor::tei:back">
          <xsl:number count="tei:note[not(@place)]" from="tei:back" level="any"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:number count="tei:note[not(@place)]" from="tei:body" level="any"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="@place='end'">
      <xsl:choose>
        <xsl:when test="$consecutiveFNs = 'true'">
          <xsl:number count="tei:note[./@place='end' or @place='bottom']" level="any"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:choose>
            <xsl:when test="ancestor::tei:front">
              <xsl:number count="tei:note[./@place='end' or @place='bottom']" from="tei:front" level="any"/>
            </xsl:when>
            <xsl:when test="ancestor::tei:back">
              <xsl:number count="tei:note[./@place='end' or @place='bottom']" from="tei:back" level="any"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:number count="tei:note[./@place='end' or @place='bottom']" from="tei:body" level="any"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:when>
    <xsl:otherwise>
      <xsl:choose>
        <xsl:when test="$consecutiveFNs = 'true'">
          <xsl:number count="tei:note[@place='foot' or @place='bottom']" level="any"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:choose>
            <xsl:when test="ancestor::tei:front">
              <xsl:number count="tei:note[@place='foot' or @place='bottom']" from="tei:front" level="any"/>
            </xsl:when>
            <xsl:when test="ancestor::tei:back">
              <xsl:number count="tei:note[@place='foot' or @place='bottom']" from="tei:back" level="any"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:number count="tei:note[@place='foot' or @place='bottom']" from="tei:body" level="any"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template partialFootNotes
Documentation

Description

[html] Show relevant footnotes

Parameters

currentID currentID

Namespace No namespace
Used by
Template mainFrame
References
Parameter splitLevel
Template printNotes
Key IDS
Parameters
QName Namespace
currentID No namespace
Import precedence 3
Source
<xsl:template name="partialFootNotes">
  <xsl:param name="currentID"/>
  <xsl:choose>
    <xsl:when test="$currentID='current'"/>
    <xsl:when test="$currentID='' and number($splitLevel)=-1">
      <xsl:call-template name="printNotes"/>
    </xsl:when>
    <xsl:when test="$currentID=''">
      <xsl:for-each select=" descendant::tei:text">
        <xsl:call-template name="printNotes"/>
      </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
      <xsl:choose>
        <xsl:when test="count(key('IDS',$currentID))>0">
          <xsl:for-each select="key('IDS',$currentID)">
            <xsl:call-template name="printNotes"/>
          </xsl:for-each>
        </xsl:when>
        <xsl:otherwise>
          <xsl:apply-templates mode="xpath" select="ancestor-or-self::tei:TEI/descendant::tei:text">
            <xsl:with-param name="xpath" select="$currentID"/>
            <xsl:with-param name="action">notes</xsl:with-param>
          </xsl:apply-templates>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template printNotes
Documentation

Description

[html]
Namespace No namespace
Used by
References
Import precedence 3
Source
<xsl:template name="printNotes">
  <xsl:if test="count(key('NOTES',1))">
    <xsl:choose>
      <xsl:when test="$footnoteFile='true'">
        <xsl:variable name="BaseFile">
          <xsl:value-of select="$masterFile"/>
          <xsl:call-template name="addCorpusID"/>
        </xsl:variable>
        <xsl:variable name="outName">
          <xsl:call-template name="outputChunkName">
            <xsl:with-param name="ident">
              <xsl:value-of select="concat($BaseFile,'-notes')"/>
            </xsl:with-param>
          </xsl:call-template>
        </xsl:variable>
        <xsl:if test="$verbose='true'">
          <xsl:message>Opening file
            <xsl:value-of select="$outName"/>
          </xsl:message>
        </xsl:if>
        <xsl:result-document doctype-public="{$doctypePublic}" doctype-system="{$doctypeSystem}" encoding="{$outputEncoding}" href="{$outName}" method="{$outputMethod}">
          <html>
            <xsl:call-template name="addLangAtt"/>
            <head>
              <title>
                <xsl:apply-templates select="descendant-or-self::tei:text/tei:front//tei:docTitle//text()"/>
                <xsl:text>: </xsl:text>
                <xsl:call-template name="i18n">
                  <xsl:with-param name="word">noteHeading</xsl:with-param>
                </xsl:call-template>
              </title>
              <xsl:call-template name="includeCSS"/>
              <xsl:call-template name="cssHook"/>
            </head>
            <body>
              <xsl:call-template name="bodyHook"/>
              <xsl:call-template name="bodyJavascriptHook"/>
              <div class="stdheader">
                <xsl:call-template name="stdheader">
                  <xsl:with-param name="title">
                    <xsl:apply-templates select="descendant-or-self::tei:text/tei:front//tei:docTitle//text()"/>
                    <xsl:text>: </xsl:text>
                    <xsl:call-template name="i18n">
                      <xsl:with-param name="word">noteHeading</xsl:with-param>
                    </xsl:call-template>
                  </xsl:with-param>
                </xsl:call-template>
              </div>
              <div class="notes">
                <div class="noteHeading">
                  <xsl:call-template name="i18n">
                    <xsl:with-param name="word">noteHeading</xsl:with-param>
                  </xsl:call-template>
                </div>
                <xsl:apply-templates mode="printnotes" select="key('NOTES',1)"/>
              </div>
              <xsl:call-template name="stdfooter"/>
              <xsl:call-template name="bodyEndHook"/>
            </body>
          </html>
        </xsl:result-document>
        <xsl:if test="$verbose='true'">
          <xsl:message>Closing file
            <xsl:value-of select="$outName"/>
          </xsl:message>
        </xsl:if>
      </xsl:when>
      <xsl:otherwise>
        <xsl:variable name="NOTES">
          <xsl:choose>
            <xsl:when test="self::tei:TEI">
              <xsl:apply-templates mode="printallnotes" select="key('NOTES',1)"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:apply-templates mode="printnotes" select=".//tei:note"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:variable>
        <xsl:for-each select="$NOTES">
          <xsl:if test="html:div">
            <div class="notes">
              <div class="noteHeading">
                <xsl:call-template name="i18n">
                  <xsl:with-param name="word">noteHeading</xsl:with-param>
                </xsl:call-template>
              </div>
              <xsl:copy-of select="*"/>
            </div>
          </xsl:if>
        </xsl:for-each>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:if>
  <xsl:if test="ancestor-or-self::tei:TEI/tei:text/descendant::tei:app">
    <div class="notes">
      <div class="noteHeading">
        <xsl:call-template name="i18n">
          <xsl:with-param name="word">noteHeading</xsl:with-param>
        </xsl:call-template>
      </div>
      <xsl:apply-templates mode="printnotes" select="descendant::tei:app"/>
    </div>
  </xsl:if>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template rendering
Documentation

Description

[html]

rendering. support for multiple rendition elements added by Nick Nicholas

Namespace No namespace
Used by
References
Template applyRend
Parameter rendSeparator
Import precedence 3
Source
<xsl:template name="rendering">
  <xsl:call-template name="applyRend">
    <xsl:with-param name="value" select="concat(@rend,$rendSeparator)"/>
  </xsl:call-template>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template renderingInner
Documentation

Description

[html]

Parameters

value the current segment of the value of the rend attribute

rest the remainder of the attribute

Namespace No namespace
Used by
Template applyRend
References
Parameters
QName Namespace
rest No namespace
value No namespace
Import precedence 3
Source
<xsl:template name="renderingInner">
  <xsl:param name="value"/>
  <xsl:param name="rest"/>
  <xsl:choose>
    <xsl:when test="$value='bold'">
      <b>
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </b>
    </xsl:when>
    <xsl:when test="$value='center'">
      <center>
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </center>
    </xsl:when>
    <xsl:when test="$value='code'">
      <b>
        <tt>
          <xsl:call-template name="applyRend">
            <xsl:with-param name="value" select="$rest"/>
          </xsl:call-template>
        </tt>
      </b>
    </xsl:when>
    <xsl:when test="$value='ital'">
      <i>
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </i>
    </xsl:when>
    <xsl:when test="$value='italic'">
      <i>
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </i>
    </xsl:when>
    <xsl:when test="$value='it'">
      <i>
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </i>
    </xsl:when>
    <xsl:when test="$value='italics'">
      <i>
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </i>
    </xsl:when>
    <xsl:when test="$value='i'">
      <i>
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </i>
    </xsl:when>
    <xsl:when test="$value='sc'">
      <!--   <small>
	   <xsl:value-of
	   select="translate(.,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
	   </small>
      -->
      <span style="font-variant: small-caps">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <xsl:when test="$value='plain'">
      <xsl:call-template name="applyRend">
        <xsl:with-param name="value" select="$rest"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$value='quoted'">
      <xsl:text></xsl:text>
      <xsl:call-template name="applyRend">
        <xsl:with-param name="value" select="$rest"/>
      </xsl:call-template>
      <xsl:text></xsl:text>
    </xsl:when>
    <xsl:when test="$value='sub'">
      <sub>
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </sub>
    </xsl:when>
    <xsl:when test="$value='sup'">
      <sup>
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </sup>
    </xsl:when>
    <xsl:when test="$value='important'">
      <span class="important">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <!-- NN added -->
    <xsl:when test="$value='ul'">
      <u>
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </u>
    </xsl:when>
    <!-- NN added -->
    <xsl:when test="$value='interlinMarks'">
      <xsl:text>`</xsl:text>
      <xsl:call-template name="applyRend">
        <xsl:with-param name="value" select="$rest"/>
      </xsl:call-template>
      <xsl:text>´</xsl:text>
    </xsl:when>
    <xsl:when test="$value='overbar'">
      <span style="text-decoration:overline">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <xsl:when test="$value='expanded'">
      <span style="letter-spacing: 0.15em">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <xsl:when test="$value='strike'">
      <span style="text-decoration: line-through">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <xsl:when test="$value='small'">
      <span style="font-size: 75%">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <xsl:when test="$value='large'">
      <span style="font-size: 150%">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <xsl:when test="$value='smaller'">
      <span style="font-size: 50%">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <xsl:when test="$value='larger'">
      <span style="font-size: 200%">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <xsl:when test="$value='calligraphic'">
      <span style="font-family: cursive">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <xsl:when test="$value='gothic'">
      <span style="font-family: fantasy">
        <xsl:call-template name="applyRend">
          <xsl:with-param name="value" select="$rest"/>
        </xsl:call-template>
      </span>
    </xsl:when>
    <xsl:when test="$value='noindex'">
      <xsl:call-template name="applyRend">
        <xsl:with-param name="value" select="$rest"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:choose>
        <xsl:when test="local-name(.)='p'">
          <xsl:call-template name="unknownRendBlock">
            <xsl:with-param name="rest" select="$rest"/>
            <xsl:with-param name="value" select="$value"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
          <xsl:call-template name="unknownRendInline">
            <xsl:with-param name="rest" select="$rest"/>
            <xsl:with-param name="value" select="$value"/>
          </xsl:call-template>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template space_loop
Documentation

Description

[html]

Parameters

extent extent

Namespace No namespace
Used by
Templates space_loop; tei:space
References
Template space_loop
Parameters
QName Namespace
extent No namespace
Import precedence 3
Source
<xsl:template name="space_loop">
  <xsl:param name="extent"/>
  <xsl:choose>
    <xsl:when test="$extent < 1">
    </xsl:when>
    <xsl:otherwise>
      <xsl:text> </xsl:text>
      <xsl:variable name="newextent">
        <xsl:value-of select="$extent - 1"/>
      </xsl:variable>
      <xsl:call-template name="space_loop">
        <xsl:with-param name="extent" select="$newextent"/>
      </xsl:call-template>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template unknownRendBlock
Documentation

Description

[html] Process unknown rend attribute by turning it into an HTML class

Parameters

value current value

rest remaining values

Namespace No namespace
Used by
Template renderingInner
References
Template applyRend
Parameters
QName Namespace
rest No namespace
value No namespace
Import precedence 3
Source
<xsl:template name="unknownRendBlock">
  <xsl:param name="value"/>
  <xsl:param name="rest"/>
  <xsl:if test="not($value='')">
    <xsl:attribute name="class">
      <xsl:value-of select="$value"/>
    </xsl:attribute>
    <xsl:call-template name="applyRend">
      <xsl:with-param name="value" select="$rest"/>
    </xsl:call-template>
  </xsl:if>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template unknownRendInline
Documentation

Description

[html] Process unknown rend attribute by turning it into an HTML class

Parameters

value value

rest rest

Namespace No namespace
Used by
Template renderingInner
References
Template applyRend
Parameters
QName Namespace
rest No namespace
value No namespace
Import precedence 3
Source
<xsl:template name="unknownRendInline">
  <xsl:param name="value"/>
  <xsl:param name="rest"/>
  <xsl:if test="not($value='')">
    <span class="{$value}">
      <xsl:call-template name="applyRend">
        <xsl:with-param name="value" select="$rest"/>
      </xsl:call-template>
    </span>
  </xsl:if>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template makeAnchor
Documentation

Description

[html] Create a point to which we can link in the HTML

Parameters

name value for identifier

Namespace No namespace
Used by
References
Variable masterFile
Parameters
QName Namespace
name No namespace
Import precedence 3
Source
<xsl:template name="makeAnchor">
  <xsl:param name="name"/>
  <xsl:choose>
    <xsl:when test="self::tei:anchor and $name">
      <span id="{$name}">
        <xsl:comment>anchor</xsl:comment>
      </span>
    </xsl:when>
    <xsl:when test="self::tei:anchor">
      <span id="{@xml:id}">
        <xsl:comment>anchor</xsl:comment>
      </span>
    </xsl:when>
    <xsl:when test="self::tei:index and $name">
      <span id="{$name}">
        <xsl:comment>index</xsl:comment>
      </span>
    </xsl:when>
    <xsl:when test="self::tei:index">
      <span id="{@xml:id}">
        <xsl:comment>index</xsl:comment>
      </span>
    </xsl:when>
    <xsl:when test="$name">
      <xsl:attribute name="id" select="$name"/>
    </xsl:when>
    <xsl:when test="@xml:id">
      <xsl:attribute name="id" select="@xml:id"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:variable name="me">
        <xsl:value-of select="$masterFile"/>-
        <xsl:value-of select="local-name(.)"/>-
        <xsl:value-of select="generate-id()"/>
      </xsl:variable>
      <xsl:attribute name="id" select="$me"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template tei:soCalled
Documentation

Description

Process element soCalled
Namespace No namespace
Match tei:soCalled
Mode #default
References
Templates applyRendition; rendering
Parameters postQuote; preQuote
Import precedence 3
Source
<xsl:template match="tei:soCalled">
  <xsl:choose>
    <xsl:when test="@rend">
      <xsl:call-template name="rendering"/>
    </xsl:when>
    <xsl:when test="@rendition">
      <span>
        <xsl:call-template name="applyRendition"/>
        <xsl:apply-templates/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="$preQuote"/>
      <xsl:apply-templates/>
      <xsl:value-of select="$postQuote"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template htmlAttributes
Documentation

Description

Copy all attributes in HTML namespace
Namespace No namespace
Used by
Template makeInternalLink
Import precedence 3
Source
<xsl:template name="htmlAttributes">
  <xsl:for-each select="@*">
    <xsl:if test="namespace-uri(.)='http://www.w3.org/1999/xhtml'">
      <xsl:attribute name="{local-name(.)}">
        <xsl:value-of select="."/>
      </xsl:attribute>
    </xsl:if>
  </xsl:for-each>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template rendToClass
Documentation

Description

[html] convert rend attribute to HTML class
Namespace No namespace
Used by
References
Parameters
QName Namespace
default No namespace
id No namespace
Import precedence 3
Source
<xsl:template name="rendToClass">
  <xsl:param name="id">true</xsl:param>
  <xsl:param name="default">.</xsl:param>
  <xsl:if test="$id='true' and @xml:id">
    <xsl:attribute name="id">
      <xsl:value-of select="@xml:id"/>
    </xsl:attribute>
  </xsl:if>
  <xsl:variable name="class1">
    <xsl:choose>
      <xsl:when test="$default=''"/>
      <xsl:when test="not($default='.')">
        <xsl:value-of select="$default"/>
      </xsl:when>
      <xsl:when test="@type">
        <xsl:value-of select="@type"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="local-name()"/>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:call-template name="rendToClassHook"/>
  </xsl:variable>
  <xsl:variable name="class2">
    <xsl:choose>
      <xsl:when test="@rend">
        <xsl:value-of select="translate(@rend,' /','_-')"/>
      </xsl:when>
      <xsl:when test="@rendition">
        <xsl:call-template name="applyRendition"/>
      </xsl:when>
    </xsl:choose>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="$class1='' and $class2=''"/>
    <xsl:when test="$class2=''">
      <xsl:attribute name="class">
        <xsl:value-of select="normalize-space($class1)"/>
      </xsl:attribute>
    </xsl:when>
    <xsl:otherwise>
      <xsl:attribute name="class">
        <xsl:value-of select="$class1"/>
        <xsl:text> </xsl:text>
        <xsl:value-of select="$class2"/>
      </xsl:attribute>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../xhtml2/core.xsl
Template rendToClassHook
Documentation

Description

[html] allow for local extensions to rendToClass
Namespace No namespace
Used by
Template rendToClass
Import precedence 3
Source
<xsl:template name="rendToClassHook"/>
Stylesheet location ../../../xhtml2/core.xsl