Hello,
you just need to make a test and set the color according to the chapter
cardinality, something like:
<xsl:attribute-set name="header.table.properties">
<xsl:attribute name="background-color">
<xsl:choose>
<xsl:when test="preceding-sibling::chapter">green</xsl:when>
<xsl:otherwise>red</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
Camille.
Lily Galle wrote:
> Dear all,
>
> I produce one book with “DocBook” and “XSL”.
>
> There is one header on each page.
> In Chapter 1 the “header.table” has “background-color” red. In chapter two it should have “background-color” green. (“header.table” in different chapter should have different background-color.)
>
> I write the following code in “myStylesheet.xsl”.
>
> <xsl:attribute-set name="header.table.properties">
> <xsl:attribute name="background-color">red</xsl:attribute>
> </xsl:attribute-set>
>
> But how can I get “green” for chapter two?
>
> I copied the template “header.table” in my customized stylesheet. But I do not know how to customize it.
>
> Thanks for any help!
>
> Lily
>
>
>