Showing:

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

Description

ISO-specific overrides for TEI stylesheet to convert TEI XML to Word DOCX XML.

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: to.xsl 7847 2010-07-16 11:06:48Z rahtz $

Copyright: 2008, TEI Consortium

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

Description

 Styles 
Namespace No namespace
Match tei:abbr
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:abbr" mode="get-style">abbr</xsl:template>
Stylesheet location to.xsl
Template tei:citget-style
Namespace No namespace
Match tei:cit
Mode get-style
Import precedence 16
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 16
Source
<xsl:template match="tei:date" mode="get-style">date</xsl:template>
Stylesheet location to.xsl
Template tei:formulaget-style
Namespace No namespace
Match tei:formula
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:formula" mode="get-style">Formula</xsl:template>
Stylesheet location to.xsl
Template tei:list[@type='termlist' and ancestor-or-self::*/@type='termsAndDefinitions']/tei:item/tei:abbrget-style
Namespace No namespace
Match tei:list[@type='termlist' and ancestor-or-self::*/@type='termsAndDefinitions']/tei:item/tei:abbr
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:list[@type='termlist' and ancestor-or-self::*/@type='termsAndDefinitions']/tei:item/tei:abbr" mode="get-style">ExtRef</xsl:template>
Stylesheet location to.xsl
Template tei:mentionedget-style
Namespace No namespace
Match tei:mentioned
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:mentioned" mode="get-style">mentioned</xsl:template>
Stylesheet location to.xsl
Template tei:orgNameget-style
Namespace No namespace
Match tei:orgName
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:orgName" mode="get-style">orgName</xsl:template>
Stylesheet location to.xsl
Template tei:p[@rend]get-style
Namespace No namespace
Match tei:p[@rend]
Mode get-style
References
Template getStyleName
Import precedence 16
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:quoteget-style
Namespace No namespace
Match tei:quote
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:quote" mode="get-style">Quote</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 16
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='FormulaReference']
Namespace No namespace
Match tei:seg[@rend='FormulaReference']
Mode #default
Import precedence 16
Source
<xsl:template match="tei:seg[@rend='FormulaReference']">FormulaReference</xsl:template>
Stylesheet location to.xsl
Template tei:seg[@iso:provision]get-style
Namespace No namespace
Match tei:seg[@iso:provision]
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:seg[@iso:provision]" mode="get-style">
  <xsl:value-of select="@iso:provision"/>
</xsl:template>
Stylesheet location to.xsl
Template tei:seg[@rend]get-style
Namespace No namespace
Match tei:seg[@rend]
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:seg[@rend]" mode="get-style">
  <xsl:value-of select="@rend"/>
</xsl:template>
Stylesheet location to.xsl
Template tei:hi[@rend='language']get-style
Namespace No namespace
Match tei:hi[@rend='language']
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:hi[@rend='language']" mode="get-style">
  <xsl:text>language</xsl:text>
</xsl:template>
Stylesheet location to.xsl
Template tei:hi[@rend='FigureFootnoteXref']get-style
Namespace No namespace
Match tei:hi[@rend='FigureFootnoteXref']
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:hi[@rend='FigureFootnoteXref']" mode="get-style">
  <xsl:text>FigureFootnoteXref</xsl:text>
</xsl:template>
Stylesheet location to.xsl
Template tei:hi[@rend='source']get-style
Namespace No namespace
Match tei:hi[@rend='source']
Mode get-style
Import precedence 16
Source
<xsl:template match="tei:hi[@rend='source']" mode="get-style">
  <xsl:text>source</xsl:text>
</xsl:template>
Stylesheet location to.xsl
Template tei:c[@iso:style and @n]
Documentation

Description

Inline Templates: Here we can overwrite how inline elements are rendered
Namespace No namespace
Match tei:c[@iso:style and @n]
Mode #default
References
Template applyRend
Import precedence 16
Source
<xsl:template match="tei:c[@iso:style and @n]">
  <w:r>
    <xsl:variable name="renderingProperties">
      <xsl:call-template name="applyRend"/>
    </xsl:variable>
    <xsl:if test="not(empty($renderingProperties))">
      <w:rPr>
        <xsl:copy-of select="$renderingProperties"/>
      </w:rPr>
    </xsl:if>
    <w:sym w:char="{@n}">
      <xsl:for-each select="tokenize(@iso:style,';')">
        <xsl:if test="starts-with(.,'font-family')">
          <xsl:attribute name="w:font">
            <xsl:value-of select="normalize-space(substring-after(.,':'))"/>
          </xsl:attribute>
        </xsl:if>
      </xsl:for-each>
    </w:sym>
  </w:r>
</xsl:template>
Stylesheet location to.xsl
Template tei:editionStmt
Namespace No namespace
Match tei:editionStmt
Mode #default
Import precedence 16
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:num
Documentation

Description

Handle Numbers
Namespace No namespace
Match tei:num
Mode #default
References
Import precedence 16
Source
<xsl:template match="tei:num">
  <w:r>
    <w:rPr>
      <w:rStyle w:val="isonumber"/>
      <xsl:if test="teidocx:render-bold(.)">
        <w:b/>
      </xsl:if>
    </w:rPr>
    <w:t>
      <xsl:choose>
        <xsl:when test="$numberFormat='fr'">
          <xsl:value-of select="."/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="translate(.,', ','.,')"/>
        </xsl:otherwise>
      </xsl:choose>
    </w:t>
  </w:r>
</xsl:template>
Stylesheet location to.xsl
Template tei:numiden
Namespace No namespace
Match tei:num
Mode iden
Import precedence 16
Source
<xsl:template match="tei:num" mode="iden">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location to.xsl
Template tei:pb
Namespace No namespace
Match tei:pb
Mode #default
Import precedence 16
Source
<xsl:template match="tei:pb">
  <w:r>
    <w:br w:type="page"/>
  </w:r>
</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 16
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
Documentation

Description

Dates

Description

	Block Templates:
	Here we can overwrite how block elements are rendered
    
Namespace No namespace
Match tei:date
Mode #default
Supersedes
Template tei:date
Import precedence 16
Source
<xsl:template match="tei:date">
  <xsl:choose>
    <xsl:when test="ancestor::tei:biblStruct">
      <xsl:apply-imports/>
    </xsl:when>
    <xsl:otherwise>
      <w:r>
        <w:rPr>
          <w:rStyle w:val="date"/>
        </w:rPr>
        <w:t>
          <xsl:value-of select="."/>
        </w:t>
      </w:r>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location to.xsl
