source: stylesheets/lfs-xsl/xhtml/lfs-admon.xsl@ 52dcb7d

11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 52dcb7d was 52dcb7d, checked in by Xℹ Ruoyao <xry111@…>, 3 years ago

remove $Date$ and $LastChangedBy$

They are unsupported by Git.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 version="1.0">
6
7 <!-- This stylesheet controls how admonitions are displayed -->
8
9 <!-- Use graphics in admonitions? 1 = yes, 0 = no -->
10 <xsl:param name="admon.graphics" select="1"/>
11
12 <!-- Relative path to images directory. We set here relative path
13 from sub-dirs HTML files. The path from top-level HTML files (index.html,
14 partX.html, etc) MUST be fixed via a sed in the Makefile. -->
15 <xsl:param name="admon.graphics.path">../images/</xsl:param>
16
17 <!-- The images files extension -->
18 <xsl:param name="admon.graphics.extension" select="'.png'"/>
19
20 <!-- Changing the output tagging:
21 Removed $admon.style support
22 Hardcoded $admon.textlabel feature
23 Changed the output format from table to nested divs -->
24 <!-- The original template is in {docbook-xsl}/xhtml/admon.xsl -->
25 <xsl:template name="graphical.admonition">
26 <xsl:variable name="admon.type">
27 <xsl:choose>
28 <xsl:when test="local-name(.)='note'">Note</xsl:when>
29 <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
30 <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
31 <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
32 <xsl:when test="local-name(.)='important'">Important</xsl:when>
33 <xsl:otherwise>Note</xsl:otherwise>
34 </xsl:choose>
35 </xsl:variable>
36 <xsl:variable name="alt">
37 <xsl:call-template name="gentext">
38 <xsl:with-param name="key" select="$admon.type"/>
39 </xsl:call-template>
40 </xsl:variable>
41 <div class="admon {name(.)}">
42 <img alt="[{$alt}]">
43 <xsl:attribute name="src">
44 <xsl:call-template name="admon.graphic"/>
45 </xsl:attribute>
46 </img>
47 <h3>
48 <xsl:apply-templates select="." mode="object.title.markup"/>
49 </h3>
50 <xsl:apply-templates/>
51 </div>
52 </xsl:template>
53
54</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.