Mode:

Compact lists

Showing:

Documentation
Parameters
Used by
References
Imported modules
Imported from
Source
Stylesheet odttotei.xsl
Documentation

Description

TEI stylesheet for making TEI files from OpenOffice. Originally derived from the OpenOffice /Docbook conversion, but largely rewritten

LicenseThis 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 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

Copyright: 2013, TEI Consortium

Imported modules
Imported from
Stylesheet version 3.0
Template *summary
Namespace No namespace
Match *
Mode summary
Import precedence 1
Source
<xsl:template match="*" mode="summary">
  <xsl:text>
</xsl:text>
  <xsl:for-each select="ancestor::*">
    <xsl:text>.</xsl:text>
  </xsl:for-each>
  <xsl:value-of select="name()"/>:
  <xsl:apply-templates mode="summary"/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template /
Namespace No namespace
Match /
Mode #default
References
Parameters
Import precedence 1
Source
<xsl:template match="/">
  <xsl:if test="$debug='true'">
    <xsl:message>Look for metadata in
      <xsl:value-of select="concat($dir,'/meta.xml')"/>
    </xsl:message>
  </xsl:if>
  <xsl:variable name="pass1">
    <xsl:apply-templates/>
  </xsl:variable>
  <xsl:variable name="pass2">
    <xsl:apply-templates mode="pass2" select="$pass1"/>
  </xsl:variable>
  <xsl:apply-templates mode="pass3" select="$pass2"/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template office:document-content|office:body
Namespace No namespace
Match office:document-content|office:body
Mode #default
References
Variable
Template
Import precedence 1
Source
<xsl:template match="office:document-content|office:body">
  <xsl:for-each select="descendant::text:variable-decl">
    <xsl:variable name="name">
      <xsl:value-of select="@text:name"/>
    </xsl:variable>
    <xsl:if test="contains(@text:name,'entitydecl')">
      <xsl:text disable-output-escaping="yes"><!DOCTYPE TEI [
	</xsl:text>
      <xsl:text disable-output-escaping="yes"><!ENTITY </xsl:text>
      <xsl:value-of select="substring-after(@text:name,'entitydecl_')"/>
      <xsl:text> "</xsl:text>
      <xsl:value-of select="/descendant::text:variable-set[@text:name= $name][1]"/>
      <xsl:text disable-output-escaping="yes">"></xsl:text>
      <xsl:text disable-output-escaping="yes">]></xsl:text>
    </xsl:if>
  </xsl:for-each>
  <TEI>
    <xsl:for-each select="$META/office:meta/dc:language">
      <xsl:attribute name="xml:lang">
        <xsl:value-of select="normalize-space(.)"/>
      </xsl:attribute>
    </xsl:for-each>
    <xsl:call-template name="teiHeader"/>
    <text>
      <xsl:apply-templates/>
    </text>
  </TEI>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:variable-set|text:variable-get
Namespace No namespace
Match text:variable-set|text:variable-get
Mode #default
Import precedence 1
Source
<xsl:template match="text:variable-set|text:variable-get">
  <xsl:choose>
    <xsl:when test="contains(@text:style-name,'entitydecl')">
      <xsl:text disable-output-escaping="yes">&</xsl:text>
      <xsl:value-of select="substring-after(@text:style-name,'entitydecl_')"/>
      <xsl:text disable-output-escaping="yes">;</xsl:text>
    </xsl:when>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template teiHeader
Namespace No namespace
Used by
References
Variables
Import precedence 1
Source
<xsl:template name="teiHeader">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>
          <xsl:value-of select="$document-title"/>
        </title>
        <author>
          <xsl:value-of select="$META/office:meta/meta:initial-creator"/>
        </author>
      </titleStmt>
      <editionStmt>
        <edition>
          <date>
            <xsl:value-of select="$META/office:meta/meta:creation-date"/>
          </date>
        </edition>
      </editionStmt>
      <publicationStmt>
        <p>no publication statement available</p>
      </publicationStmt>
      <sourceDesc>
        <p>
          <xsl:apply-templates select="$META/office:meta/meta:generator"/>
          <xsl:text>Written by OpenOffice</xsl:text>
        </p>
      </sourceDesc>
    </fileDesc>
    <xsl:variable name="pD">
      <xsl:if test="$META/office:meta/dc:language">
        <langUsage>
          <language>
            <xsl:attribute name="ident">
              <xsl:value-of select="$META/office:meta/dc:language"/>
            </xsl:attribute>
            <xsl:value-of select="$META/office:meta/dc:language"/>
          </language>
        </langUsage>
      </xsl:if>
      <xsl:if test="$META/office:meta/meta:keyword">
        <textClass>
          <keywords scheme="unknown">
            <list>
              <xsl:for-each select="$META/office:meta/meta:keyword">
                <item>
                  <xsl:value-of select="."/>
                </item>
              </xsl:for-each>
            </list>
          </keywords>
        </textClass>
      </xsl:if>
    </xsl:variable>
    <xsl:if test="$pD/*">
      <profileDesc>
        <xsl:copy-of select="$pD"/>
      </profileDesc>
    </xsl:if>
    <revisionDesc>
      <listChange>
        <change>
          <name>
            <xsl:apply-templates select="$META/office:meta/dc:creator"/>
          </name>
          <date>
            <xsl:apply-templates select="$META/office:meta/dc:date"/>
          </date>
        </change>
      </listChange>
    </revisionDesc>
  </teiHeader>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template /office:document-content/office:body
Namespace No namespace
Match /office:document-content/office:body
Mode #default
Import precedence 1
Source
<xsl:template match="/office:document-content/office:body">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:h
Documentation

Description

 sections 
Namespace No namespace
Match text:h
Mode #default
Import precedence 1
Source
<xsl:template match="text:h">
  <xsl:choose>
    <xsl:when test="ancestor::text:note-body">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:when test="@text:style-name='ArticleInfo'">
    </xsl:when>
    <xsl:when test="@text:style-name='Abstract'">
      <div type="abstract">
        <xsl:apply-templates/>
      </div>
    </xsl:when>
    <xsl:when test="@text:style-name='Appendix'">
      <div type="appendix">
        <xsl:apply-templates/>
      </div>
    </xsl:when>
    <xsl:otherwise>
      <HEAD level="1" style="{@text:style-name}">
        <xsl:apply-templates/>
      </HEAD>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:h[@text:outline-level]
