source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml-1_1/admon.xsl@ 67f507c

10.0 10.0-rc1 10.1 10.1-rc1 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 12.2 12.2-rc1 8.4 9.0 9.1 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/loongarch-12.2 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 67f507c was 15c7d39, checked in by Matthew Burgess <matthew@…>, 11 years ago

Update stylesheets to docbook-xsl-1.78.1.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10355 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 4.6 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: admon.xsl 9352 2012-05-12 23:17:11Z bobstayton $
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:call-template name="common.html.attributes"/>
66 <xsl:call-template name="id.attribute"/>
67 <xsl:if test="$admon.style != ''">
68 <xsl:attribute name="style">
69 <xsl:value-of select="$admon.style"/>
70 </xsl:attribute>
71 </xsl:if>
72
73 <table border="{$table.border.off}">
74 <!-- omit summary attribute in html5 output -->
75 <xsl:if test="$div.element != 'section'">
76 <xsl:attribute name="summary">
77 <xsl:value-of select="$admon.type"/>
78 <xsl:if test="title|info/title">
79 <xsl:text>: </xsl:text>
80 <xsl:value-of select="(title|info/title)[1]"/>
81 </xsl:if>
82 </xsl:attribute>
83 </xsl:if>
84 <tr>
85 <td rowspan="2" align="center" valign="top">
86
87 <img alt="[{$alt}]">
88 <xsl:attribute name="src">
89 <xsl:call-template name="admon.graphic"/>
90 </xsl:attribute>
91 </img>
92 </td>
93 <th align="{$direction.align.start}">
94 <xsl:call-template name="anchor"/>
95 <xsl:if test="$admon.textlabel != 0 or title or info/title">
96 <xsl:apply-templates select="." mode="object.title.markup"/>
97 </xsl:if>
98 </th>
99 </tr>
100 <tr>
101 <td align="{$direction.align.start}" valign="top">
102 <xsl:apply-templates/>
103 </td>
104 </tr>
105 </table>
106 </div>
107</xsl:template>
108
109<xsl:template name="nongraphical.admonition">
110 <div>
111 <xsl:call-template name="common.html.attributes">
112 <xsl:with-param name="inherit" select="1"/>
113 </xsl:call-template>
114 <xsl:call-template name="id.attribute"/>
115 <xsl:if test="$admon.style">
116 <xsl:attribute name="style">
117 <xsl:value-of select="$admon.style"/>
118 </xsl:attribute>
119 </xsl:if>
120
121 <xsl:if test="$admon.textlabel != 0 or title or info/title">
122 <h3 class="title">
123 <xsl:call-template name="anchor"/>
124 <xsl:apply-templates select="." mode="object.title.markup"/>
125 </h3>
126 </xsl:if>
127
128 <xsl:apply-templates/>
129 </div>
130</xsl:template>
131
132<xsl:template match="note/title"/>
133<xsl:template match="important/title"/>
134<xsl:template match="warning/title"/>
135<xsl:template match="caution/title"/>
136<xsl:template match="tip/title"/>
137
138</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.