Template tei:formula
Documentation

Description

Process formulae
Namespace No namespace
Match tei:formula
Mode #default
References
Template block-element
Import precedence 16
Source
<xsl:template match="tei:formula">
  <xsl:choose>
    <xsl:when test="parent::cals:entry or parent::tei:title">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:otherwise>
      <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:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location to.xsl
Template tei:p
Documentation

Description

Process plain paragraph
Namespace No namespace
Match tei:p
Mode #default
References
Parameters
QName Namespace
pPr No namespace
style No namespace
Import precedence 16
Source
<xsl:template match="tei:p">
  <xsl:param name="style"/>
  <xsl:param name="pPr"/>
  <xsl:variable name="pstyle">
    <w:pPr>
      <xsl:choose>
        <xsl:when test="@rend">
          <w:pStyle>
            <xsl:attribute name="w:val">
              <xsl:call-template name="getStyleName">
                <xsl:with-param name="in" select="@rend"/>
              </xsl:call-template>
            </xsl:attribute>
          </w:pStyle>
        </xsl:when>
        <xsl:when test="string-length($style) > 0">
          <w:pStyle w:val="{$style}"/>
        </xsl:when>
      </xsl:choose>
      <xsl:if test="@iso:style">
        <xsl:call-template name="undoSpecialStyle">
          <xsl:with-param name="css">
            <xsl:value-of select="@iso:style"/>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:if>
    </w:pPr>
  </xsl:variable>
  <xsl:call-template name="block-element">
    <xsl:with-param name="pPr" select="$pstyle"/>
  </xsl:call-template>
</xsl:template>
Stylesheet location to.xsl
Template undoSpecialStyle
Documentation

Description

Turn iso:style attribute back into Word styles
Namespace No namespace
Used by
Template tei:p
References
Parameters
QName Namespace
css No namespace
Import precedence 16
Source
<xsl:template name="undoSpecialStyle">
  <xsl:param name="css"/>
  <xsl:for-each-group select="tokenize($css,';')" group-adjacent="if (matches(., 'margin-(left|right)')) then 1 else                    if (matches(., 'margin-(top|bottom)')) then 2 else 0">
    <xsl:choose>
      <xsl:when test="current-grouping-key()=1">
        <xsl:call-template name="getStyleMarginsH"/>
      </xsl:when>
      <xsl:when test="current-grouping-key()=2">
        <xsl:call-template name="getStyleMarginsV"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:for-each select="current-group()">
          <xsl:if test="contains(., 'text-align')">
            <xsl:variable name="val">
              <xsl:value-of select="normalize-space(substring-after(.,':'))"/>
            </xsl:variable>
            <w:jc w:val="{$val}"/>
          </xsl:if>
          <xsl:if test="contains(., 'direction')">
            <xsl:variable name="val">
              <xsl:value-of select="normalize-space(substring-after(.,':'))"/>
            </xsl:variable>
            <xsl:if test="matches($val,'rtl')">
              <w:rtl/>
            </xsl:if>
          </xsl:if>
        </xsl:for-each>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:for-each-group>
  <w:rPr>
    <xsl:call-template name="getStyleFonts">
      <xsl:with-param name="css" select="$css"/>
    </xsl:call-template>
  </w:rPr>
</xsl:template>
Stylesheet location to.xsl
Template getStyleMarginsH
Namespace No namespace
Used by
Template undoSpecialStyle
Import precedence 16
Source
<xsl:template name="getStyleMarginsH">
  <w:ind>
    <xsl:for-each select="current-group()">
      <xsl:variable name="style">
        <xsl:value-of select="normalize-space(substring-before(.,':'))"/>
      </xsl:variable>
      <xsl:variable name="val">
        <xsl:value-of select="normalize-space(substring-after(.,':'))"/>
      </xsl:variable>
      <xsl:if test="contains($style, 'margin-left')">
        <xsl:attribute name="w:left">
          <xsl:value-of select="$val"/>
        </xsl:attribute>
      </xsl:if>
      <xsl:if test="contains($style, 'margin-right')">
        <xsl:attribute name="w:right">
          <xsl:value-of select="$val"/>
        </xsl:attribute>
      </xsl:if>
    </xsl:for-each>
  </w:ind>
</xsl:template>
Stylesheet location to.xsl
Template getStyleMarginsV
Namespace No namespace
Used by
Template undoSpecialStyle
Import precedence 16
Source
<xsl:template name="getStyleMarginsV">
  <w:spacing>
    <xsl:for-each select="current-group()">
      <xsl:variable name="val">
        <xsl:value-of select="normalize-space(substring-after(.,':'))"/>
      </xsl:variable>
      <xsl:choose>
        <xsl:when test="contains(., 'margin-top')">
          <xsl:attribute name="w:before">
            <xsl:value-of select="$val"/>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="contains(., 'margin-bottom')">
          <xsl:attribute name="w:after">
            <xsl:value-of select="$val"/>
          </xsl:attribute>
        </xsl:when>
      </xsl:choose>
    </xsl:for-each>
  </w:spacing>
</xsl:template>
Stylesheet location to.xsl
Template getStyleFonts
Documentation

Description

Extract font information from iso:style
Namespace No namespace
Used by
Supersedes
Template getStyleFonts
Parameters
QName Namespace
css No namespace
Import precedence 16
Source
<xsl:template name="getStyleFonts">
  <xsl:param name="css"/>
  <xsl:variable name="tokenizedCss" select="tokenize($css,';')"/>
  <xsl:for-each select="$tokenizedCss">
    <xsl:variable name="val">
      <xsl:value-of select="normalize-space(substring-after(.,':'))"/>
    </xsl:variable>
    <xsl:choose>
      <xsl:when test="contains(., 'font-family')">
        <w:rFonts w:ascii="{$val}" w:hAnsi="{$val}"/>
      </xsl:when>
      <xsl:when test="contains(., 'font-size')">
        <w:sz w:val="{$val}"/>
      </xsl:when>
    </xsl:choose>
  </xsl:for-each>
</xsl:template>
Stylesheet location to.xsl
Template tei:listBibl
Documentation

Description