Namespace No namespace
Match text:h[@text:outline-level]
Mode #default
Import precedence 1
Source
<xsl:template match="text:h[@text:outline-level]">
  <xsl:choose>
    <xsl:when test="ancestor::text:note-body">
      <p>
        <xsl:attribute name="rend">
          <xsl:choose>
            <xsl:when test="@text:style-name">
              <xsl:value-of select="@text:style-name"/>
            </xsl:when>
            <xsl:otherwise>heading</xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:apply-templates/>
      </p>
    </xsl:when>
    <xsl:otherwise>
      <HEAD level="{@text:outline-level}">
        <xsl:attribute name="style">
          <xsl:choose>
            <xsl:when test="@text:style-name">
              <xsl:value-of select="@text:style-name"/>
            </xsl:when>
            <xsl:otherwise>nostyle</xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <!--
	    We do not process hard page breaks here directly 
	    but defer their output until the sections get created.
	    Therefore we add a dedicated attribute '@page-break-before'
	    for flagging this.
	  -->
        <xsl:attribute name="page-break-before" select="exists(tei:pagebreak-before(.))"/>
        <xsl:apply-templates/>
      </HEAD>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:p[@text:style-name='XMLComment']
Documentation

Description

 special case paragraphs 
Namespace No namespace
Match text:p[@text:style-name='XMLComment']
Mode #default
Import precedence 1
Source
<xsl:template match="text:p[@text:style-name='XMLComment']">
  <xsl:comment>
    <xsl:value-of select="."/>
  </xsl:comment>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template office:annotation/text:p
Namespace No namespace
Match office:annotation/text:p
Mode #default
Import precedence 1
Priority 100
Source
<xsl:template match="office:annotation/text:p" priority="100">
  <note>
    <xsl:apply-templates/>
  </note>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:p
Namespace No namespace
Match text:p
Mode #default
References
Import precedence 1
Source
<xsl:template match="text:p">
  <xsl:sequence select="tei:pagebreak-before(.)"/>
  <xsl:choose>
    <xsl:when test="draw:frame and parent::draw:text-box">
      <xsl:apply-templates select="draw:frame"/>
      <head>
        <xsl:apply-templates select="text()|*[not(local-name(.)='frame')]"/>
      </head>
    </xsl:when>
    <xsl:when test="count(parent::text:note-body/text:p)=1">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:when test="count(parent::text:list-item/text:p)=1">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:when test="@text:style-name='Document Title'">
      <docTitle>
        <xsl:apply-templates/>
      </docTitle>
    </xsl:when>
    <xsl:when test="@text:style-name='Author'">
      <author>
        <xsl:apply-templates/>
      </author>
    </xsl:when>
    <xsl:when test="@text:style-name='lg'">
      <lg>
        <xsl:for-each-group select="node()" group-ending-with="text:line-break">
          <l>
            <xsl:apply-templates select="current-group()"/>
          </l>
        </xsl:for-each-group>
      </lg>
    </xsl:when>
    <xsl:when test="@text:style-name='Title'">
      <title>
        <xsl:apply-templates/>
      </title>
    </xsl:when>
    <xsl:when test="@text:style-name='Section Title'">
      <head>
        <xsl:apply-templates/>
      </head>
    </xsl:when>
    <xsl:when test="@text:style-name='Appendix Title'">
      <head>
        <xsl:apply-templates/>
      </head>
    </xsl:when>
    <xsl:when test="parent::text:list-item">
      <xsl:call-template name="applyStyle"/>
    </xsl:when>
    <xsl:when test="@text:style-name='Table'"/>
    <xsl:when test="text:span[@text:style-name = 'XrefLabel']"/>
    <xsl:when test="@text:style-name='Speech'">
      <sp>
        <speaker/>
        <xsl:call-template name="applyStyle"/>
      </sp>
    </xsl:when>
    <xsl:otherwise>
      <xsl:call-template name="applyStyle"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:list
Documentation

Description

 lists 
Namespace No namespace
Match text:list
Mode #default
References
Key
Import precedence 1
Source
<xsl:template match="text:list">
  <xsl:variable name="style">
    <xsl:for-each select="key('LISTS',@text:style-name)[1]">
      <xsl:value-of select="@text:style-name"/>
    </xsl:for-each>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="text:list-item/text:h">
      <xsl:for-each select="text:list-item">
        <xsl:apply-templates/>
      </xsl:for-each>
    </xsl:when>
    <xsl:when test="@text:style-name='Var List'">
      <list>
        <xsl:apply-templates/>
      </list>
    </xsl:when>
    <xsl:when test="contains($style,'Number')">
      <list type="ordered">
        <xsl:apply-templates/>
      </list>
    </xsl:when>
    <xsl:otherwise>
      <list type="unordered">
        <xsl:apply-templates/>
      </list>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:list-header
Namespace No namespace
Match text:list-header
Mode #default
Import precedence 1
Source
<xsl:template match="text:list-header">
  <head>
    <xsl:apply-templates/>
  </head>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:list-item
Namespace No namespace
Match text:list-item
Mode #default
Import precedence 1
Source
<xsl:template match="text:list-item">
  <xsl:choose>
    <xsl:when test="parent::text:list/@text:style-name='Var List'">
      <item>
        <xsl:for-each select="text:p[@text:style-name='VarList Term']">
          <xsl:apply-templates select="."/>
        </xsl:for-each>
      </item>
    </xsl:when>
    <xsl:otherwise>
      <item>
        <xsl:apply-templates/>
      </item>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:p[@text:style-name='VarList Item' or @text:style-name='List Contents']
Namespace No namespace
Match text:p[@text:style-name='VarList Item' or @text:style-name='List Contents']
Mode #default
Import precedence 1
Source
<xsl:template match="text:p[@text:style-name='VarList Item' or     @text:style-name='List Contents']">
  <GLOSS n="item">
    <xsl:apply-templates/>
  </GLOSS>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:p[@text:style-name='VarList Term' or @text:style-name='List Heading']
Namespace No namespace
Match text:p[@text:style-name='VarList Term' or @text:style-name='List Heading']
Mode #default
Import precedence 1
Source
<xsl:template match="text:p[@text:style-name='VarList Term' or @text:style-name='List Heading']">
  <GLOSS n="label">
    <xsl:apply-templates/>
  </GLOSS>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:span
Documentation

Description

 inline 
