Mode:

Compact lists

Showing:

Documentation
References
Included from
Source
Stylesheet maths.xsl
Documentation

Description

TEI stylesheet for making Word docx files from TEI XML

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

Copyright: 2013, TEI Consortium

Included from
Stylesheet version 3.0
Template m:oMath
Documentation

Description

 Templates transforming math elements 
Namespace No namespace
Match m:oMath
Mode #default
Import precedence 16
Source
<xsl:template match="m:oMath">
  <xsl:apply-templates select="." mode="iden"/>
</xsl:template>
Stylesheet location ../../../docx/to/maths.xsl
Template mml:math
Namespace No namespace
Match mml:math
Mode #default
Import precedence 16
Source
<xsl:template match="mml:math">
  <oMath xmlns="http://schemas.openxmlformats.org/officeDocument/2006/math">
    <xsl:apply-templates mode="mml"/>
  </oMath>
</xsl:template>
Stylesheet location ../../../docx/to/maths.xsl
Template w:object
Documentation

Description

Process Word objects
Namespace No namespace
Match w:object
Mode #default
References
Template
Import precedence 16
Source
<xsl:template match="w:object">
  <xsl:variable name="renderingProperties">
    <xsl:for-each select="..">
      <xsl:call-template name="applyRend"/>
    </xsl:for-each>
  </xsl:variable>
  <w:r>
    <xsl:if test="$renderingProperties/*">
      <w:rPr>
        <xsl:copy-of select="$renderingProperties"/>
      </w:rPr>
    </xsl:if>
    <xsl:copy>
      <xsl:apply-templates mode="iden"/>
    </xsl:copy>
  </w:r>
</xsl:template>
Stylesheet location ../../../docx/to/maths.xsl
Template v:imagedataiden
Documentation

Description

Image data
Namespace No namespace
Match v:imagedata
Mode iden
References
Key
Import precedence 16
Source
<xsl:template match="v:imagedata" mode="iden">
  <xsl:variable name="current" select="@r:id"/>
  <xsl:copy>
    <!-- override r:id -->
    <xsl:attribute name="r:id">
      <xsl:variable name="me" select="generate-id()"/>
      <xsl:for-each select="key('IMAGEDATA',1)">
        <xsl:if test="generate-id()=$me">
          <xsl:value-of select="concat('rId', string(1000 + position()))"/>
        </xsl:if>
      </xsl:for-each>
    </xsl:attribute>
  </xsl:copy>
</xsl:template>
Stylesheet location ../../../docx/to/maths.xsl
Template o:OLEObjectiden
Documentation

Description

OLE objects
Namespace No namespace
Match o:OLEObject
Mode iden
References
Import precedence 16
Source
<xsl:template match="o:OLEObject" mode="iden">
  <xsl:variable name="current" select="@r:id"/>
  <xsl:copy>
    <!-- copy all attributes -->
    <xsl:copy-of select="@*"/>
    <!-- set rId -->
    <xsl:attribute name="r:id">
      <xsl:variable name="me" select="generate-id()"/>
      <xsl:for-each select="key('OLEOBJECTS',1)">
        <xsl:if test="generate-id()=$me">
          <xsl:value-of select="concat('rId', string(2000 + position()))"/>
        </xsl:if>
      </xsl:for-each>
    </xsl:attribute>
  </xsl:copy>
</xsl:template>
Stylesheet location ../../../docx/to/maths.xsl