Mode:

Compact lists

Showing:

Documentation
Included from
Source
Stylesheet textstructure.xsl
Documentation

Description

TEI stylesheet dealing with elements from the textstructure module.

This software is dual-licensed: 1. Distributed under a Creative Commons Attribution-ShareAlike 3.0 Unported License http://creativecommons.org/licenses/by-sa/3.0/ 2. http://www.opensource.org/licenses/BSD-2-Clause All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holder or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Author: See AUTHORS

Id: $Id: textstructure.xsl 9646 2011-11-05 23:39:08Z rahtz $

Copyright: 2011, TEI Consortium

Included from
Stylesheet version 2.0
Template tei:textdepth
Documentation

Description

Establish nesting depth of sections
Namespace No namespace
Match tei:text
Mode depth
Import precedence 1
Source
<xsl:template match="tei:text" mode="depth">
  <xsl:value-of select="count(ancestor::tei:text)-1"/>
</xsl:template>
Stylesheet location ../common2/textstructure.xsl
Template tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6depth
Namespace No namespace
Match tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6
Mode depth
Import precedence 1
Source
<xsl:template match="tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6" mode="depth">
  <xsl:choose>
    <xsl:when test="ancestor::tei:text/parent::tei:group and    self::tei:div">
      <xsl:value-of select="count(ancestor::tei:div) + 1"/>
    </xsl:when>
    <xsl:when test="local-name(.) = 'div'">
      <xsl:value-of select="count(ancestor::tei:div)"/>
    </xsl:when>
    <xsl:when test="ancestor::tei:text/parent::tei:group">
      <xsl:value-of select="number(substring-after(local-name(.),'div')) "/>
    </xsl:when>
    <xsl:when test="ancestor::tei:text/parent::tei:group">
      <xsl:value-of select="number(substring-after(local-name(.),'div'))"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="number(substring-after(local-name(.),'div')) - 1"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../common2/textstructure.xsl
Template tei:divGen[@type='revHist']
Documentation

Description

Generate revision description
Namespace No namespace
Match tei:divGen[@type='revHist']
Mode #default
Import precedence 1
Source
<xsl:template match="tei:divGen[@type='revHist']">
  <xsl:variable name="r">
    <div xmlns="http://www.tei-c.org/ns/1.0" rend="nonumber">
      <head>Revision history</head>
      <table rend="rules">
        <xsl:for-each select="ancestor-or-self::tei:TEI/tei:teiHeader/tei:revisionDesc/tei:change">
          <row>
            <cell>
              <xsl:value-of select="@when"/>
            </cell>
            <cell>
              <xsl:value-of select="@who"/>
            </cell>
            <cell>
              <xsl:value-of select="."/>
            </cell>
          </row>
        </xsl:for-each>
      </table>
    </div>
  </xsl:variable>
  <xsl:for-each select="$r">
    <xsl:apply-templates/>
  </xsl:for-each>
</xsl:template>
Stylesheet location ../common2/textstructure.xsl