Namespace No namespace
Match text:span
Mode #default
References
Template
Import precedence 1
Source
<xsl:template match="text:span">
  <xsl:variable name="Style">
    <xsl:value-of select="@text:style-name"/>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="$Style='Emphasis'">
      <emph>
        <xsl:apply-templates/>
      </emph>
    </xsl:when>
    <xsl:when test="$Style='Underline'">
      <hi rend="ul">
        <xsl:apply-templates/>
      </hi>
    </xsl:when>
    <xsl:when test="$Style='SmallCaps'">
      <hi rend="sc">
        <xsl:apply-templates/>
      </hi>
    </xsl:when>
    <xsl:when test="$Style='Emphasis Bold'">
      <hi rend="bold">
        <xsl:apply-templates/>
      </hi>
    </xsl:when>
    <xsl:when test="$Style='Highlight'">
      <hi>
        <xsl:apply-templates/>
      </hi>
    </xsl:when>
    <xsl:when test="$Style='q'">
      <q>
        <xsl:choose>
          <xsl:when test="starts-with(.,'‘')">
            <xsl:value-of select="substring-before(substring-after(.,'‘'),'’')"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:apply-templates/>
          </xsl:otherwise>
        </xsl:choose>
      </q>
    </xsl:when>
    <xsl:when test="$Style='Internet Link'">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:when test="$Style='SubScript'">
      <hi rend="sub">
        <xsl:apply-templates/>
      </hi>
    </xsl:when>
    <xsl:when test="$Style='SuperScript'">
      <hi rend="sup">
        <xsl:apply-templates/>
      </hi>
    </xsl:when>
    <xsl:when test="style:text-properties[@fo:text-transform='small-caps']">
      <hi rend="sc">
        <xsl:apply-templates/>
      </hi>
    </xsl:when>
    <xsl:when test="../text:h">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:call-template name="applyStyle"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template applyStyle
Namespace No namespace
Used by
Templates
References
Import precedence 1
Source
<xsl:template name="applyStyle">
  <xsl:variable name="name">
    <xsl:value-of select="replace(@text:style-name,'tei_5f_','')"/>
  </xsl:variable>
  <xsl:variable name="style">
    <xsl:value-of select="@text:style-name"/>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="string-length(.)=0 and not (text:s or draw:frame)"/>
    <!-- if the style name is the same as that of a known TEI
      element, make it that -->
    <xsl:when test="doc-available('../names.xml') and         doc('../names.xml')//tei:gi[.=$name]">
      <xsl:element name="{$name}">
        <xsl:call-template name="id.attribute"/>
        <xsl:apply-templates/>
      </xsl:element>
    </xsl:when>
    <xsl:otherwise>
      <xsl:variable name="rendition" select="tei:inlineStyles($style,.)"/>
      <xsl:choose>
        <xsl:when test="self::text:p and count(parent::table:table-cell/text:p)=1">
          <xsl:if test="not($rendition='')">
            <xsl:attribute name="rend" select="$rendition"/>
          </xsl:if>
          <xsl:apply-templates/>
        </xsl:when>
        <xsl:when test="self::text:p">
          <p>
            <xsl:call-template name="id.attribute"/>
            <xsl:if test="not($rendition='')">
              <xsl:attribute name="rend" select="$rendition"/>
            </xsl:if>
            <xsl:apply-templates/>
          </p>
        </xsl:when>
        <xsl:when test="$rendition=''">
          <xsl:apply-templates/>
        </xsl:when>
        <xsl:otherwise>
          <hi rend="{$rendition}">
            <xsl:apply-templates/>
          </hi>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template table:table
Documentation

Description

 tables 
Namespace No namespace
Match table:table
Mode #default
References
Import precedence 1
Source
<xsl:template match="table:table">
  <xsl:sequence select="tei:pagebreak-before(.)"/>
  <table rend="frame">
    <xsl:if test="@table:name and not(@table:name = 'local-table')">
      <xsl:attribute name="xml:id">
        <xsl:value-of select="@table:name"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:if test="following-sibling::text:p[@text:style-name='Table']">
      <head>
        <xsl:value-of select="following-sibling::text:p[@text:style-name='Table']"/>
      </head>
    </xsl:if>
    <xsl:call-template name="generictable"/>
  </table>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template generictable
Namespace No namespace
Used by
Template
Import precedence 1
Source
<xsl:template name="generictable">
  <xsl:variable name="cells" select="count(descendant::table:table-cell)"/>
  <xsl:variable name="rows">
    <xsl:value-of select="count(descendant::table:table-row) "/>
  </xsl:variable>
  <xsl:variable name="cols">
    <xsl:value-of select="$cells div $rows"/>
  </xsl:variable>
  <xsl:variable name="numcols">
    <xsl:choose>
      <xsl:when test="child::table:table-column/@table:number-columns-repeated">
        <xsl:value-of select="number(table:table-column/@table:number-columns-repeated+1)"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$cols"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template colspec
Namespace No namespace
Used by
Template
References
Template
Parameters
QName Namespace
left No namespace
Import precedence 1
Source
<xsl:template name="colspec">
  <xsl:param name="left"/>
  <xsl:if test="number($left < ( table:table-column/@table:number-columns-repeated +2)  )">
    <colspec>
      <xsl:attribute name="colnum">
        <xsl:value-of select="$left"/>
      </xsl:attribute>
      <xsl:attribute name="colname">
        <xsl:text>c</xsl:text>
        <xsl:value-of select="$left"/>
      </xsl:attribute>
    </colspec>
    <xsl:call-template name="colspec">
      <xsl:with-param name="left" select="$left+1"/>
    </xsl:call-template>
  </xsl:if>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template table:table-column
Namespace No namespace
Match table:table-column
Mode #default
Import precedence 1
Source
<xsl:template match="table:table-column">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template table:table-header-rows
Namespace No namespace
Match table:table-header-rows
Mode #default
Import precedence 1
Source
<xsl:template match="table:table-header-rows">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template table:table-header-rows/table:table-row
Namespace No namespace
Match table:table-header-rows/table:table-row
Mode #default
Import precedence 1
Source
<xsl:template match="table:table-header-rows/table:table-row">
  <row role="label">
    <xsl:apply-templates/>
  </row>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template table:table/table:table-row
Namespace No namespace
Match table:table/table:table-row
Mode #default
Import precedence 1
Source
<xsl:template match="table:table/table:table-row">
  <row>
    <xsl:apply-templates/>
  </row>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template table:table-cell/text:h
