From:
<car...@te...> - 2004-06-18 11:37:55
|
Hello: Hope the above one is more correct, it's the same as the docbook stylesheet one but adding the background color: <xsl:template match="note|important|warning|caution|tip"> <xsl:param name="node" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="color"> <xsl:choose> <xsl:when test="name($node)='note'">F0FFFF</xsl:when> <xsl:when test="name($node)='warning'">FFE4E1</xsl:when> <xsl:when test="name($node)='caution'">FFE4E1</xsl:when> <xsl:when test="name($node)='tip'">F0FFFF</xsl:when> <xsl:when test="name($node)='important'">FFE4E1</xsl:when> </xsl:choose> </xsl:variable> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" start-indent="0.25in" end-indent="0.25in" background-color="#{$color}" id="{$id}"> <xsl:if test="$admon.textlabel != 0 or title"> <fo:block keep-with-next='always' xsl:use-attribute-sets="admonition.title.properties"> <xsl:apply-templates select="." mode="object.title.markup"/> </fo:block> </xsl:if> <fo:block xsl:use-attribute-sets="admonition.properties"> <xsl:apply-templates/> </fo:block> </fo:block> </xsl:template> -- Best regards Carlos Guzmán Álvarez Vigo-Spain |