Re: [docbook-apps] customizing the class attribute for sections and olinks

From
Bob Stayton <>
Date
2010-03-19T04:09:34+00:00
ID
000d01cac719$f68bfe40$6600a8c0@pazu
Thread
Re: [docbook-apps] customizing the class attribute for sections and olinks
Hi Dave,
I think you are mistaking 'css.decoration' for some other parameter. If css.decoration 
is set 1, then a few elements will have a style attribute added to them, but it isn't 
a general mechanism.

The stylesheet by default passes the element name through to the class value.  That 
works ok, but it wasn't very flexible, so starting with version 1.72 the stylesheets 
added a hook for generating your own class values, with the element name as the 
fallback.  For details see:

http://www.sagehill.net/docbookxsl/HtmlCustomEx.html#CustomClassValues

With custom class values, you can do a lot more with CSS.

Bob Stayton
Sagehill Enterprises



----- Original Message ----- 
From: "Dave Pawson" <>
To: <>
Sent: Thursday, March 18, 2010 2:12 AM
Subject: Re: [docbook-apps] customizing the class attribute for sections and olinks


> On 18/03/10 09:02, robert wrote:
>> Hi All,
>>
>> I would like to apply custom values of the class attribute to the selected
>> section and olink elements. I've tried with the role attribute, but it does
>> not work. I've also tried to add the following template to my customization
>> layer (both for section and olink):
>>
>> <xsl:template match="section[@role = 'quickref']" mode="class.value">
>>    <xsl:value-of select="@role"/>
>> </xsl:template
>>
>> Again, no success.
>>
>> What am I missing?
> http://docbook.sourceforge.net/release/xsl/current/doc/html/css.decoration.html
>
>
> <xsl:param name="css.decoration" select="1"></xsl:param>
>
> That takes your element names through to class attributes I believe.
>
>
> regards
>
> -- 
> Dave Pawson
> XSLT XSL-FO FAQ.
> http://www.dpawson.co.uk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 
>
>
>