| 1 |
<?xml version='1.0'?> |
| 2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> |
| 3 |
|
| 4 |
<!--############################################################################ |
| 5 |
XSLT Stylesheet DocBook -> LaTeX |
| 6 |
############################################################################ --> |
| 7 |
|
| 8 |
<xsl:param name="figure.note"/> |
| 9 |
<xsl:param name="figure.tip"/> |
| 10 |
<xsl:param name="figure.important">warning</xsl:param> |
| 11 |
<xsl:param name="figure.warning">warning</xsl:param> |
| 12 |
<xsl:param name="figure.caution">warning</xsl:param> |
| 13 |
|
| 14 |
<xsl:template match="note|important|warning|caution|tip"> |
| 15 |
<xsl:text>\begin{DBKadmonition}{</xsl:text> |
| 16 |
<xsl:call-template name="admon.graphic"/><xsl:text>}{</xsl:text> |
| 17 |
<xsl:choose> |
| 18 |
<xsl:when test="title"> |
| 19 |
<xsl:call-template name="normalize-scape"> |
| 20 |
<xsl:with-param name="string" select="title"/></xsl:call-template> |
| 21 |
</xsl:when> |
| 22 |
<xsl:otherwise> |
| 23 |
<xsl:call-template name="gentext.element.name"/> |
| 24 |
</xsl:otherwise> |
| 25 |
</xsl:choose> |
| 26 |
<xsl:text>} </xsl:text> |
| 27 |
<xsl:apply-templates/> |
| 28 |
<xsl:text>\end{DBKadmonition} </xsl:text> |
| 29 |
</xsl:template> |
| 30 |
|
| 31 |
<xsl:template match="note/title|important/title| |
| 32 |
warning/title|caution/title|tip/title"/> |
| 33 |
|
| 34 |
<xsl:template name="admon.graphic"> |
| 35 |
<xsl:param name="node" select="."/> |
| 36 |
<xsl:choose> |
| 37 |
<xsl:when test="name($node)='warning'"> |
| 38 |
<xsl:value-of select="$figure.warning"/> |
| 39 |
</xsl:when> |
| 40 |
<xsl:when test="name($node)='caution'"> |
| 41 |
<xsl:value-of select="$figure.caution"/> |
| 42 |
</xsl:when> |
| 43 |
<xsl:when test="name($node)='important'"> |
| 44 |
<xsl:value-of select="$figure.important"/> |
| 45 |
</xsl:when> |
| 46 |
<xsl:when test="name($node)='note'"> |
| 47 |
<xsl:value-of select="$figure.note"/> |
| 48 |
</xsl:when> |
| 49 |
<xsl:when test="name($node)='tip'"> |
| 50 |
<xsl:value-of select="$figure.tip"/> |
| 51 |
</xsl:when> |
| 52 |
<xsl:otherwise></xsl:otherwise> |
| 53 |
</xsl:choose> |
| 54 |
</xsl:template> |
| 55 |
|
| 56 |
</xsl:stylesheet> |