Showing:

Documentation
References
Overriding
Imported modules
Included from
Source
Stylesheet paragraphs.xsl
Documentation

Description

TEI stylesheet for converting Word docx files to TEI

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: from.xsl 6832 2009-10-12 22:42:59Z rahtz $

Copyright: 2008, TEI Consortium

Imported modules
Included from
Template w:pparagraph
Documentation

Description

Calls the named template paragraph-wp that can be overriden.

See comment at begin of document to understand why this template is calling a named template. This stylesheet is handling simple paragraphs that we know nothing else about.

Namespace No namespace
Match w:p
Mode paragraph
References
Template paragraph-wp
Import precedence 14
Source
<xsl:template match="w:p" mode="paragraph">
  <xsl:call-template name="paragraph-wp"/>
</xsl:template>
Stylesheet location ../../../docx/from/paragraphs/paragraphs.xsl
Template paragraph-wp
Documentation

Description

Named template for handling w:p; we use the Word style (if provided) to make a TEI rend attribute, and check for change records.
Namespace No namespace
References
Template identifyChange
Overriding
Template paragraph-wp
Import precedence 14
Source
<xsl:template name="paragraph-wp">
  <p>
    <xsl:if test="w:pPr/w:pStyle/@w:val">
      <xsl:attribute name="rend">
        <xsl:value-of select="w:pPr/w:pStyle/@w:val"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:choose>
      <xsl:when test="w:pPr/w:rPr/w:ins">
        <add when="{w:pPr/w:rPr/w:ins/@w:date}" type="para">
          <xsl:call-template name="identifyChange">
            <xsl:with-param name="who" select="w:pPr/w:rPr/w:ins/@w:author"/>
          </xsl:call-template>
          <xsl:apply-templates select="."/>
        </add>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates select="."/>
      </xsl:otherwise>
    </xsl:choose>
  </p>
</xsl:template>
Stylesheet location ../../../docx/from/paragraphs/paragraphs.xsl