Process bibliography
Namespace No namespace
Match tei:listBibl
Mode #default
References
Import precedence 16
Source
<xsl:template match="tei:listBibl">
  <xsl:choose>
    <xsl:when test="ancestor-or-self::*[@type='normativeReferences']">
      <xsl:for-each select="tei:bibl">
        <xsl:call-template name="block-element">
          <xsl:with-param name="pPr">
            <w:pPr>
              <w:pStyle>
                <xsl:attribute name="w:val">
                  <xsl:call-template name="getStyleName">
                    <xsl:with-param name="in">
                      <xsl:text>RefNorm</xsl:text>
                    </xsl:with-param>
                  </xsl:call-template>
                </xsl:attribute>
              </w:pStyle>
            </w:pPr>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location to.xsl
Template tei:note[@place]
Documentation

Description

Process notes which have a place attribute
Namespace No namespace
Match tei:note[@place]
Mode #default
References
Import precedence 16
Source
<xsl:template match="tei:note[@place]">
  <xsl:choose>
    <xsl:when test="@place='comment'">
      <xsl:call-template name="create-comment"/>
    </xsl:when>
    <xsl:when test="@place='foot'  or @place='bottom' or @place='tablefoot'">
      <xsl:call-template name="create-footnote"/>
    </xsl:when>
    <xsl:when test="@place='end'">
      <xsl:call-template name="create-endnote"/>
    </xsl:when>
    <xsl:when test="ancestor::tei:cell or ancestor::cals:entry">
      <xsl:call-template name="create-inlinenote"/>
    </xsl:when>
    <xsl:when test="@place='inline' and not(parent::tei:div)">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:call-template name="block-element">
        <xsl:with-param name="pPr">
          <w:pPr>
            <w:pStyle>
              <xsl:attribute name="w:val">
                <xsl:choose>
                  <xsl:when test="@type">
                    <xsl:value-of select="@type"/>
                  </xsl:when>
                  <xsl:otherwise>Note</xsl:otherwise>
                </xsl:choose>
              </xsl:attribute>
            </w:pStyle>
          </w:pPr>
        </xsl:with-param>
        <xsl:with-param name="nop">false</xsl:with-param>
      </xsl:call-template>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location to.xsl
Template tei:note[@rend]
Documentation

Description

Process notes which have a rend attribute
Namespace No namespace
Match tei:note[@rend]
Mode #default
References
Template block-element
Import precedence 16
Source
<xsl:template match="tei:note[@rend]">
  <xsl:call-template name="block-element">
    <xsl:with-param name="pPr">
      <w:pPr>
        <w:pStyle>
          <xsl:attribute name="w:val">
            <xsl:choose>
              <xsl:when test="@rend='Notenumbered'">Notenumbered</xsl:when>
              <xsl:when test="@rend='Noteparagraph'">Noteparagraph</xsl:when>
              <xsl:when test="@rend='Notelist'">Notelist</xsl:when>
              <xsl:when test="@rend='Tablenote'">Tablenote</xsl:when>
              <xsl:when test="@rend='Figurenote'">Figurenote</xsl:when>
              <xsl:when test="@rend='Figurefootnote'">Figurefootnote</xsl:when>
              <xsl:when test="@rend='Exampleparagraph'">Exampleparagraph</xsl:when>
              <xsl:when test="@rend='Examplenumbered'">Examplenumbered</xsl:when>
              <xsl:otherwise>Note</xsl:otherwise>
            </xsl:choose>
          </xsl:attribute>
        </w:pStyle>
      </w:pPr>
    </xsl:with-param>
    <xsl:with-param name="nop">false</xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location to.xsl
Template create-footnote
Namespace No namespace
Used by
Template tei:note[@place]
References
Templates block-element; getStyleName
Variable Note
Supersedes
Template create-footnote
Import precedence 16
Source
<xsl:template name="create-footnote">
  <xsl:variable name="pPr">
    <xsl:choose>
      <xsl:when test="(@place='tablefoot') and  (ancestor::tei:cell      or ancestor::cals:entry)">
        <w:pPr>
          <w:pStyle w:val="Tablefootnote"/>
        </w:pPr>
        <w:r>
          <w:rPr>
            <w:rStyle w:val="TableFootnoteXref"/>
            <w:position w:val="6"/>
            <w:sz w:val="16"/>
          </w:rPr>
          <w:t>
            <xsl:value-of select="@n"/>
          </w:t>
        </w:r>
        <w:r>
          <w:t>
            <xsl:text> </xsl:text>
          </w:t>
        </w:r>
      </xsl:when>
      <xsl:when test="@place='foot'  or @place='bottom'"/>
      <xsl:when test="@type='Example' and @iso:class='numbered'">
        <w:pPr>
          <w:pStyle w:val="Examplenumbered"/>
        </w:pPr>
      </xsl:when>
      <xsl:when test="@type='Example' and @iso:class='list'">
        <w:pPr>
          <w:pStyle w:val="Examplelist"/>
        </w:pPr>
      </xsl:when>
      <xsl:when test="@type='Example'">
        <w:pPr>
          <w:pStyle w:val="Example"/>
        </w:pPr>
      </xsl:when>
      <xsl:when test="parent::tei:cell or parent::cals:entry">
        <w:pPr>
          <xsl:variable name="Tablenote">
            <xsl:call-template name="getStyleName">
              <xsl:with-param name="in">
                <xsl:value-of select="$Note"/>
              </xsl:with-param>
            </xsl:call-template>
          </xsl:variable>
          <w:pStyle w:val="Tablenote"/>
        </w:pPr>
      </xsl:when>
      <xsl:otherwise>
        <w:pPr>
          <w:pStyle w:val="Footnote"/>
        </w:pPr>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="$pPr/*">
      <xsl:call-template name="block-element">
        <xsl:with-param name="pPr" select="$pPr"/>
        <xsl:with-param name="nop">false</xsl:with-param>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:variable name="num">
        <xsl:number count="tei:note[@place='foot' or @place='bottom'][not(ancestor::cals:entry)]" level="any"/>
      </xsl:variable>
      <xsl:variable name="id" select="$num+1"/>
      <w:r>
        <w:rPr>
          <w:rStyle w:val="FootnoteReference"/>
        </w:rPr>
        <w:footnoteReference w:id="{$id}"/>
      </w:r>
      <xsl:if test="ancestor::tei:bibl">
        <w:r>
          <w:rPr>
            <w:rStyle w:val="FootnoteReference"/>
          </w:rPr>
          <w:t>)</w:t>
        </w:r>
      </xsl:if>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location to.xsl
