Mode:

Compact lists

Showing:

Documentation
Parameters
Used by
References
Imported from
Source
Stylesheet functions.xsl
Documentation

Description

TEI Utility stylesheet for making Word docx files from TEI XML (see docx-tei.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 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: functions.xsl 11232 2012-12-18 18:06:19Z rahtz $

Copyright: 2013, TEI Consortium

Imported from
Stylesheet version 3.0
Function tei:convert-dim-pt20 (dim)
Documentation

Description

Converts a dimension into the 20th of a point.
Namespace http://www.tei-c.org/ns/1.0
Type xs:integer
Used by
Templates
References
Parameters
QName Namespace
dim No namespace
Import precedence 5
Source
<xsl:function name="tei:convert-dim-pt20" as="xs:integer">
  <xsl:param name="dim"/>
  <xsl:value-of select="tei:convert-dim-pt($dim) * 20"/>
</xsl:function>
Stylesheet location ../../../docx/to/functions.xsl
Function tei:convert-dim-pt (dim)
Documentation

Description

Convert a dimension into point.
Namespace http://www.tei-c.org/ns/1.0
Type xs:integer
Used by
References
Parameter
Parameters
QName Namespace
dim No namespace
Import precedence 5
Source
<xsl:function name="tei:convert-dim-pt" as="xs:integer">
  <xsl:param name="dim"/>
  <xsl:choose>
    <xsl:when test="ends-with($dim,'%')">
      <xsl:value-of select="number($pageWidth * number(substring($dim,0,string-length($dim)))) cast as xs:integer"/>
    </xsl:when>
    <xsl:when test="ends-with($dim,'cm')">
      <xsl:value-of select="number(number(substring($dim,0,string-length($dim)-1))*28.3464567) cast as xs:integer"/>
    </xsl:when>
    <xsl:when test="ends-with($dim,'in')">
      <xsl:value-of select="number(number(substring($dim,0,string-length($dim)-1))*72) cast as xs:integer"/>
    </xsl:when>
    <xsl:when test="ends-with($dim,'mm')">
      <xsl:value-of select="number(number(substring($dim,0,string-length($dim)-1))*2.83464567) cast as xs:integer"/>
    </xsl:when>
    <xsl:when test="ends-with($dim,'pt')">
      <xsl:value-of select="number(substring($dim,0,string-length($dim)-1)) cast as xs:integer"/>
    </xsl:when>
    <xsl:when test="ends-with($dim,'px')">
      <xsl:value-of select="number(number(substring($dim,0,string-length($dim)-1))*0.75) cast as xs:integer"/>
    </xsl:when>
    <xsl:otherwise>-1</xsl:otherwise>
  </xsl:choose>
</xsl:function>
Stylesheet location ../../../docx/to/functions.xsl
Function tei:get-listtype (style)
Documentation

Description

Returns a listtype for a given stylename (return empty string to figure it out dynamically).
Namespace http://www.tei-c.org/ns/1.0
Type xs:string
References
Parameters
QName Namespace
style No namespace
Import precedence 5
Source
<xsl:function name="tei:get-listtype" as="xs:string">
  <xsl:param name="style"/>
  <xsl:choose>
    <xsl:when test="starts-with($style,'dl')">
      <xsl:text>gloss</xsl:text>
    </xsl:when>
    <xsl:when test="starts-with($style,$ListBullet)">
      <xsl:text>unordered</xsl:text>
    </xsl:when>
    <xsl:when test="starts-with($style,$ListContinue)">
      <xsl:text>unordered</xsl:text>
    </xsl:when>
    <xsl:when test="starts-with($style,$ListNumber)">
      <xsl:text>ordered</xsl:text>
    </xsl:when>
    <xsl:when test="$style=$List">
      <xsl:text>ordered</xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:text/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:function>
Stylesheet location ../../../docx/to/functions.xsl
Function tei:get-headingstyle (element, level)
Documentation

Description

Returns the correct heading style (return empty string to figure it out dynamically).
Namespace http://www.tei-c.org/ns/1.0
Type xs:string
Used by
Parameters
QName Namespace
element No namespace
level No namespace
Import precedence 5
Source
<xsl:function name="tei:get-headingstyle" as="xs:string">
  <xsl:param name="element"/>
  <xsl:param name="level"/>
  <xsl:text/>
</xsl:function>
Stylesheet location ../../../docx/to/functions.xsl