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] Something like an attribute-set, but different


On Mittwoch, 12. Dezember 2007, Geraint North wrote:
> I've got a few situations where I'd like to set some attributes based
> on some top-level properties of my DocBook Book.  For example:
> - If the <book>'s lang is "ja", use a set of Japanese fonts, rather
> than the defaults.

That's pretty easy. You have to create a customization layer as shown in 
[1] and insert the following parameter:

 <xsl:param name="body.font.family">
     <xsl:when test="/book/@lang='ja'">
      <xsl:text><!-- Insert your fonts here --></xsl:text>

Probably you need to configure the other parameters like sans.font.family 
as well (see [2]).

> - If the confidentiality level of the document (my own tag) is
> "Confidential", print the chapter titles in black rather than blue.

For this check I need to know where your confidentiality element is 

I am not 100% sure, maybe there are better methods, but you can change the 
attribute set chapter.titlepage.recto.style (untested):

 <xsl:attribute-set name="chapter.titlepage.recto.style">
   <xsl:attribute name="color">
       <!-- Adapt the XPath in test to your needs -->
       <xsl:when test="/*/confidentiality = 'Confidental'">

Insert it into your customization layer too. :)

Hope that helps,

[2] http://docbook.sourceforge.net/release/xsl/current/doc/fo/fonts.html

Thomas Schraitle

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