Mode:

Compact lists

Showing:

Documentation
Parameters
Used by
References
Supersedes
Imported modules
Source
Main stylesheet to.xsl
Documentation

Description

TEI stylesheet for making Word docx files from TEI XML (see tei-docx.xsl)

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: to.xsl 11412 2013-01-14 15:48:41Z rahtz $

Copyright: 2008, TEI Consortium

Imported modules
Stylesheet version 2.0
Template tei:abbrget-style
Documentation

Description

 Styles 
Namespace No namespace
Match tei:abbr
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:abbr" mode="get-style">tei_abbr</xsl:template>
Stylesheet location to.xsl
Template tei:citget-style
Namespace No namespace
Match tei:cit
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:cit" mode="get-style">Quote</xsl:template>
Stylesheet location to.xsl
Template tei:dateget-style
Namespace No namespace
Match tei:date
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:date" mode="get-style">date</xsl:template>
Stylesheet location to.xsl
Template tei:foreignget-style
Namespace No namespace
Match tei:foreign
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:foreign" mode="get-style">teiforeign</xsl:template>
Stylesheet location to.xsl
Template tei:formulaget-style
Namespace No namespace
Match tei:formula
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:formula" mode="get-style">Formula</xsl:template>
Stylesheet location to.xsl
Template tei:mentionedget-style
Namespace No namespace
Match tei:mentioned
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:mentioned" mode="get-style">tei_mentioned</xsl:template>
Stylesheet location to.xsl
Template tei:orgNameget-style
Namespace No namespace
Match tei:orgName
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:orgName" mode="get-style">tei_orgName</xsl:template>
Stylesheet location to.xsl
Template tei:quoteget-style
Namespace No namespace
Match tei:quote
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:quote" mode="get-style">Quote</xsl:template>
Stylesheet location to.xsl
Template tei:qget-style
Namespace No namespace
Match tei:q
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:q" mode="get-style">tei_q</xsl:template>
Stylesheet location to.xsl
Template tei:biblget-style
Namespace No namespace
Match tei:bibl
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:bibl" mode="get-style">tei_bibl</xsl:template>
Stylesheet location to.xsl
Template tei:ref[@rend and not(@target)]get-style
Namespace No namespace
Match tei:ref[@rend and not(@target)]
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:ref[@rend and not(@target)]" mode="get-style">
  <xsl:value-of select="@rend"/>
</xsl:template>
Stylesheet location to.xsl
Template tei:seg[@rend]get-style
Namespace No namespace
Match tei:seg[@rend]
Mode get-style
Import precedence 17
Source
<xsl:template match="tei:seg[@rend]" mode="get-style">
  <xsl:value-of select="@rend"/>
</xsl:template>
Stylesheet location to.xsl
Template tei:p[@rend]get-style
Namespace No namespace
Match tei:p[@rend]
Mode get-style
References
Template
Import precedence 17
Source
<xsl:template match="tei:p[@rend]" mode="get-style">
  <xsl:call-template name="getStyleName">
    <xsl:with-param name="in" select="@rend"/>
  </xsl:call-template>
</xsl:template>
Stylesheet location to.xsl
Template tei:editionStmt
Namespace No namespace
Match tei:editionStmt
Mode #default
Import precedence 17
Source
<xsl:template match="tei:editionStmt">
  <w:r>
    <w:t>
      <xsl:value-of select="tei:edition"/> Edition</w:t>
  </w:r>
</xsl:template>
Stylesheet location to.xsl
Template tei:label[following-sibling::tei:*[1]/self::tei:item]
Namespace No namespace
Match tei:label[following-sibling::tei:*[1]/self::tei:item]
Mode #default
Supersedes
Parameters
QName Namespace
nop No namespace
Import precedence 17
Source
<xsl:template match="tei:label[following-sibling::tei:*[1]/self::tei:item]">
  <xsl:param name="nop"/>
  <xsl:variable name="pair">
    <tei:list>
      <tei:glossListEntry count="{count(ancestor::tei:list)}">
        <tei:hi rend="bold">
          <xsl:apply-templates mode="iden"/>
        </tei:hi>
        <xsl:if test="not(following-sibling::tei:item[1]/tei:list)">
          <tei:lb/>
        </xsl:if>
        <xsl:for-each select="following-sibling::tei:item[1]">
          <xsl:apply-templates mode="iden"/>
        </xsl:for-each>
      </tei:glossListEntry>
    </tei:list>
  </xsl:variable>
  <xsl:apply-templates select="$pair/tei:list/tei:glossListEntry"/>
