Stylesheet
functions.xsl
Documentation
Description
TEI Utility stylesheet for making Word docx files
from TEI XML (see docx-tei.xsl)
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: functions.xsl 7112 2010-01-19 22:02:39Z rahtz $
Copyright: 2008, TEI Consortium
Imported from
Function
teidocx:convert-dim-pt20
Function
teidocx:convert-dim-pt
Namespace
http://www.tei-c.org/ns/teidocx/1.0
Type
xs:integer
Parameters
QName
Namespace
dim
No namespace
Import precedence
9
Source
<xsl:function name= "teidocx:convert-dim-pt" as= "xs:integer" >
<xsl:param name= "dim" />
<xsl:choose >
<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:otherwise > -1 </xsl:otherwise>
</xsl:choose>
</xsl:function>
Stylesheet location
../../../docx/utils/functions.xsl
Function
teidocx:convert-dim-emu
Documentation
Description convert a dimension into english metric unit
Namespace
http://www.tei-c.org/ns/teidocx/1.0
Type
xs:integer
Parameters
QName
Namespace
dim
No namespace
Import precedence
9
Source
<xsl:function name= "teidocx:convert-dim-emu" as= "xs:integer" >
<xsl:param name= "dim" />
<xsl:variable name= "result" >
<xsl:choose >
<xsl:when test= "ends-with($dim,'cm')" >
<xsl:value-of select= "number(number(substring($dim,0,string-length($dim)-1))*3600) 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))*9144) 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))*360) cast as xs:integer" />
</xsl:when>
<xsl:when test= "ends-with($dim,'pt')" >
<xsl:value-of select= "number(number(number(substring($dim,0,string-length($dim)-1)) div 72) * 9144) cast as xs:integer" />
</xsl:when>
<xsl:otherwise > -1 </xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select= "$result" />
</xsl:function>
Stylesheet location
../../../docx/utils/functions.xsl
Function
teidocx:get-listtype
Function
teidocx:get-headingstyle
Function
teidocx:is-firstlevel-heading
Function
teidocx:is-heading
Function
teidocx:get-nextlevel-header
Documentation
Namespace
http://www.tei-c.org/ns/teidocx/1.0
Type
xs:string
Parameters
Import precedence
9
Source
Stylesheet location
../../../docx/utils/functions.xsl
Function
teidocx:render-bold
Function
teidocx:render-italic
Function
teidocx:render-typewriter
Function
teidocx:is-inline
Function
teidocx:whatsTheDate