aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets/lfs-xsl/xhtml/lfs-admon.xsl
diff options
context:
space:
mode:
authorManuel Canales Esparcia <manuel@linuxfromscratch.org>2007-07-05 21:18:33 +0000
committerManuel Canales Esparcia <manuel@linuxfromscratch.org>2007-07-05 21:18:33 +0000
commitc873d8072e3e1fb78b1be4ba5e3f8e3548d29694 (patch)
treefb2387ca1b158477659e00660269c92b94f4a00a /stylesheets/lfs-xsl/xhtml/lfs-admon.xsl
parentbdbaf3eb1f0b1c8ef150764638c7473b9c25db96 (diff)
Added new-xsl files.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8196 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/lfs-xsl/xhtml/lfs-admon.xsl')
-rw-r--r--stylesheets/lfs-xsl/xhtml/lfs-admon.xsl59
1 files changed, 59 insertions, 0 deletions
diff --git a/stylesheets/lfs-xsl/xhtml/lfs-admon.xsl b/stylesheets/lfs-xsl/xhtml/lfs-admon.xsl
new file mode 100644
index 000000000..1cdf29c95
--- /dev/null
+++ b/stylesheets/lfs-xsl/xhtml/lfs-admon.xsl
@@ -0,0 +1,59 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!--
+$LastChangedBy$
+$Date$
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ version="1.0">
+
+ <!-- This stylesheet controls how admonitions are displayed -->
+
+ <!-- Use graphics in admonitions? 1 = yes, 0 = no -->
+ <xsl:param name="admon.graphics" select="1"/>
+
+ <!-- Relative path to images directory. We set here relative path
+ from sub-dirs HTML files. The path from top-level HTML files (index.html,
+ partX.html, etc) MUST be fixed via a sed in the Makefile. -->
+ <xsl:param name="admon.graphics.path">../images/</xsl:param>
+
+ <!-- The images files extension -->
+ <xsl:param name="admon.graphics.extension" select="'.png'"/>
+
+ <!-- Changing the output tagging:
+ Removed $admon.style support
+ Hardcoded $admon.textlabel feature
+ Changed the output format from table to nested divs -->
+ <!-- The original template is in {docbook-xsl}/xhtml/admon.xsl -->
+ <xsl:template name="graphical.admonition">
+ <xsl:variable name="admon.type">
+ <xsl:choose>
+ <xsl:when test="local-name(.)='note'">Note</xsl:when>
+ <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
+ <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
+ <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
+ <xsl:when test="local-name(.)='important'">Important</xsl:when>
+ <xsl:otherwise>Note</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="alt">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="$admon.type"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <div class="admon {name(.)}">
+ <img alt="[{$alt}]">
+ <xsl:attribute name="src">
+ <xsl:call-template name="admon.graphic"/>
+ </xsl:attribute>
+ </img>
+ <h3>
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </h3>
+ <xsl:apply-templates/>
+ </div>
+ </xsl:template>
+
+</xsl:stylesheet>