Template tei:note/tei:p
Namespace No namespace
Match tei:note/tei:p
Mode #default
Import precedence 16
Source
<xsl:template match="tei:note/tei:p">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location to.xsl
Template create-inlinenote
Namespace No namespace
Used by
Template tei:note[@place]
References
Template block-element
Import precedence 16
Source
<xsl:template name="create-inlinenote">
  <xsl:variable name="pPr">
    <w:pPr>
      <w:pStyle w:val="Tablenote"/>
    </w:pPr>
  </xsl:variable>
  <xsl:call-template name="block-element">
    <xsl:with-param name="pPr" select="$pPr"/>
    <xsl:with-param name="nop">false</xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location to.xsl
Template tei:front/tei:div/tei:p[@type='foreword']
Documentation

Description

Paragraphs in the front matter
Namespace No namespace
Match tei:front/tei:div/tei:p[@type='foreword']
Mode #default
References
Template block-element
Variables lowercase; uppercase
Import precedence 16
Source
<xsl:template match="tei:front/tei:div/tei:p[@type='foreword']">
  <xsl:call-template name="block-element">
    <xsl:with-param name="pPr">
      <w:pPr>
        <w:pStyle>
          <xsl:attribute name="w:val">
            <xsl:value-of select="concat(translate(substring(parent::tei:div/@type,1,1),$lowercase,$uppercase),substring(parent::tei:div/@type,2))"/>
          </xsl:attribute>
        </w:pStyle>
      </w:pPr>
    </xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location to.xsl
Template tei:front/tei:div[@type='toc']
Documentation

Description

Table of contents section
Namespace No namespace
Match tei:front/tei:div[@type='toc']
Mode #default
References
Template block-element
Import precedence 16
Source
<xsl:template match="tei:front/tei:div[@type='toc']">
  <xsl:call-template name="block-element">
    <xsl:with-param name="pPr">
      <w:pPr>
        <w:pStyle w:val="zzContents"/>
      </w:pPr>
    </xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location to.xsl
Template tei:list[@type='gloss']
Documentation

Description

Definition lists
Namespace No namespace
Match tei:list[@type='gloss']
Mode #default
References
Template block-element
Import precedence 16
Source
<xsl:template match="tei:list[@type='gloss']">
  <xsl:for-each select="tei:head">
    <xsl:call-template name="block-element">
      <xsl:with-param name="pPr">
        <w:pPr>
          <w:pStyle w:val="dl"/>
          <w:tabs>
            <w:tab w:val="left" w:pos="403"/>
          </w:tabs>
        </w:pPr>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:for-each>
  <xsl:for-each select="tei:label">
    <w:p>
      <w:pPr>
        <w:pStyle w:val="dl"/>
        <w:tabs>
          <w:tab w:val="left" w:pos="403"/>
        </w:tabs>
      </w:pPr>
      <xsl:apply-templates>
        <xsl:with-param name="nop">true</xsl:with-param>
      </xsl:apply-templates>
      <w:r>
        <w:tab/>
      </w:r>
      <xsl:for-each select="following-sibling::tei:item[1]">
        <xsl:apply-templates>
          <xsl:with-param name="nop">true</xsl:with-param>
        </xsl:apply-templates>
      </xsl:for-each>
    </w:p>
  </xsl:for-each>
</xsl:template>
Stylesheet location to.xsl
Template tei:list[@type='termlist' and ancestor-or-self::*/@type='termsAndDefinitions']/tei:item/tei:term
Documentation

Description

 Terms and Definitions 
Namespace No namespace
Match tei:list[@type='termlist' and ancestor-or-self::*/@type='termsAndDefinitions']/tei:item/tei:term
Mode #default
References
Import precedence 16
Source
<xsl:template match="tei:list[@type='termlist' and ancestor-or-self::*/@type='termsAndDefinitions']/tei:item/tei:term">
  <w:p>
    <w:pPr>
      <w:pStyle>
        <xsl:attribute name="w:val">
          <xsl:call-template name="getStyleName">
            <xsl:with-param name="in">
              <xsl:text>TermNum</xsl:text>
            </xsl:with-param>
          </xsl:call-template>
        </xsl:attribute>
      </w:pStyle>
    </w:pPr>
    <w:r>
      <w:t>
        <xsl:value-of select="ancestor-or-self::*[@n][1]/@n"/>
      </w:t>
    </w:r>
  </w:p>
  <xsl:call-template name="block-element">
    <xsl:with-param name="style">termPreferred</xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location to.xsl
Template tei:list[@type='termlist' and ancestor-or-self::*/@type='termsAndDefinitions']/tei:item/tei:gloss
Namespace No namespace
Match tei:list[@type='termlist' and ancestor-or-self::*/@type='termsAndDefinitions']/tei:item/tei:gloss
Mode #default
References
Import precedence 16
Source
<xsl:template match="tei:list[@type='termlist' and ancestor-or-self::*/@type='termsAndDefinitions']/tei:item/tei:gloss">
  <xsl:call-template name="block-element">
    <xsl:with-param name="style">
      <xsl:variable name="style">
        <xsl:call-template name="getStyleName">
          <xsl:with-param name="in">
            <xsl:text>GlossText</xsl:text>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:variable>
      <xsl:choose>
        <xsl:when test="$style=''">
          <xsl:text>Definition</xsl:text>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="$style"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location to.xsl
Template tei:titleStmt
Documentation

Description

 titleStmt 