Namespace No namespace
Match table:table-cell/text:h
Mode #default
Import precedence 1
Source
<xsl:template match="table:table-cell/text:h">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template table:table-cell
Namespace No namespace
Match table:table-cell
Mode #default
Import precedence 1
Source
<xsl:template match="table:table-cell">
  <cell>
    <xsl:if test="@table:number-columns-spanned >'1'">
      <xsl:attribute name="cols">
        <xsl:value-of select="@table:number-columns-spanned"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:if test="@table:number-rows-spanned >'1'">
      <xsl:attribute name="rows">
        <xsl:value-of select="@table:number-rows-spanned"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:if test="text:h">
      <xsl:attribute name="role">label</xsl:attribute>
    </xsl:if>
    <xsl:apply-templates/>
  </cell>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:note-citation
Documentation

Description

 notes 
Namespace No namespace
Match text:note-citation
Mode #default
Import precedence 1
Source
<xsl:template match="text:note-citation"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:note-body
Namespace No namespace
Match text:note-body
Mode #default
Import precedence 1
Source
<xsl:template match="text:note-body">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:note-ref
Namespace No namespace
Match text:note-ref
Mode #default
Import precedence 1
Source
<xsl:template match="text:note-ref">
  <ref target="#{@text:ref-name}">
    <xsl:apply-templates/>
  </ref>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:note
Namespace No namespace
Match text:note
Mode #default
Import precedence 1
Source
<xsl:template match="text:note">
  <note>
    <xsl:if test="@text:id">
      <xsl:attribute name="xml:id">
        <xsl:value-of select="@text:id"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:choose>
      <xsl:when test="@text:note-class='endnote'">
        <xsl:attribute name="place">end</xsl:attribute>
      </xsl:when>
      <xsl:when test="@text:note-class='footnote'">
        <xsl:attribute name="place">foot</xsl:attribute>
      </xsl:when>
    </xsl:choose>
    <xsl:if test="text:note-citation">
      <xsl:attribute name="n">
        <xsl:value-of select="text:note-citation"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:apply-templates/>
  </note>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template draw:plugin
Documentation

Description

 drawing 
Namespace No namespace
Match draw:plugin
Mode #default
Import precedence 1
Source
<xsl:template match="draw:plugin">
  <ptr target="{@xlink:href}"/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template draw:text-box
Namespace No namespace
Match draw:text-box
Mode #default
Import precedence 1
Source
<xsl:template match="draw:text-box">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template draw:frame
Namespace No namespace
Match draw:frame
Mode #default
Import precedence 1
Source
<xsl:template match="draw:frame">
  <xsl:choose>
    <xsl:when test="ancestor::draw:frame">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:otherwise>
      <figure>
        <xsl:apply-templates/>
      </figure>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template draw:image
Namespace No namespace
Match draw:image
Mode #default
References
Template
Import precedence 1
Source
<xsl:template match="draw:image">
  <xsl:choose>
    <xsl:when test="ancestor::draw:text-box">
      <xsl:call-template name="findGraphic"/>
    </xsl:when>
    <xsl:when test="ancestor::draw:frame">
      <xsl:call-template name="findGraphic"/>
    </xsl:when>
    <xsl:when test="parent::text:p[@text:style-name='Mediaobject']">
      <figure>
        <xsl:call-template name="findGraphic"/>
        <head>
          <xsl:value-of select="."/>
        </head>
      </figure>
    </xsl:when>
    <xsl:otherwise>
      <figure>
        <xsl:call-template name="findGraphic"/>
      </figure>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template findGraphic
Namespace No namespace
Used by
Template
Import precedence 1
Source
<xsl:template name="findGraphic">
  <xsl:choose>
    <xsl:when test="office:binary-data">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:when test="@xlink:href">
      <graphic>
        <xsl:attribute name="url">
          <xsl:value-of select="@xlink:href"/>
        </xsl:attribute>
      </graphic>
    </xsl:when>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template office:binary-data
Namespace No namespace
Match office:binary-data
Mode #default
Import precedence 1
Source
<xsl:template match="office:binary-data">
  <binaryObject encoding="base64" mimeType="image/jpg">
    <xsl:value-of select="."/>
  </binaryObject>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:a
Documentation

Description

 linking 
Namespace No namespace
Match text:a
Mode #default
Import precedence 1
Source
<xsl:template match="text:a">
  <xsl:choose>
    <xsl:when test="starts-with(@xlink:href,'mailto:')">
      <xsl:choose>
        <xsl:when test=".=@xlink:href">
          <ptr target="{substring-after(@xlink:href,'mailto:')}"/>
        </xsl:when>
        <xsl:otherwise>
          <ref target="{@xlink:href}">
            <xsl:apply-templates/>
          </ref>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="contains(@xlink:href,'://')">
      <xsl:choose>
        <xsl:when test=".=@xlink:href">
          <ptr target="{@xlink:href}"/>
        </xsl:when>
        <xsl:otherwise>
          <ref target="{@xlink:href}">
            <xsl:apply-templates/>
          </ref>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:when>
    <xsl:when test="not(contains(@xlink:href,'#'))">
      <ref target="{@xlink:href}">
        <xsl:apply-templates/>
      </ref>
    </xsl:when>
    <xsl:otherwise>
      <xsl:variable name="linkvar" select="@xlink:href"/>
      <xsl:choose>
        <xsl:when test=".=$linkvar">
          <ptr target="{$linkvar}"/>
        </xsl:when>
        <xsl:otherwise>
          <ref target="{$linkvar}">
            <xsl:apply-templates/>
          </ref>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:line-break
Namespace No namespace
Match text:line-break
Mode #default
Import precedence 1
Source
<xsl:template match="text:line-break">
  <xsl:choose>
    <xsl:when test="parent::text:span[@text:style-name='l']"/>
    <xsl:when test="parent::text:p[@text:style-name='lg']"/>
    <xsl:otherwise>
      <lb/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:tab
Namespace No namespace
Match text:tab
Mode #default
Import precedence 1
Source
<xsl:template match="text:tab">
  <xsl:text>	</xsl:text>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:reference-ref
Namespace No namespace
Match text:reference-ref
Mode #default
Import precedence 1
Source
<xsl:template match="text:reference-ref">
  <ptr target="#id_{@text:ref-name}"/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template id.attribute.literal
Namespace No namespace
Import precedence 1
Source
<xsl:template name="id.attribute.literal">
  <xsl:if test="child::text:reference-mark-start">
    <xsl:text> xml:id="</xsl:text>
    <xsl:text>id_</xsl:text>
    <xsl:value-of select="child::text:reference-mark-start/@text:style-name"/>
    <xsl:text>"</xsl:text>
  </xsl:if>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template id.attribute
