This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: any examples of article titlepage customization
- From: Bob Stayton <bobs at caldera dot com>
- To: "O'Donnell, Vincent" <vodonnell at accentopto dot com>,"'docbook at lists dot oasis-open dot org'" <docbook at lists dot oasis-open dot org>
- Date: Thu, 09 May 2002 09:55:03 -0700
- Subject: Re: DOCBOOK: any examples of article titlepage customization
- References: <BDB20E169F0AD5119BA8001083FD356941C6FA@york-exchg1.accentopto.com>
On Thu, May 09, 2002 at 12:18:31PM +0100, O'Donnell, Vincent wrote:
> Hello all,
>
> I am trying to change the article titlepage.
>
> Basically I want to have a company logo before anything else.
>
> Before trying to put a picture into the titlepage I am trying to get success
> with just modifying what is already there. So using the 't:' thing I have
> made this xml file:
>
> <t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
> xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
> xmlns:fo="http://www.w3.org/1999/XSL/Format"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> base-stylesheet="C:\XML\docbook-xsl-1.50.1-EXP\fo\docbook.xls">
>
> <t:titlepage element="article" wrapper="fo:block">
> <t:titlepage-content side="recto">
> <title named-template="component.title"
> param:node="ancestor-or-self::article[1]" fo:text-align="center"
> fo:keep-with-next="always" fo:font-size="24.8832pt" fo:font-weight="bold"
> fo:font-family="{$title.font.family}" />
> <subtitle fo:font-family="{$title.font.family}" fo:text-align="center" />
> <revision fo:text-align="center" />
> <revhistory />
> </t:titlepage-content>
>
> <t:titlepage-content side="verso" />
> <t:titlepage-separator />
> <copyright fo:text-align="center" />
> <legalnotice />
>
> <t:titlepage-before side="recto" />
> <t:titlepage-before side="verso" />
>
> </t:titlepage>
>
> (I basically copied it from titlepage.templates.xml, cut a few items out and
> moved one or two)
>
> I have tried transforming that with the fo titlepage.xsl and using xalan. I
> get this error:
>
> file:/c:/xml/docbook-xsl-1.50.1-EXP/fo/titlepage.xsl; Line 20; Column -1;
> XSLT Error (javax.xml.transform.TransformerConfigurationException):
> javax.xml.transform.TransformerException:
> org.apache.xml.utils.WrappedRuntimeException: Could not find variable with
> the name of title.font.family
>
> Anyone had such trouble?
> Anyone have a concrete working example of such article titlepage
> modification?
> I am pursuing the right path for my final goal of putting an image at the
> start of the article titlepage?
Ah, you don't use the fo/titlepage.xsl stylesheet for that
purpose. Instead you need to use the template/titlepage.xsl
template. They are unfortunately named the same.
Here is the process in a nutshell:
1. copy fo/titlepage.templates.xml to customized.xml
2. edit customized.xml
3. <yourXSLprocesor> template/titlepage.xsl customized.xml > customized.xsl
4. xsl:include customized.xsl in your fo customization layer.
--
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