forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Wheller <>
Subject Re: Docbook as forrest-plugin
Date Mon, 25 Oct 2004 17:46:45 GMT
On Monday 25 October 2004 18:47, Ross Gardler wrote:
> > Project Specific Customizations? Use case Docbook Customization Layers.
> Sorry I am not familiar with Docbook, can you expand on this a little.

The basic idea is that one does not want to add customizations to the DTD or 
XSL's distributed by the Docbook Project. So you make a custom layer that 
acts as your driver. Instead of calling the "docbook.xsl" you call "your.xsl" 
that imports or includes the "docbook.xsl." The custom layer passes params 
and templates that overide or extend defaults.

This is great since you can customize at lib and when the next release of the 
DTD or XSL's arrives just knockout the old version from under your system and 
use the new version without having to track all your customizations and redo 
them in the new versions of the DTD or XSL.

Example of my HTML Custom Layer

<xsl:stylesheet xmlns:xsl="" 
    <!-- This file is a customization layer for HTML only -->
    <!-- ======================= -->
    <!-- Imports -->
    catalog.xml href="/usr/share/xml/docbook/stylesheet/nwalsh/current/html/"
    Comment/Uncomment xsl:imports as required.
    <!--<xsl:import href="html-docbook.xsl"/>-->
    <xsl:import href="html-profile-chunk.xsl"/>
    <xsl:include href="common-cust.xsl"/>
    <!-- ======================= -->
    <!-- Parameters -->
    <!-- ======================= -->
    <xsl:param name="profile.condition" select="'html'"/>
    <xsl:param name="base.dir" select="'../dist/html-docs/'"/>
    <xsl:param name="" select="1"/>
    <xsl:param name="chunker.output.indent" select="'yes'"/>
    <xsl:param name="body.font.master" select="12"/>
    <xsl:param name="html.stylesheet" select="'corpstyle.css'"/>
    <xsl:param name="" select="1"/>
    <xsl:param name="" select="'../images'"/>
    <xsl:param name="" select="'.gif'"/>
    <xsl:param name="navig.showtitles" select="1"/>
   <!-- Admon Graphics -->
    <xsl:param name="" select="1"/>
    <xsl:param name="admon.textlabel" select="0"/>
    <xsl:param name="" select="'../images/admon/'"/>
    <xsl:param name="" select="'.png'"/>
    <!-- Callout Graphics -->
    <xsl:param name="callout.unicode" select="1"/>
    <xsl:param name="" select="0"/>
    <xsl:param name="" 
    <xsl:param name="" select="'.png'"/>

Here is the common-cust.xsl it hold customizations that are common to both 
HTML and FO.

<xsl:stylesheet xmlns:xsl="" 
    <!-- ======================= -->
    <!-- Parameters -->
    <!-- ======================= -->
    <!-- Extensions -->
    <xsl:param name="use.extensions" select="1"/>
    <xsl:param name="saxon.extensions" select="1"/>
    <xsl:param name="tablecolumns.extension" select="1"/>
    <xsl:param name="callouts.extensions" select="1"/>
    <!-- General Formatting-->
    <xsl:param name="draft.mode" select="'no'"/>
    <xsl:param name="" select="1"/>
    <xsl:param name="shade.verbatim" select="1"/>
    <xsl:param name="hyphenate">false</xsl:param>
    <xsl:param name="alignment">left</xsl:param>
    <!-- Enumeration -->
    <xsl:param name="label.from.part" select="'1'"></xsl:param>
    <!-- Cross References -->
    <xsl:param name="" select="1"/>
    <xsl:param name="xref.with.number.and.title" select="0"/>
    <!-- Indexes -->
    <xsl:param name="generate.index" select="1"/>
    <!-- Glossaries -->
    <xsl:param name="" select="1"/>
    <xsl:param name="" select="1"/>
    <xsl:param name="glossary.collection">glossary.xml</xsl:param>
    <xsl:param name="" select="'primary'"/>
    <!-- Captions -->
    <xsl:param name="formal.title.placement">
        figure before
        example before 
        equation before 
        table before 
        procedure before
    <!-- ======================= -->
    <!-- Templates -->
    <!-- ======================= -->

    <!-- Inline Formatting -->
    <xsl:template match="filename">
      <xsl:call-template name="inline.boldmonoseq"/>
    <xsl:template match="application">
      <xsl:call-template name="inline.boldseq"/>
    <xsl:template match="guibutton">
      <xsl:call-template name="inline.boldseq"/>
    <xsl:template match="guilabel">
      <xsl:call-template name="inline.italicseq"/>
Sean Wheller
Technical Author

View raw message