<xsl:apply-templates mode="bold" select="node-you-want" />
-->
<xsl:template mode="bold" match="*">
- <xsl:variable name="content">
- <xsl:apply-templates/>
- </xsl:variable>
- <xsl:text>\fB</xsl:text>
- <xsl:value-of select="$content"/>
- <xsl:text>\fR</xsl:text>
+ <xsl:for-each select="child::node()">
+ <xsl:text>\fB</xsl:text>
+ <xsl:apply-templates select="."/>
+ <xsl:text>\fR</xsl:text>
+ </xsl:for-each>
</xsl:template>
<xsl:template mode="italic" match="*">
- <xsl:variable name="content">
- <xsl:apply-templates/>
- </xsl:variable>
- <xsl:text>\fI</xsl:text>
- <xsl:value-of select="$content"/>
- <xsl:text>\fR</xsl:text>
+ <xsl:for-each select="node()">
+ <xsl:text>\fI</xsl:text>
+ <xsl:apply-templates select="."/>
+ <xsl:text>\fR</xsl:text>
+ </xsl:for-each>
</xsl:template>
<xsl:template match="caution|important|note|tip|warning">
-->
</xsl:when>
<xsl:when test="self::itemizedlist|self::orderedlist|
- self::variablelist|self::simplelist">
+ self::variablelist|self::simplelist[@type !='inline']">
<!-- Check to see if this node is a list; if so, -->
<!-- put a line break before it. -->
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="filename|replaceable|varname">
- <xsl:text>\fI</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
+ <xsl:apply-templates mode="italic" select="."/>
</xsl:template>
<xsl:template match="option|userinput|envar|errorcode|constant|type">
- <xsl:text>\fB</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
+ <xsl:apply-templates mode="bold" select="."/>
</xsl:template>
<xsl:template match="emphasis">
<xsl:choose>
<xsl:when test="@role = 'bold' or @role = 'strong'">
- <xsl:text>\fB</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
+ <xsl:apply-templates mode="bold" select="."/>
</xsl:when>
<xsl:otherwise>
- <xsl:text>\fI</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
+ <xsl:apply-templates mode="italic" select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="article/articleinfo/*"></xsl:template>
<xsl:template match="term/option">
- <xsl:text>\fB</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
+ <xsl:apply-templates mode="bold" select="."/>
</xsl:template>
<xsl:template match="varlistentry">
</xsl:template>
<xsl:template match="envar">
- <xsl:text>\fB</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
+ <xsl:apply-templates mode="bold" select="."/>
</xsl:template>
<xsl:template match="filename">
- <xsl:text>\fI</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
+ <xsl:apply-templates mode="italic" select="."/>
</xsl:template>
</xsl:stylesheet>
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ exclude-result-prefixes="exsl"
version='1.0'>
<!-- the synopsis element is a verbatim environment; you won't find any -->
<xsl:if test="position()>1">
<xsl:value-of select="$arg.or.sep"/>
</xsl:if>
- <!-- Don't use the 'bold' named template here since there may be -->
- <!-- child elements that require different markup (such as -->
- <!-- <replaceable>). -->
- <xsl:text>\fB</xsl:text>
<xsl:variable name="arg">
<xsl:apply-templates/>
</xsl:variable>
- <xsl:call-template name="replace-string">
- <xsl:with-param name="content" select="normalize-space($arg)"/>
- <xsl:with-param name="replace" select="' '"/>
- <xsl:with-param name="with" select="'\ '"/>
- </xsl:call-template>
- <xsl:text>\fR</xsl:text>
+ <xsl:variable name="space-escaped-arg">
+ <xsl:call-template name="replace-string">
+ <xsl:with-param name="content" select="normalize-space($arg)"/>
+ <xsl:with-param name="replace" select="' '"/>
+ <xsl:with-param name="with" select="'\ '"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:apply-templates mode="bold" select="exsl:node-set($space-escaped-arg)"/>
</xsl:template>
<xsl:template match="command">