← Prev in month
← Prev in thread
Next in thread →
Next in month →
Re: [docbook] Docobook - How to display different profiling contentin HTML output
Fabrice Talbot wrote:
> I do not really know how to implement 2. I looked at the stylesheets
> controlling the HTML output but could not find a central place to implement
> this change.
The easiest way is probably to change template for text nodes. Something
like:
<xsl:template match="text()">
<xsl:choose>
<xsl:when test="ancestor::*[@os][1]/@os != 'linux'">
<span class="linux"><xsl:value-of select="."/></span>
</xsl:when>
<xsl:when test="ancestor::*[@os][1]/@os != 'windows'">
<span class="windows"><xsl:value-of select="."/></span>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Just add this into your customization layer and then define appropriate
properties in CSS file like:
.linux { background-color: red; }
.windows { background-color: green; }
--
------------------------------------------------------------------
Jirka Kosek e-mail: http://xmlguru.cz
------------------------------------------------------------------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------
← Prev in month
← Prev in thread
Next in thread →
Next in month →