Namespace No namespace
Match tei:titleStmt
Mode #default
Parameters
QName Namespace Type
id_start No namespace xs:integer
language No namespace xs:string
Import precedence 16
Source
<xsl:template match="tei:titleStmt">
  <xsl:param name="language" as="xs:string">en</xsl:param>
  <xsl:param name="id_start" as="xs:integer">0</xsl:param>
  <xsl:for-each select="tei:title">
    <xsl:if test="@xml:lang=$language">
      <xsl:variable name="title_type">
        <xsl:value-of select="@type"/>Title</xsl:variable>
      <xsl:variable name="id">
        <xsl:value-of select="position()+$id_start"/>
      </xsl:variable>
      <w:sdt>
        <w:sdtPr>
          <w:alias w:val="{$title_type}"/>
          <w:tag w:val="{$title_type}"/>
          <w:id w:val="{$id}"/>
          <w:lock w:val="sdtLocked"/>
          <w:placeholder>
            <w:docPart w:val="0949DFCE5F58405499B2741B51A42BCD"/>
          </w:placeholder>
          <w:text/>
        </w:sdtPr>
        <w:sdtContent>
          <w:r>
            <w:t>
              <xsl:value-of select="normalize-space(.)"/>
            </w:t>
          </w:r>
        </w:sdtContent>
      </w:sdt>
      <xsl:choose>
        <xsl:when test="position()=1 or position()=4">
          <w:r>
            <w:t xml:space="preserve"> </w:t>
          </w:r>
          <w:r>
            <w:t xml:space="preserve"></w:t>
          </w:r>
        </xsl:when>
        <xsl:when test="position()=2 or position()=5">
          <w:r>
            <w:t xml:space="preserve"> </w:t>
          </w:r>
          <w:r>
            <xsl:choose>
              <xsl:when test="$language='en'">
                <w:t xml:space="preserve">– Part </w:t>
              </xsl:when>
              <xsl:otherwise>
                <w:t xml:space="preserve">– Partie </w:t>
              </xsl:otherwise>
            </xsl:choose>
          </w:r>
          <w:sdt>
            <w:sdtPr>
              <w:alias w:val="partNumber"/>
              <w:tag w:val="partNumber"/>
              <xsl:choose>
                <xsl:when test="$language='en'">
                  <w:id w:val="680634476"/>
                </xsl:when>
                <xsl:otherwise>
                  <w:id w:val="680634477"/>
                </xsl:otherwise>
              </xsl:choose>
              <w:lock w:val="sdtLocked"/>
              <w:placeholder>
                <w:docPart w:val="0949DFCE5F58405499B2741B51A42BCD"/>
              </w:placeholder>
              <w:text/>
            </w:sdtPr>
            <w:sdtContent>
              <w:r>
                <w:t>
                  <xsl:value-of select="//tei:publicationStmt/tei:idno[@iso:meta='partNumber']"/>
                </w:t>
              </w:r>
            </w:sdtContent>
          </w:sdt>
          <w:r>
            <w:t xml:space="preserve">: </w:t>
          </w:r>
        </xsl:when>
        <xsl:otherwise/>
      </xsl:choose>
    </xsl:if>
  </xsl:for-each>
</xsl:template>
Stylesheet location to.xsl
Template document-title
Documentation

Description

Document title
Namespace No namespace
Used by
References
Template generateTitle
Supersedes
Template document-title
Import precedence 16
Source
<xsl:template name="document-title">
  <w:p>
    <w:pPr>
      <w:pStyle w:val="zzSTDTitle"/>
    </w:pPr>
    <w:r>
      <w:t>
        <xsl:call-template name="generateTitle"/>
      </w:t>
    </w:r>
  </w:p>
</xsl:template>
Stylesheet location to.xsl
Template generate-toc
Documentation

Description

Table of Contents
Namespace No namespace
Used by
Template tei:divGen
Supersedes
Template generate-toc
Import precedence 16
Source
<xsl:template name="generate-toc">
  <w:p>
    <w:pPr>
      <w:pStyle w:val="TOC9"/>
      <w:tabs>
        <w:tab w:val="right" w:leader="dot" w:pos="9350"/>
      </w:tabs>
    </w:pPr>
    <w:r>
      <w:fldChar w:fldCharType="begin"/>
    </w:r>
    <w:r>
      <w:rPr>
        <w:noProof/>
      </w:rPr>
      <xsl:choose>
        <xsl:when test="starts-with(.//processing-instruction('isotoc')[1], ' TOC ')">
          <w:instrText xml:space="preserve"><xsl:value-of select=".//processing-instruction('isotoc')[1]"/>
          </w:instrText>
        </xsl:when>
        <xsl:otherwise>
          <w:instrText xml:space="preserve"> TOC \h \z \t "Heading 1,1,Heading 2,2,Heading 3,3,zzForeword,9,Introduction,9,ANNEX,1,zzBiblio,9,zzIndex,9" </w:instrText>
        </xsl:otherwise>
      </xsl:choose>
    </w:r>
    <w:r>
      <w:fldChar w:fldCharType="separate"/>
    </w:r>
    <w:r>
      <w:t>To refresh the TOC press F9!</w:t>
    </w:r>
    <w:r>
      <w:fldChar w:fldCharType="end"/>
    </w:r>
  </w:p>
</xsl:template>
Stylesheet location to.xsl
Template created-by
Documentation

Description

Who created this document
Namespace No namespace
Used by
References
Key ISOMETA
Supersedes
Template created-by
Import precedence 16
Source
<xsl:template name="created-by">
  <xsl:value-of select="key('ISOMETA','secretariat')"/>
</xsl:template>
Stylesheet location to.xsl
Template tei:availabilitytitlepage
Namespace No namespace
Match tei:availability
Mode titlepage
References
Template block-element
Parameters
QName Namespace
style No namespace
Import precedence 16
Source
<xsl:template match="tei:availability" mode="titlepage">
  <xsl:param name="style"/>
  <xsl:for-each select="tei:p">
    <xsl:call-template name="block-element">
      <xsl:with-param name="style" select="$style"/>
    </xsl:call-template>
  </xsl:for-each>
</xsl:template>
Stylesheet location to.xsl
Template write-docxfiles
Documentation

Description

Create all the files of the docx archive; for ISO, don't write out most of the auxiliary files.
Namespace No namespace
Used by
Templates /tei:TEI; /tei:TEI
References
Supersedes
Template write-docxfiles
Import precedence 16
Source
<xsl:template name="write-docxfiles">
  <xsl:if test="$isofreestanding='true'">
    <!-- header and footers -->
    <xsl:call-template name="write-docxfile-header-files"/>
    <!-- footer files -->
    <xsl:call-template name="write-docxfile-footer-files"/>
    <!-- numbering file -->
    <xsl:call-template name="write-docxfile-numbering-definition"/>
    <!-- main relationships -->
    <xsl:call-template name="write-docxfile-main-relationships"/>
    <!-- relationships -->
    <xsl:call-template name="write-docxfile-relationships"/>
    <!-- write Content Types -->
    <xsl:call-template name="write-docxfile-content-types"/>
    <!--  settings -->
    <xsl:call-template name="write-docxfile-settings"/>
    <!-- app files -->
    <xsl:call-template name="write-docxfile-docprops-app"/>
  </xsl:if>
  <!-- footnotes file -->
  <xsl:call-template name="write-docxfile-footnotes-file"/>
  <!-- endnotes file -->
  <xsl:call-template name="write-docxfile-endnotes-file"/>
  <!-- comments file -->
  <xsl:call-template name="write-docxfile-comments-file"/>
  <xsl:call-template name="write-docxfile-docprops-core"/>
  <xsl:call-template name="write-docxfile-docprops-custom"/>
</xsl:template>
Stylesheet location to.xsl
Template create-document-dot-xml
Documentation

Description

