Showing:

Documentation
Used by
References
Included from
Source
Stylesheet corpus.xsl
Documentation

Description

TEI stylesheet dealing with elements from the corpus 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: corpus.xsl 7859 2010-07-19 08:44:49Z rahtz $

Copyright: 2008, TEI Consortium

Included from
Stylesheet version 2.0
Template tei:catRef
Documentation

Description

Process element catRef
Namespace No namespace
Match tei:catRef
Mode #default
References
Key IDS
Import precedence 3
Source
<xsl:template match="tei:catRef">
  <xsl:variable name="W">
    <xsl:choose>
      <xsl:when test="starts-with(@target,'#')">
        <xsl:value-of select="substring-after(@target,'#')"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="@target"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <xsl:if test="preceding-sibling::tei:catRef">
    <xsl:text> 
    </xsl:text>
  </xsl:if>
  <em>
    <xsl:value-of select="@scheme"/>
  </em>:
  <xsl:apply-templates select="key('IDS',$W)/catDesc"/>
</xsl:template>
Stylesheet location ../../../xhtml2/corpus.xsl
Template tei:teiCorpus
Documentation

Description

Process element teiCorpus
Namespace No namespace
Match tei:teiCorpus
Mode #default
References
Import precedence 3
Source
<xsl:template match="tei:teiCorpus">
  <html>
    <xsl:call-template name="addLangAtt"/>
    <head>
      <title>
        <xsl:apply-templates select="tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title/text()"/>
      </title>
      <xsl:call-template name="includeCSS"/>
      <xsl:call-template name="cssHook"/>
    </head>
    <body class="simple">
      <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="tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title"/>
          </xsl:with-param>
        </xsl:call-template>
      </div>
      <xsl:call-template name="corpusBody"/>
      <xsl:call-template name="stdfooter"/>
      <xsl:call-template name="bodyEndHook"/>
    </body>
  </html>
</xsl:template>
Stylesheet location ../../../xhtml2/corpus.xsl
Template tei:teiCorpussplit
Namespace No namespace
Match tei:teiCorpus
Mode split
References
Import precedence 3
Source
<xsl:template match="tei:teiCorpus" mode="split">
  <xsl:variable name="BaseFile">
    <xsl:value-of select="$masterFile"/>
    <xsl:call-template name="addCorpusID"/>
  </xsl:variable>
  <xsl:if test="$verbose='true'">
    <xsl:message>TEI HTML: run start hook template teiStartHook</xsl:message>
  </xsl:if>
  <xsl:call-template name="teiStartHook"/>
  <xsl:if test="$verbose='true'">
    <xsl:message>TEI HTML in corpus splitting mode, base file is
      <xsl:value-of select="$BaseFile"/>
    </xsl:message>
  </xsl:if>
  <xsl:variable name="outName">
    <xsl:call-template name="outputChunkName">
      <xsl:with-param name="ident">
        <xsl:value-of select="$BaseFile"/>
      </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"/>
      <xsl:call-template name="includeCSS"/>
      <head>
        <title>
          <xsl:apply-templates select="tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title/text()"/>
        </title>
        <xsl:call-template name="includeCSS"/>
        <xsl:call-template name="cssHook"/>
      </head>
      <body class="simple">
        <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="tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title[1]"/>
            </xsl:with-param>
          </xsl:call-template>
        </div>
        <xsl:call-template name="corpusBody"/>
        <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:if test="$verbose='true'">
    <xsl:message>TEI HTML: run end hook template teiEndHook</xsl:message>
  </xsl:if>
  <xsl:call-template name="teiEndHook"/>
  <xsl:apply-templates select="tei:TEI" mode="split"/>
</xsl:template>
Stylesheet location ../../../xhtml2/corpus.xsl
Template corpusBody
Documentation

Description

[html]
Namespace No namespace
Used by
References
Template header
Import precedence 3
Source
<xsl:template name="corpusBody">
  <ul>
    <xsl:for-each select="tei:TEI">
      <li>
        <a>
          <xsl:attribute name="href">
            <xsl:apply-templates mode="generateLink" select="."/>
          </xsl:attribute>
          <xsl:call-template name="header">
            <xsl:with-param name="minimal">false</xsl:with-param>
            <xsl:with-param name="display">plain</xsl:with-param>
          </xsl:call-template>
        </a>
      </li>
    </xsl:for-each>
  </ul>
</xsl:template>
Stylesheet location ../../../xhtml2/corpus.xsl