</xsl:template>
Stylesheet location to.xsl
Template tei:glossListEntry
Namespace No namespace
Match tei:glossListEntry
Mode #default
References
Template
Import precedence 17
Source
<xsl:template match="tei:glossListEntry">
  <xsl:call-template name="block-element">
    <xsl:with-param name="style">dl</xsl:with-param>
    <xsl:with-param name="pPr">
      <w:pPr>
        <w:pStyle w:val="dl"/>
        <w:ind w:left="360" w:hanging="360"/>
      </w:pPr>
    </xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location to.xsl
Template tei:seg[not(@*) and normalize-space(.)='']
Namespace No namespace
Match tei:seg[not(@*) and normalize-space(.)='']
Mode #default
Import precedence 17
Source
<xsl:template match="tei:seg[not(@*) and normalize-space(.)='']">
  <w:r>
    <w:t>
      <xsl:attribute name="xml:space">preserve</xsl:attribute>
      <xsl:text> </xsl:text>
    </w:t>
  </w:r>
</xsl:template>
Stylesheet location to.xsl
Template tei:date[ancestor::tei:teiHeader]
Documentation

Description

 
        Block Templates:
        Here we can overwrite how block elements are rendered
    
 Dates 
Namespace No namespace
Match tei:date[ancestor::tei:teiHeader]
Mode #default
Import precedence 17
Source
<xsl:template match="tei:date[ancestor::tei:teiHeader]">
  <w:r>
    <w:rPr>
      <w:rStyle w:val="date"/>
    </w:rPr>
    <w:t>
      <xsl:value-of select="."/>
    </w:t>
  </w:r>
</xsl:template>
Stylesheet location to.xsl
Template tei:formula
Documentation

Description

 formulas 
Namespace No namespace
Match tei:formula
Mode #default
References
Template
Import precedence 17
Source
<xsl:template match="tei:formula">
  <w:p>
    <w:pPr>
      <w:pStyle w:val="Formula"/>
    </w:pPr>
    <xsl:call-template name="block-element">
      <xsl:with-param name="nop">true</xsl:with-param>
    </xsl:call-template>
    <xsl:if test="@n">
      <w:r>
        <w:tab/>
      </w:r>
      <w:r>
        <w:rPr>
          <w:rStyle w:val="FormulaReference"/>
        </w:rPr>
        <w:t xml:space="preserve"><xsl:value-of select="@n"/>
        </w:t>
      </w:r>
    </xsl:if>
  </w:p>
</xsl:template>
Stylesheet location to.xsl
Template created-by
Documentation

Description

 who created this document 
Namespace No namespace
Supersedes
Template
Import precedence 17
Source
<xsl:template name="created-by">
  <xsl:text>TEI XSL</xsl:text>
</xsl:template>
Stylesheet location to.xsl
Template tei:listPerson
Documentation

Description

 fake listPerson into an unordered list 
Namespace No namespace
Match tei:listPerson
Mode #default
Import precedence 17
Source
<xsl:template match="tei:listPerson">
  <xsl:variable name="mylist">
    <tei:list type="unordered">
      <xsl:apply-templates/>
    </tei:list>
  </xsl:variable>
  <xsl:apply-templates select="$mylist"/>
</xsl:template>
Stylesheet location to.xsl
Template tei:person
Namespace No namespace
Match tei:person
Mode #default
Import precedence 17
Source
<xsl:template match="tei:person">
  <tei:item>
    <xsl:copy-of select="*|text()"/>
  </tei:item>