Writes the main document.xml file, that contains all "real" content.
Namespace No namespace
Used by
Templates /tei:TEI; /tei:TEI
References
Supersedes
Import precedence 16
Source
<xsl:template name="create-document-dot-xml">
  <w:document>
    <w:body>
      <xsl:choose>
        <xsl:when test="$isofreestanding='true'">
          <xsl:call-template name="write-document-dot-xml-frontmatter"/>
          <xsl:call-template name="write-document-dot-xml-maincontent"/>
          <xsl:call-template name="write-document-dot-xml-backmatter"/>
        </xsl:when>
        <xsl:otherwise>
          <!-- Front -->
          <front>
            <xsl:call-template name="write-document-dot-xml-frontmatter"/>
          </front>
          <!-- Main -->
          <main>
            <xsl:call-template name="write-document-dot-xml-maincontent"/>
          </main>
          <!-- Back -->
          <back>
            <xsl:call-template name="write-document-dot-xml-backmatter"/>
          </back>
        </xsl:otherwise>
      </xsl:choose>
    </w:body>
  </w:document>
</xsl:template>
Stylesheet location to.xsl
Template write-docxfile-docprops-custom
Namespace No namespace
Used by
References
Parameters debug; word-directory
Keys ALLMETA; ISOMETA
Supersedes
Import precedence 16
Source
<xsl:template name="write-docxfile-docprops-custom">
  <xsl:if test="$debug='true'">
    <xsl:message>Writing out
      <xsl:value-of select="concat($word-directory,'/docProps/newcustom.xml')"/>
    </xsl:message>
  </xsl:if>
  <xsl:result-document href="{concat($word-directory,'/docProps/newcustom.xml')}" standalone="yes">
    <Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
      <property pid="2" name="DocIdentSDO">
        <xsl:attribute name="fmtid">
          <xsl:text>{D5CDD505-2E9C-101B-9397-08002B2CF9AE}</xsl:text>
        </xsl:attribute>
        <vt:lpwstr>
          <xsl:value-of select="key('ISOMETA','organization')"/>
        </vt:lpwstr>
      </property>
      <property pid="3" name="DocIdentProjectId">
        <xsl:attribute name="fmtid">
          <xsl:text>{D5CDD505-2E9C-101B-9397-08002B2CF9AE}</xsl:text>
        </xsl:attribute>
        <vt:lpwstr>
          <xsl:value-of select="key('ISOMETA','projectId')"/>
        </vt:lpwstr>
      </property>
      <property pid="4" name="DocIdentLanguage">
        <xsl:attribute name="fmtid">
          <xsl:text>{D5CDD505-2E9C-101B-9397-08002B2CF9AE}</xsl:text>
        </xsl:attribute>
        <vt:lpwstr>
          <xsl:value-of select="/tei:TEI/@xml:lang"/>
        </vt:lpwstr>
      </property>
      <property pid="5" name="DocIdentStage">
        <xsl:attribute name="fmtid">
          <xsl:text>{D5CDD505-2E9C-101B-9397-08002B2CF9AE}</xsl:text>
        </xsl:attribute>
        <vt:lpwstr>
          <xsl:value-of select="key('ISOMETA','stage')"/>
        </vt:lpwstr>
      </property>
      <property pid="6" name="DocIdentDate">
        <xsl:attribute name="fmtid">
          <xsl:text>{D5CDD505-2E9C-101B-9397-08002B2CF9AE}</xsl:text>
        </xsl:attribute>
        <vt:lpwstr>
          <xsl:value-of select="key('ISOMETA','docdate')"/>
        </vt:lpwstr>
      </property>
      <xsl:for-each select="key('ALLMETA',1)">
        <xsl:if test="@iso:meta != 'projectId' and not(starts-with(@iso:meta, 'fw_'))">
          <property name="{@iso:meta}">
            <xsl:attribute name="pid">
              <xsl:value-of select="position()+6"/>
            </xsl:attribute>
            <xsl:attribute name="fmtid">
              <xsl:text>{D5CDD505-2E9C-101B-9397-08002B2CF9AE}</xsl:text>
            </xsl:attribute>
            <vt:lpwstr>
              <xsl:value-of select="."/>
            </vt:lpwstr>
          </property>
        </xsl:if>
      </xsl:for-each>
      <property pid="1000" name="TEI_toDOCX">
        <xsl:attribute name="fmtid">
          <xsl:text>{D5CDD505-2E9C-101B-9397-08002B2CF9AE}</xsl:text>
        </xsl:attribute>
        <vt:lpwstr>2.15.0</vt:lpwstr>
      </property>
      <property pid="1001" name="WordTemplateURI">
        <xsl:attribute name="fmtid">
          <xsl:text>{D5CDD505-2E9C-101B-9397-08002B2CF9AE}</xsl:text>
        </xsl:attribute>
        <vt:lpwstr>
          <xsl:value-of select="ancestor-or-self::tei:TEI/tei:teiHeader/tei:encodingDesc/tei:appInfo/tei:application[@ident='WordTemplate']/tei:ptr/@target"/>
        </vt:lpwstr>
      </property>
      <xsl:for-each select="ancestor-or-self::tei:TEI/tei:teiHeader/tei:encodingDesc/tei:appInfo/tei:application">
        <xsl:if test="not(@ident='TEI_toDOCX')">
          <property name="{@ident}">
            <xsl:attribute name="pid">
              <xsl:value-of select="position()+1001"/>
            </xsl:attribute>
            <xsl:attribute name="fmtid">
              <xsl:text>{D5CDD505-2E9C-101B-9397-08002B2CF9AE}</xsl:text>
            </xsl:attribute>
            <vt:lpwstr>
              <xsl:value-of select="@version"/>
            </vt:lpwstr>
          </property>
        </xsl:if>
      </xsl:for-each>
    </Properties>
  </xsl:result-document>
</xsl:template>
Stylesheet location to.xsl
Template write-document-dot-xml-maincontent
Namespace No namespace
Used by
References
Parameter isofreestanding
Template document-title
Supersedes
Import precedence 16
Source
<xsl:template name="write-document-dot-xml-maincontent">
  <!-- document title -->
  <xsl:if test="$isofreestanding='true'">
    <xsl:call-template name="document-title"/>
  </xsl:if>
  <!-- Describes the main part of the document -->
  <xsl:apply-templates select="tei:text/tei:body"/>
