Hi,
You need to do a couple of things to get this to work.
1. In your titlepage spec file, omit the d: namespace prefix on this
attribute value:
t:element="legalnotice"
instead of "d:legalnotice". I know, it is DocBook 5, but this attribute is
used to create the named template, and the element will get the namespace
when the templates are generated.
2. The titlepage templates in your generated file do not create page
sequences. They create fo:blocks that are intended to be used within
page-sequences that you define. So you need to customize the template
matching on d:book as follows:
<xsl:template match="d:book">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="preamble"
select="d:title|d:subtitle|d:titleabbrev|d:bookinfo|d:info"/>
<xsl:variable name="content"
select="node()[not(self::d:title or self::d:subtitle
or self::d:titleabbrev
or self::d:info
or self::d:bookinfo)]"/>
<xsl:variable name="titlepage-master-reference">
<xsl:call-template name="select.pagemaster">
<xsl:with-param name="pageclass" select="'titlepage'"/>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="front.cover"/>
<xsl:if test="$preamble">
<xsl:call-template name="page.sequence">
<xsl:with-param name="master-reference"
select="$titlepage-master-reference"/>
<xsl:with-param name="content">
<fo:block id="{$id}">
<xsl:call-template name="book.titlepage"/>
</fo:block>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:call-template name="page.sequence">
<xsl:with-param name="master-reference"
select="$titlepage-master-reference"/>
<xsl:with-param name="content">
<fo:block id="ln-{$id}">
<xsl:call-template name="legalnotice.titlepage"/>
</fo:block>
</xsl:with-param>
</xsl:call-template>
<xsl:apply-templates select="d:dedication" mode="dedication"/>
<xsl:call-template name="make.book.tocs"/>
<xsl:apply-templates select="$content"/>
<xsl:call-template name="back.cover"/>
</xsl:template>
Notice that in the original template, the "book.titlepage" template is
called within a call to the "page.sequence" template. The part I added was
another call-template name="page.sequence" that contains a call to
"legalnotice.titlepage". The "legalnotice.titlepage" template was created
when you regenerated your titlepage templates.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]
----- Original Message -----
From: "spr" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, October 16, 2007 11:06 AM
Subject: Re: [docbook-apps] What is wrong in this title page spec?
Any help??
spr wrote:
I have to create a page-master for legal notice-only. In the page
sequence
it appears after the default titlepage.
But, despite spending long time reading the customization section on
TDG5,
I am stuck at 2 places:
1) The pages (recto & verso) are being generated, but they always turned
empty.
2) The page number in footer is not roman numerals. The table of
contents
(coming after the page containing legal notice) is in romal numerals.
Here is my spec:
<t:titlepage t:element="d:legalnotice" t:wrapper="fo:block">
<t:titlepage-content t:side="recto">
<legalnotice />
</t:titlepage-content>
<t:titlepage-content t:side="verso">
</t:titlepage-content>
<t:titlepage-separator>
</t:titlepage-separator>
<t:titlepage-before t:side="recto">
</t:titlepage-before>
<t:titlepage-before t:side="verso">
</t:titlepage-before>
</t:titlepage>
Also tried this (in spec above):
<legalnotice param:mode = "titlepage" />
what could be going wrong here?
~spr
--
View this message in context:
http://www.nabble.com/What-is-wrong-in-this-title-page-spec--tf4630333.html#a13239007
Sent from the docbook apps mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]