|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
|
Packit Service |
76cb02 |
version="1.0">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
XML document, the portion being identified by its identifier (@id)
|
|
Packit Service |
76cb02 |
through the '$extractid' parameter.
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
No need to <xsl:import> the main dblatex XSL stylesheet, since dblatex
|
|
Packit Service |
76cb02 |
does it for you.
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:param name="extractid"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="/">
|
|
Packit Service |
76cb02 |
<xsl:apply-templates mode="extract"/>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="*" mode="extract">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="@id=$extractid">
|
|
Packit Service |
76cb02 |
<xsl:message>
|
|
Packit Service |
76cb02 |
<xsl:text>Found '</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="local-name(.)"/>
|
|
Packit Service |
76cb02 |
<xsl:text>' with id='</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="@id"/>
|
|
Packit Service |
76cb02 |
<xsl:text>'</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:message>
|
|
Packit Service |
76cb02 |
<xsl:variable name="texdata">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="."/>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:call-template name="wrap.tex">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="content" select="$texdata"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:call-template name="build.texfile">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="content" select="$texdata"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="id" select="@id"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:apply-templates mode="extract"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="text()" mode="extract"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template name="wrap.tex">
|
|
Packit Service |
76cb02 |
<xsl:param name="content"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\documentclass</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:if test="$latex.class.options!=''">
|
|
Packit Service |
76cb02 |
<xsl:text>[</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$latex.class.options"/>
|
|
Packit Service |
76cb02 |
<xsl:text>]</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:text>{article}
</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:text>\usepackage[T1]{fontenc}
</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:text>\usepackage[latin1]{inputenc}
</xsl:text>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:call-template name="font.setup"/>
|
|
Packit Service |
76cb02 |
<xsl:text>\usepackage[hyperlink]{</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$latex.style"/>
|
|
Packit Service |
76cb02 |
<xsl:text>}
</xsl:text>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:call-template name="citation.setup"/>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="lang.setup"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\pagestyle{empty}
</xsl:text>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\begin{document}
</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$content"/>
|
|
Packit Service |
76cb02 |
<xsl:text>\end{document}
</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template name="build.texfile">
|
|
Packit Service |
76cb02 |
<xsl:param name="content"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="id"/>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="write.text.chunk">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="filename">
|
|
Packit Service |
76cb02 |
<xsl:text>tex_</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$id"/>
|
|
Packit Service |
76cb02 |
<xsl:text>.rtex</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:with-param>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="method" select="'text'"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="content">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="wrap.tex">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="content" select="$content"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:with-param>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="encoding" select="$chunker.output.encoding"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
</xsl:stylesheet>
|