Namespace No namespace
Used by
Template
Import precedence 1
Source
<xsl:template name="id.attribute">
  <xsl:if test="child::text:reference-mark-start">
    <xsl:attribute name="xml:id">
      <xsl:text>id_</xsl:text>
      <xsl:value-of select="child::text:reference-mark-start/@text:style-name"/>
    </xsl:attribute>
  </xsl:if>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:reference-mark-start
Namespace No namespace
Match text:reference-mark-start
Mode #default
Import precedence 1
Source
<xsl:template match="text:reference-mark-start"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:reference-mark-end
Namespace No namespace
Match text:reference-mark-end
Mode #default
Import precedence 1
Source
<xsl:template match="text:reference-mark-end"/>
Stylesheet location ../../../odt/odttotei.xsl
Template comment
Namespace No namespace
Match comment
Mode #default
Import precedence 1
Source
<xsl:template match="comment">
  <xsl:comment>
    <xsl:value-of select="."/>
  </xsl:comment>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:user-index-mark
Namespace No namespace
Match text:user-index-mark
Mode #default
Import precedence 1
Source
<xsl:template match="text:user-index-mark">
  <index indexName="{@text:index-name}">
    <term>
      <xsl:value-of select="@text:string-value"/>
    </term>
  </index>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:alphabetical-index-mark
Namespace No namespace
Match text:alphabetical-index-mark
Mode #default
Import precedence 1
Source
<xsl:template match="text:alphabetical-index-mark">
  <xsl:if test="not(normalize-space(@text:string-value)='')">
    <index>
      <xsl:if test="@text:id">
        <xsl:attribute name="xml:id">
          <xsl:value-of select="@text:id"/>
        </xsl:attribute>
      </xsl:if>
      <xsl:choose>
        <xsl:when test="@text:key1">
          <term>
            <xsl:value-of select="@text:key1"/>
          </term>
          <index>
            <term>
              <xsl:value-of select="@text:string-value"/>
            </term>
          </index>
        </xsl:when>
        <xsl:otherwise>
          <term>
            <xsl:value-of select="@text:string-value"/>
          </term>
        </xsl:otherwise>
      </xsl:choose>
    </index>
  </xsl:if>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:alphabetical-index
Namespace No namespace
Match text:alphabetical-index
Mode #default
Import precedence 1
Source
<xsl:template match="text:alphabetical-index">
  <index>
    <xsl:apply-templates select="text:index-body"/>
  </index>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:index-body
Namespace No namespace
Match text:index-body
Mode #default
Import precedence 1
Source
<xsl:template match="text:index-body">
  <xsl:for-each select="text:p[@text:style-name = 'Index 1']">
    <index>
      <term>
        <xsl:value-of select="."/>
      </term>
    </index>
  </xsl:for-each>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:bookmark-ref
Namespace No namespace
Match text:bookmark-ref
Mode #default
Import precedence 1
Source
<xsl:template match="text:bookmark-ref">
  <ref target="#id_{@text:ref-name}" type="{@text:reference-format}">
    <xsl:apply-templates/>
  </ref>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:bookmark-start
Namespace No namespace
Match text:bookmark-start
Mode #default
Import precedence 1
Source
<xsl:template match="text:bookmark-start">
  <anchor type="bookmark-start">
    <xsl:attribute name="xml:id">
      <xsl:text>id_</xsl:text>
      <xsl:value-of select="@text:name"/>
    </xsl:attribute>
  </anchor>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:bookmark-end
Namespace No namespace
Match text:bookmark-end
Mode #default
Import precedence 1
Source
<xsl:template match="text:bookmark-end">
  <ptr type="bookmark-end">
    <xsl:attribute name="target">
      <xsl:text>#id_</xsl:text>
      <xsl:value-of select="@text:name"/>
    </xsl:attribute>
  </ptr>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:bookmark
Namespace No namespace
Match text:bookmark
Mode #default
Import precedence 1
Source
<xsl:template match="text:bookmark">
  <anchor>
    <xsl:attribute name="xml:id">
      <xsl:text>id_</xsl:text>
      <xsl:value-of select="@text:name"/>
    </xsl:attribute>
  </anchor>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:endnotes-configuration
Documentation

Description

These seem to have no obvious translation
Namespace No namespace
Match text:endnotes-configuration
Mode #default
Import precedence 1
Source
<xsl:template match="text:endnotes-configuration"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:file-name
Namespace No namespace
Match text:file-name
Mode #default
Import precedence 1
Source
<xsl:template match="text:file-name"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:footnotes-configuration
Namespace No namespace
Match text:footnotes-configuration
Mode #default
Import precedence 1
Source
<xsl:template match="text:footnotes-configuration"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:linenumbering-configuration
Namespace No namespace
Match text:linenumbering-configuration
Mode #default
Import precedence 1
Source
<xsl:template match="text:linenumbering-configuration"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:list-level-style-bullet
Namespace No namespace
Match text:list-level-style-bullet
Mode #default
Import precedence 1
Source
<xsl:template match="text:list-level-style-bullet"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:list-level-style-number
Namespace No namespace
Match text:list-level-style-number
Mode #default
Import precedence 1
Source
<xsl:template match="text:list-level-style-number"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:list-style
Namespace No namespace
Match text:list-style
Mode #default
Import precedence 1
Source
<xsl:template match="text:list-style"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:outline-level-style
Namespace No namespace
Match text:outline-level-style
Mode #default
Import precedence 1
Source
<xsl:template match="text:outline-level-style"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:outline-style
Namespace No namespace
Match text:outline-style
Mode #default
Import precedence 1
Source
<xsl:template match="text:outline-style"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:s
Namespace No namespace
Match text:s
Mode #default
Import precedence 1
Source
<xsl:template match="text:s">
  <xsl:text> </xsl:text>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:*
Namespace No namespace
Match text:*
Mode #default
Import precedence 1
Source
<xsl:template match="text:*">[[[UNTRANSLATED
  <xsl:value-of select="name(.)"/>:
  <xsl:apply-templates/>]]]</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template office:automatic-styles
Documentation

Description

 sections of the OO format we don't need at present 