</xsl:template>
Stylesheet location to.xsl
Template tei:q[@type='sdt']
Namespace No namespace
Match tei:q[@type='sdt']
Mode #default
Import precedence 16
Source
<xsl:template match="tei:q[@type='sdt']">
  <w:sdt>
    <w:sdtPr>
      <w:rPr>
        <w:noProof/>
        <w:lang w:val="en-GB"/>
      </w:rPr>
      <w:alias w:val="{@iso:meta}"/>
      <w:tag w:val="{@iso:meta}"/>
      <xsl:variable name="stdId">
        <xsl:number level="any"/>
      </xsl:variable>
      <w:id w:val="158666506{$stdId}"/>
    </w:sdtPr>
    <w:sdtContent>
      <xsl:apply-templates/>
    </w:sdtContent>
  </w:sdt>
</xsl:template>
Stylesheet location to.xsl
Template cals:table
Documentation

Description

Process CALS tables
Namespace No namespace
Match cals:table
Mode #default
References
Supersedes
Template cals:table
Import precedence 16
Source
<xsl:template match="cals:table">
  <xsl:choose>
    <xsl:when test="@tei:corresp and $tableMethod='word'">
      <xsl:call-template name="tableheading-from-cals"/>
      <xsl:if test="$debug='true'">
        <xsl:message>read table from
          <xsl:value-of select="@tei:corresp"/>
        </xsl:message>
      </xsl:if>
      <xsl:for-each select="document(concat($tei-directory,@tei:corresp))">
        <xsl:apply-templates mode="copytable"/>
      </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-imports/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location to.xsl
Template w:bottom | w:gridCol | w:gridSpan | w:insideH | w:insideV | w:jc | w:left | w:pPr | w:p | w:right | w:spacing | w:tbl | w:tblBorders | w:tblCellMar | w:tblGrid | w:tblLayout | w:tblLook | w:tblPr | w:tblStyle | w:tblW | w:tc | w:tcBorders | w:tcPr | w:tcW | w:top | w:tr | w:trPr | w:vAlign copytable
Namespace No namespace
Match w:bottom | w:gridCol | w:gridSpan | w:insideH | w:insideV | w:jc | w:left | w:pPr | w:p | w:right | w:spacing | w:tbl | w:tblBorders | w:tblCellMar | w:tblGrid | w:tblLayout | w:tblLook | w:tblPr | w:tblStyle | w:tblW | w:tc | w:tcBorders | w:tcPr | w:tcW | w:top | w:tr | w:trPr | w:vAlign
Mode copytable
Import precedence 16
Source
<xsl:template match="         w:bottom |          w:gridCol |          w:gridSpan |          w:insideH |          w:insideV |          w:jc |          w:left |          w:pPr |         w:p |         w:right |         w:spacing |           w:tbl |          w:tblBorders |          w:tblCellMar |          w:tblGrid |          w:tblLayout |          w:tblLook |          w:tblPr |          w:tblStyle |          w:tblW |          w:tc |          w:tcBorders |          w:tcPr |          w:tcW |          w:top |          w:tr |          w:trPr |          w:vAlign " mode="copytable">
  <xsl:copy>
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates/>
  </xsl:copy>
</xsl:template>
Stylesheet location to.xsl
Template tei:div[@type='headless']
Documentation

Description

Handling headless sections
Namespace No namespace
Match tei:div[@type='headless']
Mode #default
Import precedence 16
Source
<xsl:template match="tei:div[@type='headless']">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location to.xsl
Template tei:div[@type='headless']/tei:p[1]
Namespace No namespace
Match tei:div[@type='headless']/tei:p[1]
Mode #default
References
Parameter debug
Template block-element
Import precedence 16
Source
<xsl:template match="tei:div[@type='headless']/tei:p[1]">
  <xsl:variable name="level">
    <xsl:value-of select="count(ancestor-or-self::tei:div)"/>
  </xsl:variable>
  <xsl:variable name="s">
    <xsl:choose>
      <xsl:when test="@rend">
        <xsl:value-of select="@rend"/>
      </xsl:when>
      <xsl:when test="ancestor::tei:back">
        <xsl:text>pA</xsl:text>
        <xsl:value-of select="$level"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:text>p</xsl:text>
        <xsl:value-of select="$level"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <xsl:if test="$debug='true'">
    <xsl:message>Fire
      <xsl:value-of select="$level"/>[
      <xsl:value-of select="$s"/>] for
      <xsl:value-of select="@n"/>:
      <xsl:value-of select="."/>
    </xsl:message>
  </xsl:if>
  <xsl:call-template name="block-element">
    <xsl:with-param name="style" select="$s"/>
  </xsl:call-template>
</xsl:template>
Stylesheet location to.xsl
Template tei:milestone[@unit='section']pass2
Namespace No namespace
Match tei:milestone[@unit='section']
Mode pass2
Import precedence 16
Source
<xsl:template match="tei:milestone[@unit='section']" mode="pass2"/>
Stylesheet location to.xsl
Template tei:del
Documentation

Description

Deleted parts removed
Namespace No namespace
Match tei:del
Mode #default
Import precedence 16
Source
<xsl:template match="tei:del"/>
Stylesheet location to.xsl
Template simpleRun
Namespace No namespace
Used by
Supersedes
Template simpleRun
Parameters
QName Namespace
italic No namespace
prefix No namespace
text No namespace
Import precedence 16
Source
<xsl:template name="simpleRun">
  <xsl:param name="text"/>
  <xsl:param name="prefix"/>
  <xsl:param name="italic">false</xsl:param>
  <xsl:if test="not($prefix='')">
    <w:r>
      <w:t>
        <xsl:attribute name="xml:space">preserve</xsl:attribute>
        <xsl:value-of select="$prefix"/>
      </w:t>
    </w:r>
  </xsl:if>
  <w:r>
    <xsl:if test="$italic='true'">
      <w:rPr>
        <w:i/>
      </w:rPr>
    </xsl:if>
    <w:t>
      <xsl:attribute name="xml:space">preserve</xsl:attribute>
      <xsl:value-of select="$text"/>
    </w:t>
  </w:r>
</xsl:template>
Stylesheet location to.xsl
Template tei:figure/tei:head
Namespace No namespace
Match tei:figure/tei:head
Mode #default
Supersedes
Import precedence 16
Source
<xsl:template match="tei:figure/tei:head">
  <w:p>
    <w:pPr>
      <w:pStyle>
        <xsl:choose>
          <xsl:when test="@type='subtitle'">
            <xsl:attribute name="w:val">Figuresubtitle</xsl:attribute>
          </xsl:when>
          <xsl:otherwise>
            <xsl:attribute name="w:val">Figuretitle</xsl:attribute>
            <xsl:if test="not(normalize-space(.)='')">
              <w:r>
                <w:t xml:space="preserve"></w:t>
              </w:r>
            </xsl:if>
          </xsl:otherwise>
        </xsl:choose>
      </w:pStyle>
    </w:pPr>
    <xsl:apply-templates/>
  </w:p>