</xsl:template>
Stylesheet location to.xsl
Template tei:affiliation
Namespace No namespace
Match tei:affiliation
Mode #default
Import precedence 17
Source
<xsl:template match="tei:affiliation">
  <w:r>
    <w:br/>
  </w:r>
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location to.xsl
Template defineOrderedLists
Namespace No namespace
Used by
Supersedes
Import precedence 17
Source
<xsl:template name="defineOrderedLists">
  <w:abstractNum w:abstractNumId="3">
    <w:multiLevelType w:val="multilevel"/>
    <w:lvl w:ilvl="0">
      <w:start w:val="1"/>
      <w:numFmt w:val="decimal"/>
      <w:pStyle w:val="ListNumber"/>
      <w:lvlText w:val="%1."/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="360" w:hanging="360"/>
      </w:pPr>
      <w:rPr>
        <w:rFonts w:hint="default"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="1">
      <w:start w:val="1"/>
      <w:numFmt w:val="lowerLetter"/>
      <w:pStyle w:val="ListNumber2"/>
      <w:lvlText w:val="%2)"/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="720" w:hanging="360"/>
      </w:pPr>
      <w:rPr>
        <w:rFonts w:hint="default"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="2">
      <w:start w:val="1"/>
      <w:numFmt w:val="lowerRoman"/>
      <w:pStyle w:val="ListNumber3"/>
      <w:lvlText w:val="%3)"/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="1080" w:hanging="360"/>
      </w:pPr>
      <w:rPr>
        <w:rFonts w:hint="default"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="3">
      <w:start w:val="1"/>
      <w:numFmt w:val="upperRoman"/>
      <w:pStyle w:val="ListNumber4"/>
      <w:lvlText w:val="%4)"/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="1440" w:hanging="360"/>
      </w:pPr>
      <w:rPr>
        <w:rFonts w:hint="default"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="4">
      <w:start w:val="1"/>
      <w:numFmt w:val="lowerLetter"/>
      <w:lvlText w:val="(%5)"/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="1800" w:hanging="360"/>
      </w:pPr>
      <w:rPr>
        <w:rFonts w:hint="default"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="5">
      <w:start w:val="1"/>
      <w:numFmt w:val="lowerRoman"/>
      <w:lvlText w:val="(%6)"/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="2160" w:hanging="360"/>
      </w:pPr>
      <w:rPr>
        <w:rFonts w:hint="default"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="6">
      <w:start w:val="1"/>
      <w:numFmt w:val="decimal"/>
      <w:lvlText w:val="%7."/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="2520" w:hanging="360"/>
      </w:pPr>
      <w:rPr>
        <w:rFonts w:hint="default"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="7">
      <w:start w:val="1"/>
      <w:numFmt w:val="lowerLetter"/>
      <w:lvlText w:val="%8."/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="2880" w:hanging="360"/>
      </w:pPr>
      <w:rPr>
        <w:rFonts w:hint="default"/>
      </w:rPr>
    </w:lvl>
    <w:lvl w:ilvl="8">
      <w:start w:val="1"/>
      <w:numFmt w:val="lowerRoman"/>
      <w:lvlText w:val="%9."/>
      <w:lvlJc w:val="left"/>
      <w:pPr>
        <w:ind w:left="3240" w:hanging="360"/>
      </w:pPr>
      <w:rPr>
        <w:rFonts w:hint="default"/>
      </w:rPr>
    </w:lvl>
  </w:abstractNum>
</xsl:template>
Stylesheet location to.xsl
Template @*|text()|comment()|processing-instruction()iden
Namespace No namespace
Match @*|text()|comment()|processing-instruction()
Mode iden
Supersedes
Import precedence 17
Source
<xsl:template match="@*|text()|comment()|processing-instruction()" mode="iden">
  <xsl:copy-of select="."/>
</xsl:template>
Stylesheet location to.xsl
Template *iden
Namespace No namespace
Match *
Mode iden
Supersedes
Template
Import precedence 17
Source
<xsl:template match="*" mode="iden">
  <xsl:copy>
    <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()" mode="iden"/>
  </xsl:copy>
</xsl:template>
Stylesheet location to.xsl
Template tei:lb[@rend='hidden']
Namespace No namespace
Match tei:lb[@rend='hidden']
Mode #default
Import precedence 17
Source
<xsl:template match="tei:lb[@rend='hidden']"/>
Stylesheet location to.xsl
Parameter renderAddDel
Namespace No namespace
Used by
Supersedes
Parameter
Source
<xsl:param name="renderAddDel">true</xsl:param>
Stylesheet location to.xsl
Parameter addColour
Namespace No namespace
Used by
Template
Supersedes
Parameter
Source
<xsl:param name="addColour">red</xsl:param>
Stylesheet location to.xsl
Parameter bulletOne
Namespace No namespace
Used by
Supersedes
Parameter
Source
<xsl:param name="bulletOne"></xsl:param>
Stylesheet location to.xsl
Parameter bulletTwo
Namespace No namespace
Used by
Supersedes
Parameter
Source
<xsl:param name="bulletTwo"></xsl:param>
Stylesheet location to.xsl
Parameter word-directory
Namespace No namespace
Used by
Variable
Parameter
Supersedes
Parameter
Source
<xsl:param name="word-directory">..</xsl:param>
Stylesheet location to.xsl
Parameter debug
Namespace No namespace
Used by
Supersedes
Parameter
Source
<xsl:param name="debug">false</xsl:param>
Stylesheet location to.xsl
Parameter styleDoc
Namespace No namespace
Used by
Template
References
Parameter
Supersedes
Parameter
Source
<xsl:param name="styleDoc">
  <xsl:value-of select="concat($word-directory, '/word/styles.xml')"/>
</xsl:param>
Stylesheet location to.xsl