Namespace No namespace
Match office:automatic-styles
Mode #default
Import precedence 1
Source
<xsl:template match="office:automatic-styles"/>
Stylesheet location ../../../odt/odttotei.xsl
Template office:font-decls
Namespace No namespace
Match office:font-decls
Mode #default
Import precedence 1
Source
<xsl:template match="office:font-decls"/>
Stylesheet location ../../../odt/odttotei.xsl
Template office:meta
Namespace No namespace
Match office:meta
Mode #default
Import precedence 1
Source
<xsl:template match="office:meta"/>
Stylesheet location ../../../odt/odttotei.xsl
Template office:script
Namespace No namespace
Match office:script
Mode #default
Import precedence 1
Source
<xsl:template match="office:script"/>
Stylesheet location ../../../odt/odttotei.xsl
Template office:settings
Namespace No namespace
Match office:settings
Mode #default
Import precedence 1
Source
<xsl:template match="office:settings"/>
Stylesheet location ../../../odt/odttotei.xsl
Template office:styles
Namespace No namespace
Match office:styles
Mode #default
Import precedence 1
Source
<xsl:template match="office:styles"/>
Stylesheet location ../../../odt/odttotei.xsl
Template style:*
Namespace No namespace
Match style:*
Mode #default
Import precedence 1
Source
<xsl:template match="style:*"/>
Stylesheet location ../../../odt/odttotei.xsl
Template dc:*
Namespace No namespace
Match dc:*
Mode #default
Import precedence 1
Source
<xsl:template match="dc:*">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template meta:creation-date
Namespace No namespace
Match meta:creation-date
Mode #default
Import precedence 1
Source
<xsl:template match="meta:creation-date">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template meta:editing-cycles
Namespace No namespace
Match meta:editing-cycles
Mode #default
Import precedence 1
Source
<xsl:template match="meta:editing-cycles"/>
Stylesheet location ../../../odt/odttotei.xsl
Template meta:editing-duration
Namespace No namespace
Match meta:editing-duration
Mode #default
Import precedence 1
Source
<xsl:template match="meta:editing-duration"/>
Stylesheet location ../../../odt/odttotei.xsl
Template meta:generator
Namespace No namespace
Match meta:generator
Mode #default
Import precedence 1
Source
<xsl:template match="meta:generator"/>
Stylesheet location ../../../odt/odttotei.xsl
Template meta:user-defined
Namespace No namespace
Match meta:user-defined
Mode #default
Import precedence 1
Source
<xsl:template match="meta:user-defined"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:section
Namespace No namespace
Match text:section
Mode #default
Import precedence 1
Source
<xsl:template match="text:section">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:sequence-decl
Namespace No namespace
Match text:sequence-decl
Mode #default
Import precedence 1
Source
<xsl:template match="text:sequence-decl">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:sequence-decls
Namespace No namespace
Match text:sequence-decls
Mode #default
Import precedence 1
Source
<xsl:template match="text:sequence-decls">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:sequence
Namespace No namespace
Match text:sequence
Mode #default
Import precedence 1
Source
<xsl:template match="text:sequence">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:section-source
Namespace No namespace
Match text:section-source
Mode #default
Import precedence 1
Source
<xsl:template match="text:section-source"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:soft-page-break
Documentation

Description

Since soft page breaks are an optional and application specific feature, we disregard them completely. See the OpenDocument specification for further information.
Namespace No namespace
Match text:soft-page-break
Mode #default
Import precedence 1
Source
<xsl:template match="text:soft-page-break"/>
Stylesheet location ../../../odt/odttotei.xsl
Template stars
Namespace No namespace
Used by
Template
References
Template
Parameters
QName Namespace
n No namespace
Import precedence 1
Source
<xsl:template name="stars">
  <xsl:param name="n"/>
  <xsl:if test="$n >0">
    <xsl:text>*</xsl:text>
    <xsl:call-template name="stars">
      <xsl:with-param name="n">
        <xsl:value-of select="$n - 1"/>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:if>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:change|text:changed-region|text:change-end|text:change-start
Namespace No namespace
Match text:change|text:changed-region|text:change-end|text:change-start
Mode #default
Import precedence 1
Source
<xsl:template match="text:change|text:changed-region|text:change-end|text:change-start">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text:table-of-content
Namespace No namespace
Match text:table-of-content
Mode #default
Import precedence 1
Source
<xsl:template match="text:table-of-content"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:index-entry-chapter
Namespace No namespace
Match text:index-entry-chapter
Mode #default
Import precedence 1
Source
<xsl:template match="text:index-entry-chapter"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:index-entry-page-number
Namespace No namespace
Match text:index-entry-page-number
Mode #default
Import precedence 1
Source
<xsl:template match="text:index-entry-page-number"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:index-entry-tab-stop
Namespace No namespace
Match text:index-entry-tab-stop
Mode #default
Import precedence 1
Source
<xsl:template match="text:index-entry-tab-stop"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:index-entry-text
Namespace No namespace
Match text:index-entry-text
Mode #default
Import precedence 1
Source
<xsl:template match="text:index-entry-text"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:index-title-template
Namespace No namespace
Match text:index-title-template
Mode #default
Import precedence 1
Source
<xsl:template match="text:index-title-template"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:table-of-content-entry-template
Namespace No namespace
Match text:table-of-content-entry-template
Mode #default
Import precedence 1
Source
<xsl:template match="text:table-of-content-entry-template"/>
Stylesheet location ../../../odt/odttotei.xsl
Template text:table-of-content-source
Namespace No namespace
Match text:table-of-content-source
Mode #default
Import precedence 1
Source
<xsl:template match="text:table-of-content-source"/>
Stylesheet location ../../../odt/odttotei.xsl
Template office:text
Namespace No namespace
Match office:text
Mode #default
References
Import precedence 1
Source
<xsl:template match="office:text">
  <body>
    <xsl:variable name="Body">
      <HEAD level="1" magic="true">Start</HEAD>
      <xsl:apply-templates/>
    </xsl:variable>
    <!-- debug
      <xsl:result-document href="/tmp/temp.xml">
	<xsl:copy-of select="$Body"/>
      </xsl:result-document>
      -->
    <xsl:variable name="Body2">
      <xsl:for-each select="$Body">
        <xsl:apply-templates mode="pass1"/>
      </xsl:for-each>
    </xsl:variable>
    <xsl:for-each select="$Body2">
      <xsl:for-each-group select="tei:*" group-starting-with="tei:HEAD[@level='1']">
        <xsl:choose>
          <xsl:when test="self::tei:HEAD[@level='1']">
            <xsl:call-template name="group-by-section"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:call-template name="inSection"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:for-each-group>
    </xsl:for-each>
  </body>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template group-by-section