</xsl:template>
Stylesheet location to.xsl
Template processing-instruction()[name()='isotoc']
Namespace No namespace
Match processing-instruction()[name()='isotoc']
Mode #default
Import precedence 16
Source
<xsl:template match="processing-instruction()[name()='isotoc']">
  <xsl:value-of select="."/>
</xsl:template>
Stylesheet location to.xsl
Template /tei:TEI
Documentation

Description

    <xsl:template match="tei:p/tei:cit">
      <xsl:if test="@n">
	<w:r>
	  <w:t>
	    <xsl:text>(</xsl:text>
	    <xsl:value-of select="@n"/>
	    <xsl:text>) </xsl:text>
	  </w:t>
	</w:r>
      </xsl:if>
      <w:r>
	<w:rPr>
	  <w:rStyle w:val="Quote"/>
	</w:rPr>
	<xsl:apply-templates/>
      </w:r>
    </xsl:template>

    <xsl:template match="tei:div/tei:cit">
      <xsl:variable name="content">
	<xsl:copy>
	  <xsl:if test="@n">
	    <xsl:text>(</xsl:text>
	    <xsl:value-of select="@n"/>
	    <xsl:text>) </xsl:text>
	  </xsl:if>
	  <xsl:copy-of
	      select="*|processing-instruction()|comment()|text()"/>
	</xsl:copy>
      </xsl:variable>
      <xsl:for-each select="$content">
	<xsl:call-template name="block-element">
	  <xsl:with-param name="style">Quote</xsl:with-param>
        </xsl:call-template>
      </xsl:for-each>


    </xsl:template>
Namespace No namespace
Match /tei:TEI
Mode #default
References
Supersedes
Template /tei:TEI
Import precedence 16
Source
<xsl:template match="/tei:TEI">
  <xsl:variable name="phase1">
    <xsl:copy>
      <xsl:apply-templates select="*|@*|text()|processing-instruction()|comment()" mode="phase1"/>
    </xsl:copy>
  </xsl:variable>
  <xsl:for-each select="$phase1/tei:TEI">
    <xsl:call-template name="write-docxfiles"/>
    <xsl:call-template name="create-document-dot-xml"/>
  </xsl:for-each>
</xsl:template>
Stylesheet location to.xsl
Template @*|text()|comment()|processing-instruction()phase1
Namespace No namespace
Match @*|text()|comment()|processing-instruction()
Mode phase1
Import precedence 16
Source
<xsl:template match="@*|text()|comment()|processing-instruction()" mode="phase1">
  <xsl:copy-of select="."/>
</xsl:template>
Stylesheet location to.xsl
Template *phase1
Namespace No namespace
Match *
Mode phase1
Import precedence 16
Source
<xsl:template match="*" mode="phase1">
  <xsl:copy>
    <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()" mode="phase1"/>
  </xsl:copy>
</xsl:template>
Stylesheet location to.xsl
Template tei:p[not(text()) and tei:cit]phase1
Namespace No namespace
Match tei:p[not(text()) and tei:cit]
Mode phase1
Import precedence 16
Source
<xsl:template match="tei:p[not(text()) and tei:cit]" mode="phase1">
  <xsl:apply-templates/>
</xsl:template>
Stylesheet location to.xsl
Template tei:citphase1
Namespace No namespace
Match tei:cit
Mode phase1
Import precedence 16
Source
<xsl:template match="tei:cit" mode="phase1">
  <xsl:if test="@n">
    <p rend="Example paragraph" xmlns="http://www.tei-c.org/ns/1.0">
      <xsl:value-of select="@n"/>
    </p>
  </xsl:if>
  <xsl:copy>
    <xsl:apply-templates select="*|processing-instruction()|comment()|text()" mode="phase1"/>
  </xsl:copy>
</xsl:template>
Stylesheet location to.xsl
Template mathrRpHook
Namespace No namespace
Used by
Template CreateRunProp
Supersedes
Template mathrRpHook
Import precedence 16
Source
<xsl:template name="mathrRpHook">
  <xsl:if test="ancestor::tbx:term/following-sibling::tbx:termNote/@iso:style">
    <rStyle w:val="{ancestor::tbx:term/following-sibling::tbx:termNote/@iso:style}" xmlns="http://schemas.openxmlformats.org/wordprocessingml/2006/main"/>
  </xsl:if>
</xsl:template>
Stylesheet location to.xsl
Template tei:p[@rend='Table units']
Namespace No namespace
Match tei:p[@rend='Table units']
Mode #default
Import precedence 16
Source
<xsl:template match="tei:p[@rend='Table units']"/>
Stylesheet location to.xsl
Parameter tableMethod
Namespace No namespace
Used by
Template cals:table
Source
<xsl:param name="tableMethod">cals</xsl:param>
Stylesheet location to.xsl
Parameter template
Namespace No namespace
Used by
Variable align
Source
<xsl:param name="template">ISO</xsl:param>
Stylesheet location to.xsl
Parameter word-directory
Namespace No namespace
Used by
Supersedes
Parameter word-directory
Source
<xsl:param name="word-directory">..</xsl:param>
Stylesheet location to.xsl
Parameter tei-directory
Namespace No namespace
Used by
Template cals:table
Source
<xsl:param name="tei-directory">./</xsl:param>
Stylesheet location to.xsl
Parameter debug
Namespace No namespace
Used by
Supersedes
Parameter debug
Source
<xsl:param name="debug">false</xsl:param>
Stylesheet location to.xsl
Parameter numberFormat
Namespace No namespace
Used by
Template tei:num
Source
<xsl:param name="numberFormat">fr</xsl:param>
Stylesheet location to.xsl
Variable align
Namespace No namespace
References
Parameter template
Supersedes
Variable align
Source
<xsl:variable name="align">
  <xsl:choose>
    <xsl:when test="$template='ISO'">left</xsl:when>
    <xsl:otherwise>right</xsl:otherwise>
  </xsl:choose>
</xsl:variable>
Stylesheet location to.xsl
Variable orig
Namespace No namespace
Select /
Source
<xsl:variable name="orig" select="/"/>
Stylesheet location to.xsl