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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] Different colored admonitions


You can put an xsl:choose statement inside an xsl:attribute inside the xsl:attribute-set, because the attribute-set is read each time it is used, so it can change for different contexts. Something like this:
 
<xsl:attribute name="background-color">
  <xsl:choose>
    <xsl:when test="ancestor-or-self::note">#FFEEFF</xsl:when>
    ...
    <xsl:otherwise>inherit</xsl:otherwise>
  </xsl:choose>
</xsl:attribute>
 
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
 
 
----- Original Message -----
Sent: Wednesday, October 04, 2006 12:46 PM
Subject: [docbook-apps] Different colored admonitions

All,

 

I have this for my admonitions:

 

    <xsl:attribute-set name="admonition.properties">

        <xsl:attribute name="keep-together.within-column">always</xsl:attribute>

        <xsl:attribute name="border">0.5pt solid blue</xsl:attribute>

        <xsl:attribute name="background-color">#FFEEFF</xsl:attribute>

    </xsl:attribute-set>

    <xsl:attribute-set name="admonition.title.properties">

        <xsl:attribute name="keep-together.within-column">always</xsl:attribute>

        <xsl:attribute name="background-color">#E0E0E0</xsl:attribute>

        <xsl:attribute name="text-align">center</xsl:attribute>

        <xsl:attribute name="border">0.5pt solid blue</xsl:attribute>

    </xsl:attribute-set>

 

What I want to do is make each admonition a different color.

Tip/info =green

warning =red

etc

 

I assume there is a template somewhere where I can slide it into my customization layer?

 

Dean



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