Debian Codegraph @

xsl/abstract.xsl

raw
1 <?xml version='1.0'?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
3
4 <!--############################################################################
5 XSLT Stylesheet DocBook -> LaTeX
6 ############################################################################ -->
7
8 <!-- it only works for bookinfo/abstract. Within chapters, etc. it puts the
9 abstract in a separate page.
10 -->
11
12 <xsl:template match="abstract">
13 <xsl:text>&#10;</xsl:text>
14 <xsl:text>% -------- &#10;</xsl:text>
15 <xsl:text>% Abstract &#10;</xsl:text>
16 <xsl:text>% -------- &#10;</xsl:text>
17 <xsl:if test="title">
18 <xsl:text>\let\savabstractname=\abstractname&#10;</xsl:text>
19 <xsl:text>\def\abstractname{</xsl:text>
20 <xsl:apply-templates select="title"/>
21 <xsl:text>}</xsl:text>
22 </xsl:if>
23 <xsl:text>\begin{abstract}&#10;</xsl:text>
24 <xsl:apply-templates select="*[not(self::title)]"/>
25 <xsl:text>&#10;\end{abstract}&#10;</xsl:text>
26 <xsl:if test="title">
27 <xsl:text>\let\abstractname=\savabstractname&#10;</xsl:text>
28 </xsl:if>
29 </xsl:template>
30
31 <xsl:template match="abstract/title">
32 <xsl:apply-templates/>
33 </xsl:template>
34
35 <!-- Just render the content -->
36 <xsl:template match="highlights">
37 <xsl:apply-templates/>
38 </xsl:template>
39
40 </xsl:stylesheet>