1 <?xml version="1.0" encoding="ASCII"?><!--This file was created automatically by html2xhtml--><!--from the HTML stylesheets.--><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="d" version="1.0">
3 <!-- ********************************************************************
5 This file is part of the XSL DocBook Stylesheet distribution.
6 See ../README or http://cdn.docbook.org/release/xsl/current/ for
7 copyright and other information.
9 ******************************************************************** -->
11 <xsl:template match="*" mode="admon.graphic.width">
12 <xsl:param name="node" select="."/>
13 <xsl:text>25</xsl:text>
16 <xsl:template match="d:note|d:important|d:warning|d:caution|d:tip">
18 <xsl:when test="$admon.graphics != 0">
19 <xsl:call-template name="graphical.admonition"/>
22 <xsl:call-template name="nongraphical.admonition"/>
27 <xsl:template name="admon.graphic">
28 <xsl:param name="node" select="."/>
29 <xsl:value-of select="$admon.graphics.path"/>
31 <xsl:when test="local-name($node)='note'">note</xsl:when>
32 <xsl:when test="local-name($node)='warning'">warning</xsl:when>
33 <xsl:when test="local-name($node)='caution'">caution</xsl:when>
34 <xsl:when test="local-name($node)='tip'">tip</xsl:when>
35 <xsl:when test="local-name($node)='important'">important</xsl:when>
36 <xsl:otherwise>note</xsl:otherwise>
38 <xsl:value-of select="$admon.graphics.extension"/>
41 <xsl:template name="graphical.admonition">
42 <xsl:variable name="admon.type">
44 <xsl:when test="local-name(.)='note'">Note</xsl:when>
45 <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
46 <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
47 <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
48 <xsl:when test="local-name(.)='important'">Important</xsl:when>
49 <xsl:otherwise>Note</xsl:otherwise>
53 <xsl:variable name="alt">
54 <xsl:call-template name="gentext">
55 <xsl:with-param name="key" select="$admon.type"/>
60 <xsl:call-template name="common.html.attributes"/>
61 <xsl:call-template name="id.attribute"/>
62 <xsl:if test="$admon.style != '' and $make.clean.html = 0">
63 <xsl:attribute name="style">
64 <xsl:value-of select="$admon.style"/>
68 <table border="{$table.border.off}">
69 <!-- omit summary attribute in html5 output -->
70 <xsl:if test="$div.element != 'section'">
71 <xsl:attribute name="summary">
72 <xsl:value-of select="$admon.type"/>
73 <xsl:if test="d:title|d:info/d:title">
74 <xsl:text>: </xsl:text>
75 <xsl:value-of select="(d:title|d:info/d:title)[1]"/>
80 <td rowspan="2" align="center" valign="top">
81 <xsl:attribute name="width">
82 <xsl:apply-templates select="." mode="admon.graphic.width"/>
85 <xsl:attribute name="src">
86 <xsl:call-template name="admon.graphic"/>
90 <th align="{$direction.align.start}">
91 <xsl:call-template name="anchor"/>
92 <xsl:if test="$admon.textlabel != 0 or d:title or d:info/d:title">
93 <xsl:apply-templates select="." mode="object.title.markup"/>
98 <td align="{$direction.align.start}" valign="top">
99 <xsl:apply-templates/>
106 <xsl:template name="nongraphical.admonition">
108 <xsl:call-template name="common.html.attributes">
109 <xsl:with-param name="inherit" select="1"/>
111 <xsl:call-template name="id.attribute"/>
112 <xsl:if test="$admon.style != '' and $make.clean.html = 0">
113 <xsl:attribute name="style">
114 <xsl:value-of select="$admon.style"/>
118 <xsl:if test="$admon.textlabel != 0 or d:title or d:info/d:title">
120 <xsl:call-template name="anchor"/>
121 <xsl:apply-templates select="." mode="object.title.markup"/>
125 <xsl:apply-templates/>
129 <xsl:template match="d:note/d:title"/>
130 <xsl:template match="d:important/d:title"/>
131 <xsl:template match="d:warning/d:title"/>
132 <xsl:template match="d:caution/d:title"/>
133 <xsl:template match="d:tip/d:title"/>