Namespace No namespace
Used by
References
Import precedence 1
Source
<xsl:template name="group-by-section">
  <xsl:variable name="ThisHeader" select="number(@level)"/>
  <xsl:variable name="NextHeader" select="number(@level)+1"/>
  <xsl:choose>
    <xsl:when test="@magic">
      <xsl:for-each-group select="current-group() except ." group-starting-with="tei:HEAD[number(@level)=$NextHeader]">
        <xsl:choose>
          <xsl:when test="self::tei:HEAD">
            <xsl:call-template name="group-by-section"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:call-template name="inSection"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:for-each-group>
    </xsl:when>
    <xsl:otherwise>
      <!-- 
          hard page breaks before sections are passed on via the
          @page-break-before attribute and need to get injected here
        -->
      <xsl:if test="@page-break-before='true'">
        <pb/>
      </xsl:if>
      <div>
        <xsl:choose>
          <xsl:when test="starts-with(@style,'Heading')"/>
          <xsl:when test="@style">
            <xsl:attribute name="rend" select="@style"/>
          </xsl:when>
        </xsl:choose>
        <xsl:if test="not(@interpolated='true')">
          <head>
            <xsl:apply-templates mode="pass1"/>
          </head>
        </xsl:if>
        <xsl:for-each-group select="current-group() except ." group-starting-with="tei:HEAD[number(@level)=$NextHeader]">
          <xsl:choose>
            <xsl:when test="self::tei:HEAD">
              <xsl:call-template name="group-by-section"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:call-template name="inSection"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:for-each-group>
      </div>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template inSection
Namespace No namespace
Used by
Import precedence 1
Source
<xsl:template name="inSection">
  <xsl:for-each-group select="current-group()" group-adjacent="if (self::tei:GLOSS)      then 1      else 2">
    <xsl:choose>
      <xsl:when test="current-grouping-key()=1">
        <list type="gloss">
          <xsl:for-each select="current-group()">
            <xsl:element name="{@n}">
              <xsl:apply-templates mode="pass2"/>
            </xsl:element>
          </xsl:for-each>
        </list>
      </xsl:when>
      <xsl:otherwise>
        <xsl:for-each select="current-group()">
          <xsl:apply-templates select="." mode="pass2"/>
        </xsl:for-each>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:for-each-group>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template @*|text()|comment()|processing-instruction()pass1
Namespace No namespace
Match @*|text()|comment()|processing-instruction()
Mode pass1
Import precedence 1
Source
<xsl:template match="@*|text()|comment()|processing-instruction()" mode="pass1">
  <xsl:copy-of select="."/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template tei:p[not(node())]pass1
Namespace No namespace
Match tei:p[not(node())]
Mode pass1
Import precedence 1
Source
<xsl:template match="tei:p[not(node())]" mode="pass1">
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template tei:HEADpass1
Namespace No namespace
Match tei:HEAD
Mode pass1
Import precedence 1
Source
<xsl:template match="tei:HEAD" mode="pass1">
  <xsl:if test="preceding-sibling::tei:HEAD">
    <xsl:variable name="prev" select="xs:integer(number(preceding-sibling::tei:HEAD[1]/@level))"/>
    <xsl:variable name="current" select="xs:integer(number(@level))"/>
    <xsl:if test="($current - $prev) >1 ">
      <!--<xsl:message>Walk from <xsl:value-of select="$prev"/> to <xsl:value-of select="$current"/></xsl:message>-->
      <xsl:for-each select="$prev + 1   to $current - 1 ">
        <HEAD interpolated="true" level="{.}"/>
      </xsl:for-each>
    </xsl:if>
  </xsl:if>
  <xsl:copy>
    <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()" mode="pass1"/>
  </xsl:copy>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template *pass1
Namespace No namespace
Match *
Mode pass1
Import precedence 1
Source
<xsl:template match="*" mode="pass1">
  <xsl:copy>
    <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()" mode="pass1"/>
  </xsl:copy>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template tei:p[not(*) and normalize-space(.)='']pass2
Documentation

Description

 second pass 
Namespace No namespace
Match tei:p[not(*) and normalize-space(.)='']
Mode pass2
Import precedence 1
Source
<xsl:template match="tei:p[not(*) and normalize-space(.)='']" mode="pass2">
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template @*|comment()|processing-instruction()pass2
Namespace No namespace
Match @*|comment()|processing-instruction()
Mode pass2
Import precedence 1
Source
<xsl:template match="@*|comment()|processing-instruction()" mode="pass2">
  <xsl:copy-of select="."/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template *pass2
Namespace No namespace
Match *
Mode pass2
Import precedence 1
Source
<xsl:template match="*" mode="pass2">
  <xsl:copy>
    <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()" mode="pass2"/>
  </xsl:copy>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text()pass2
Namespace No namespace
Match text()
Mode pass2
Import precedence 1
Source
<xsl:template match="text()" mode="pass2">
  <xsl:value-of select="."/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template tei:titlepass2
Namespace No namespace
Match tei:title
Mode pass2
Import precedence 1
Source
<xsl:template match="tei:title" mode="pass2">
  <xsl:choose>
    <xsl:when test="parent::tei:div|parent::tei:body">
      <head>
        <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()" mode="pass2"/>
      </head>
    </xsl:when>
    <xsl:otherwise>
      <xsl:copy>
        <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()" mode="pass2"/>
      </xsl:copy>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template @*|comment()|processing-instruction()pass3
Documentation

Description

 third pass 
Namespace No namespace
Match @*|comment()|processing-instruction()
Mode pass3
Import precedence 1
Source
<xsl:template match="@*|comment()|processing-instruction()" mode="pass3">
  <xsl:copy-of select="."/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template *pass3
Namespace No namespace
Match *
Mode pass3
Import precedence 1
Source
<xsl:template match="*" mode="pass3">
  <xsl:copy>
    <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()" mode="pass3"/>
  </xsl:copy>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template text()pass3
Namespace No namespace
Match text()
Mode pass3
Import precedence 1
Source
<xsl:template match="text()" mode="pass3">
  <xsl:value-of select="."/>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Template tei:div[not(@type)]pass3
Namespace No namespace
Match tei:div[not(@type)]
Mode pass3
Import precedence 1
Source
<xsl:template match="tei:div[not(@type)]" mode="pass3">
  <div type="div{count(ancestor-or-self::tei:div)}">
    <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()" mode="pass3"/>
  </div>
