summaryrefslogtreecommitdiff
path: root/docs/docbook/xslt/db2latex/sections.mod.xsl
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2003-04-30 21:39:49 +0000
committerAlexander Bokovoy <ab@samba.org>2003-04-30 21:39:49 +0000
commitbd30b6066f1a28663b28466a67064149b6e060a4 (patch)
treedc4478c5aafd9078f380e5e2ea11926519905fb0 /docs/docbook/xslt/db2latex/sections.mod.xsl
parent049791de5b6e43e827e2be01a65958389d9c76e2 (diff)
downloadsamba-bd30b6066f1a28663b28466a67064149b6e060a4.tar.gz
samba-bd30b6066f1a28663b28466a67064149b6e060a4.tar.bz2
samba-bd30b6066f1a28663b28466a67064149b6e060a4.zip
Docbook XML conversion: XSLT and build infrastructure
(This used to be commit f4f6e0b29e744077dfb836745716a659a49d7529)
Diffstat (limited to 'docs/docbook/xslt/db2latex/sections.mod.xsl')
-rw-r--r--docs/docbook/xslt/db2latex/sections.mod.xsl150
1 files changed, 150 insertions, 0 deletions
diff --git a/docs/docbook/xslt/db2latex/sections.mod.xsl b/docs/docbook/xslt/db2latex/sections.mod.xsl
new file mode 100644
index 0000000000..f81524d51d
--- /dev/null
+++ b/docs/docbook/xslt/db2latex/sections.mod.xsl
@@ -0,0 +1,150 @@
+<?xml version='1.0'?>
+<!--#############################################################################
+| $Id: sections.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $
+|- #############################################################################
+| $Author: ab $
+|
+| PURPOSE: sections.
+| PENDING:
+| - Nested section|simplesect > 3 mapped to subsubsection*
+| - No sectinfo (!)
++ ############################################################################## -->
+
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ exclude-result-prefixes="doc" version='1.0'>
+
+
+
+ <!--############################################################################# -->
+ <!-- DOCUMENTATION -->
+ <doc:reference id="sections" xmlns="">
+ <referenceinfo>
+ <releaseinfo role="meta">
+ $Id: sections.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $
+ </releaseinfo>
+ <authogroup>
+ <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
+ <author> <firstname>James</firstname> <surname>Devenish</surname> </author>
+ </authogroup>
+ <copyright>
+ <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year>
+ <holder>Ramon Casellas</holder>
+ </copyright>
+ </referenceinfo>
+
+ <title>Sections <filename>sections.mod.xsl</filename></title>
+ <partintro>
+ <section><title>Introduction</title>
+ <para></para>
+ </section>
+ </partintro>
+ </doc:reference>
+
+
+
+
+
+ <xsl:template match="sect1|sect2|sect3|sect4|sect5">
+ <xsl:call-template name="map.begin"/>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="sect1/title"/>
+ <xsl:template match="sect2/title"/>
+ <xsl:template match="sect3/title"/>
+ <xsl:template match="sect4/title"/>
+ <xsl:template match="sect5/title"/>
+
+
+ <xsl:template match="section">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:variable name="level" select="count(ancestor::section)+1"/>
+ <xsl:choose>
+ <xsl:when test='$level=1'>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect1'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test='$level=2'>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect2'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test='$level=3'>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect3'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test='$level=4'>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect4'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test='$level=5'>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect5'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>DB2LaTeX: recursive section|simplesect &gt; 5 Not well Supported</xsl:message>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect6'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+
+ <xsl:template match="simplesect">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:variable name="level" select="count(ancestor::section) + 1"/>
+ <xsl:choose>
+ <xsl:when test='$level=1'>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect1'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test='$level=2'>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect2'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test='$level=3'>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect3'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test='$level=4'>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect4'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test='$level=5'>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect5'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>DB2LaTeX: recursive section|simplesect &gt; 5 Not well Supported</xsl:message>
+ <xsl:call-template name="map.begin">
+ <xsl:with-param name="keyword" select="'sect6'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="section/title"/>
+ <xsl:template match="simplesect/title"/>
+
+ <xsl:template match="sectioninfo"/>
+ <xsl:template match="sect1info"/>
+ <xsl:template match="sect2info"/>
+ <xsl:template match="sect3info"/>
+ <xsl:template match="sect4info"/>
+ <xsl:template match="sect5info"/>
+
+</xsl:stylesheet>