OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: 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: jirka@kosek.cz      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
------------------------------------------------------------------

OpenPGP digital signature



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]