</xsl:template>
Stylesheet location ../../../odt/odttotei.xsl
Parameter debug
Namespace No namespace
Used by
Template
Source
<xsl:param name="debug">false</xsl:param>
Stylesheet location ../../../odt/odttotei.xsl
Parameter dir
Namespace No namespace
Used by
Template
Variable
Source
<xsl:param name="dir">.</xsl:param>
Stylesheet location ../../../odt/odttotei.xsl
Variable META
Documentation

Description

  <xsl:strip-space elements="text:span"/>
Namespace No namespace
Used by
References
Parameter
Source
<xsl:variable name="META">
  <xsl:choose>
    <xsl:when test="doc-available(concat($dir,'/meta.xml'))">
      <xsl:copy-of select="document(concat($dir,'/meta.xml'))//office:meta"/>
    </xsl:when>
    <xsl:when test="/office:document/office:meta">
      <xsl:copy-of select="/office:document/office:meta"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:copy-of select="/office:document-meta/office:meta"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>
Stylesheet location ../../../odt/odttotei.xsl
Variable document-title
Namespace No namespace
Used by
Template
References
Variable
Source
<xsl:variable name="document-title">
  <xsl:choose>
    <xsl:when test="/office:document-content/office:body/office:text/text:p[@text:style-name='Title']">
      <xsl:value-of select="/office:document-content/office:body/office:text/text:p[@text:style-name='Title'][1]"/>
    </xsl:when>
    <xsl:when test="$META/office:meta/dc:title">
      <xsl:value-of select="$META/office:meta/dc:title"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:text>Untitled Document</xsl:text>
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>
Stylesheet location ../../../odt/odttotei.xsl
Function tei:inlineStyles (name, context)
Namespace http://www.tei-c.org/ns/1.0
Type xs:string
Used by
Template
References
Key
Parameters
QName Namespace
context No namespace
name No namespace
Import precedence 1
Source
<xsl:function name="tei:inlineStyles" as="xs:string">
  <xsl:param name="name"/>
  <xsl:param name="context"/>
  <xsl:choose>
    <xsl:when test="starts-with($name,'tei_5f_')">
      <xsl:value-of select="substring($name,8)"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:variable name="r">
        <xsl:for-each select="$context/key('STYLES',$name)">
          <xsl:if test="style:paragraph-properties/@fo:text-align">
            <xsl:value-of select="style:paragraph-properties/@fo:text-align"/>
            <xsl:text> </xsl:text>
          </xsl:if>
          <xsl:if test="style:text-properties[starts-with(@style:text-position,'super')]">
            <xsl:text>sup </xsl:text>
          </xsl:if>
          <xsl:if test="style:text-properties/@fo:color and not(style:text-properties/@fo:color='transparent')">
            <xsl:text> color(</xsl:text>
            <xsl:value-of select="style:text-properties/@fo:color"/>
            <xsl:text>)</xsl:text>
          </xsl:if>
          <xsl:if test="style:text-properties/@fo:background-color and not(style:text-properties/@fo:background-color='transparent')">
            <xsl:text> background-color(</xsl:text>
            <xsl:value-of select="style:text-properties/@fo:background-color"/>
            <xsl:text>)</xsl:text>
          </xsl:if>
          <xsl:if test="style:text-properties[starts-with(@style:text-position,'sub')]">
            <xsl:text>sub </xsl:text>
          </xsl:if>
          <xsl:if test="style:text-properties[@fo:font-weight='bold']">
            <xsl:text>bold </xsl:text>
          </xsl:if>
          <xsl:if test="style:text-properties[@style:text-underline-type='double']">
            <xsl:text>doubleunderline </xsl:text>
          </xsl:if>
          <xsl:if test="style:text-properties[@style:text-underline-style='solid']">
            <xsl:text>underline </xsl:text>
          </xsl:if>
          <xsl:if test="style:text-properties[@style:text-line-through-style='solid']">
            <xsl:text>strikethrough </xsl:text>
          </xsl:if>
          <xsl:if test="style:text-properties[@fo:font-variant='small-caps']">
            <xsl:text>smallcaps </xsl:text>
          </xsl:if>
          <xsl:if test="style:text-properties[@fo:font-style='italic']">
            <xsl:text>italic </xsl:text>
          </xsl:if>
        </xsl:for-each>
      </xsl:variable>
      <xsl:value-of select="normalize-space($r)"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:function>
Stylesheet location ../../../odt/odttotei.xsl
Function tei:pagebreak-before (curNode)
Documentation

Description

Check whether the given element (e.g. text:p) refers to a style that implies a hard page break before.

Parameters

curNode The element for which to check the style. The element's attribute @text:style-name or @table:style-name is used for looking up the style

Return

A tei:pb element if the lookup was succesful, the empty sequence otherwise
Namespace http://www.tei-c.org/ns/1.0
Type element(tei:pb)?
Used by
Templates
References
Key
Parameters
QName Namespace Type
curNode No namespace element()?
Import precedence 1
Source
<xsl:function name="tei:pagebreak-before" as="element(tei:pb)?">
  <xsl:param name="curNode" as="element()?"/>
  <xsl:if test="($curNode/@text:style-name or $curNode/@table:style-name) and        key('STYLES',          ($curNode/@text:style-name, $curNode/@table:style-name),          $curNode/root()         )/(style:paragraph-properties, style:table-properties)[@fo:break-before='page']">
    <pb/>
  </xsl:if>
</xsl:function>
Stylesheet location ../../../odt/odttotei.xsl
Output (default)
Namespace No namespace
Output properties
encoding indent
utf-8 yes
Source
<xsl:output encoding="utf-8" indent="yes"/>
Stylesheet location ../../../odt/odttotei.xsl
Key STYLES
Namespace No namespace
Match style:style
Use @style:name
Used by
Source
<xsl:key match="style:style" name="STYLES" use="@style:name"/>
Stylesheet location ../../../odt/odttotei.xsl
Key LISTS
Namespace No namespace
Match text:list-level-style-number
Use parent::text:list-style/@style:name
Used by
Template
Source
<xsl:key name="LISTS" match="text:list-level-style-number" use="parent::text:list-style/@style:name"/>
Stylesheet location ../../../odt/odttotei.xsl
Key Headings
Namespace No namespace
Match text:h
Use text:outline-level
Source
<xsl:key match="text:h" name="Headings" use="text:outline-level"/>
Stylesheet location ../../../odt/odttotei.xsl