diff options
author | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2004-05-08 14:19:53 +0000 |
---|---|---|
committer | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2004-05-08 14:19:53 +0000 |
commit | ded6dddb89cade026e592cd386790b5b10e6fe00 (patch) | |
tree | 3e628a075a59b9ee298376729b44a4151d039c59 /stylesheets/xhtml/lfs-titles.xsl | |
parent | e4bf4c7e72fabd039b21b78313d43ce2138c1e7d (diff) |
Updated the stylesheets to their current version.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3529 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/xhtml/lfs-titles.xsl')
-rw-r--r-- | stylesheets/xhtml/lfs-titles.xsl | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/stylesheets/xhtml/lfs-titles.xsl b/stylesheets/xhtml/lfs-titles.xsl new file mode 100644 index 000000000..ec6c68cfe --- /dev/null +++ b/stylesheets/xhtml/lfs-titles.xsl @@ -0,0 +1,80 @@ +<?xml version='1.0' encoding='ISO-8859-1'?> + +<!-- Version 0.9- Manuel Canales Esparcia <macana@lfs-es.org> --> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns="http://www.w3.org/1999/xhtml" + version="1.0"> + + <xsl:template name="part.titlepage"> + <div class="titlepage"> + <h1 class="{name(.)}"> + <xsl:value-of select="title"/> + </h1> + </div> + </xsl:template> + + <xsl:template name="chapter.titlepage"> + <div class="titlepage"> + <h1 class="{name(.)}"> + <xsl:value-of select="title"/> + </h1> + </div> + </xsl:template> + + <xsl:template name="preface.titlepage"> + <div class="titlepage"> + <h1 class="{name(.)}"> + <xsl:value-of select="title"/> + </h1> + </div> + </xsl:template> + + <xsl:template name="sect1.titlepage"> + <xsl:choose> + <!-- I should find a better test --> + <xsl:when test="position() = 4"> + <div class="titlepage"> + <xsl:if test="@id"> + <a id="{@id}" name="{@id}"/> + </xsl:if> + <h2 class="{name(.)}"> + <xsl:value-of select="title"/> + </h2> + </div> + </xsl:when> + <xsl:otherwise> + <div class="titlepage"> + <h1 class="{name(.)}"> + <xsl:value-of select="title"/> + </h1> + </div> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="sect2.titlepage"> + <xsl:choose> + <xsl:when test="string-length(title) = 0"/> + <xsl:otherwise> + <div class="titlepage"> + <xsl:if test="@id"> + <a id="{@id}" name="{@id}"/> + </xsl:if> + <h3 class="{name(.)}"> + <xsl:value-of select="title"/> + </h3> + </div> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="dedication.titlepage"> + <div class="titlepage"> + <h2 class="{name(.)}"> + <xsl:value-of select="title"/> + </h2> + </div> + </xsl:template> + +</xsl:stylesheet> |