[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Colouring component titles using FO stylesheets
On Wed, Sep 25, 2002 at 10:26:12AM +0100, Kevin.Ruscoe@ubsw.com wrote: > Hi > > I have not had any luck configuring the component.title.properties property set in the FO stylesheets. I am trying to change the colour of all headings in printed output. Defining section headings works fine, but defining component headings appears to have no effect. See the XSL fragment below: > > <!-- This has the desired effect. Section titles are coloured blue. --> > <xsl:attribute-set name="section.title.properties"> > <xsl:attribute name="color">#005a9c</xsl:attribute> > </xsl:attribute-set> > > <!-- This has no effect. Component titles > (chapters, appendixes, articles, etc.) remain black. --> > <xsl:attribute-set name="component.title.properties"> > <xsl:attribute name="color">#005a9c</xsl:attribute> > </xsl:attribute-set> > > Does anybody know of a workaround for this? > > My tool chain is as follows: > > DocBook DTD v4.2 > DocBook XSL v1.55.0 > libxml2 v2.4.22 > libxslt v1.0.20 > FOP v0.20.4 The ability to control formatting of title pages has advanced considerably in recent XSL stylesheet releases. But it has also gotten more complex. I'm in the process of documenting how they work now. Here is what I've learned so far: 1. The component.title.properties attribute set is now used only by glossary and bibliography components. That's why it didn't work on chapter titles. 2. You can set the base attributes for all elements on a given type of title page by defining an attribute set that follows this naming convention: <xsl:attribute-set name="chapter.titlepage.recto.style"> <xsl:attribute name="color">#005a9c</xsl:attribute> </xsl:attribute-set> But this sets the color for *all* elements on the recto side of chapter title pages, which is probably not what you want. 3. Properties in such a base attribute set can be overridden for particular elements on the page by specifying properties in a customized titlepage.templates.xml file, which is then processed to produce a customized titlepage.templates.xsl file, which is included in your customization layer. The general process for doing this is described for HTML titlepages in: http://www.sagehill.net/xml/docbookxsl/HtmlCustomEx.html#HTMLTitlePage The process for fo is the same, but the list of potential properties for titlepage elements is much bigger. -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 Caldera International, Inc. fax: (831) 429-1887 email: bobs@caldera.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC