source: stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/admon.xsl@ 65b2904

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 65b2904 was 65b2904, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added LFS-XSL Stylesheets files.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@6840 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 4.3 KB
Line 
1<?xml version="1.0" encoding="ASCII"?>
2<!--This file was created automatically by html2xhtml-->
3<!--from the HTML stylesheets.-->
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
5
6<!-- ********************************************************************
7 $Id$
8 ********************************************************************
9
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://docbook.sf.net/release/xsl/current/ for
12 copyright and other information.
13
14 ******************************************************************** -->
15
16<xsl:template match="*" mode="admon.graphic.width">
17 <xsl:param name="node" select="."/>
18 <xsl:text>25</xsl:text>
19</xsl:template>
20
21<xsl:template match="note|important|warning|caution|tip">
22 <xsl:choose>
23 <xsl:when test="$admon.graphics != 0">
24 <xsl:call-template name="graphical.admonition"/>
25 </xsl:when>
26 <xsl:otherwise>
27 <xsl:call-template name="nongraphical.admonition"/>
28 </xsl:otherwise>
29 </xsl:choose>
30</xsl:template>
31
32<xsl:template name="admon.graphic">
33 <xsl:param name="node" select="."/>
34 <xsl:value-of select="$admon.graphics.path"/>
35 <xsl:choose>
36 <xsl:when test="local-name($node)='note'">note</xsl:when>
37 <xsl:when test="local-name($node)='warning'">warning</xsl:when>
38 <xsl:when test="local-name($node)='caution'">caution</xsl:when>
39 <xsl:when test="local-name($node)='tip'">tip</xsl:when>
40 <xsl:when test="local-name($node)='important'">important</xsl:when>
41 <xsl:otherwise>note</xsl:otherwise>
42 </xsl:choose>
43 <xsl:value-of select="$admon.graphics.extension"/>
44</xsl:template>
45
46<xsl:template name="graphical.admonition">
47 <xsl:variable name="admon.type">
48 <xsl:choose>
49 <xsl:when test="local-name(.)='note'">Note</xsl:when>
50 <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
51 <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
52 <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
53 <xsl:when test="local-name(.)='important'">Important</xsl:when>
54 <xsl:otherwise>Note</xsl:otherwise>
55 </xsl:choose>
56 </xsl:variable>
57
58 <xsl:variable name="alt">
59 <xsl:call-template name="gentext">
60 <xsl:with-param name="key" select="$admon.type"/>
61 </xsl:call-template>
62 </xsl:variable>
63
64 <div>
65 <xsl:apply-templates select="." mode="class.attribute"/>
66 <xsl:if test="$admon.style != ''">
67 <xsl:attribute name="style">
68 <xsl:value-of select="$admon.style"/>
69 </xsl:attribute>
70 </xsl:if>
71
72 <table border="0">
73 <xsl:attribute name="summary">
74 <xsl:value-of select="$admon.type"/>
75 <xsl:if test="title|info/title">
76 <xsl:text>: </xsl:text>
77 <xsl:value-of select="(title|info/title)[1]"/>
78 </xsl:if>
79 </xsl:attribute>
80 <tr>
81 <td rowspan="2" align="center" valign="top">
82 <xsl:attribute name="width">
83 <xsl:apply-templates select="." mode="admon.graphic.width"/>
84 </xsl:attribute>
85 <img alt="[{$alt}]">
86 <xsl:attribute name="src">
87 <xsl:call-template name="admon.graphic"/>
88 </xsl:attribute>
89 </img>
90 </td>
91 <th align="left">
92 <xsl:call-template name="anchor"/>
93 <xsl:if test="$admon.textlabel != 0 or title or info/title">
94 <xsl:apply-templates select="." mode="object.title.markup"/>
95 </xsl:if>
96 </th>
97 </tr>
98 <tr>
99 <td align="left" valign="top">
100 <xsl:apply-templates/>
101 </td>
102 </tr>
103 </table>
104 </div>
105</xsl:template>
106
107<xsl:template name="nongraphical.admonition">
108 <div>
109 <xsl:apply-templates select="." mode="class.attribute"/>
110 <xsl:if test="$admon.style">
111 <xsl:attribute name="style">
112 <xsl:value-of select="$admon.style"/>
113 </xsl:attribute>
114 </xsl:if>
115
116 <h3 class="title">
117 <xsl:call-template name="anchor"/>
118 <xsl:if test="$admon.textlabel != 0 or title or info/title">
119 <xsl:apply-templates select="." mode="object.title.markup"/>
120 </xsl:if>
121 </h3>
122
123 <xsl:apply-templates/>
124 </div>
125</xsl:template>
126
127<xsl:template match="note/title"/>
128<xsl:template match="important/title"/>
129<xsl:template match="warning/title"/>
130<xsl:template match="caution/title"/>
131<xsl:template match="tip/title"/>
132
133</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.