Hi Bob
I've had some limited success with this on my first use of DB5
(XML code for DB4.5 converted as per 'The Transition Guide' of 16 May
2006). See comments below on my problems. I'm using DB5
snapshot of July, and inserted your code in my unchanged DB4.5
customization layer.
I can't validate the DB5 code, all the elements are unrecognized
(Oxygen 8.2), but XEP transforms without any errors.
Ron
Hi Ron,
For the first problem, you will need to divide the article output into multiple page-sequences. That requires customizing the template that matches on article from fo/component.xsl. With the snapshot version, this is easier because it has a template named "page.sequence" intended for such purposes. You can specify one parameter for the master name and another for the content of the page sequence. The following example shows how it can be used for the different parts of your article.
This worked OK, the column organization was as specified.
***BUT***
1. The first page of the XEP output (in 1 col format) contained
only the Table of Contents.
2. The second page (in 2 col format) contained the
<authorgroup>, <copyright> and <legalnotice> output
in red, at the start of the
first column. The only elements processed were <personname>
and the included <firstname> and <surname> Also,
shouldn't this information be on the first, title page?
The XMl source:
<authorgroup>
<author>
<personname><firstname>Ron</firstname><surname>Catterall </surname></personname>
<personname><firstname>Ron</firstname><surname>Catterall </surname></personname>
<affiliation><orgname>
Some text here
that just happened to be in the right place with
DB4.5
</orgname></affiliation></author>
</authorgroup>
<copyright>
<year>2007</year>
<holder>Ron Catterall</holder>
</copyright>
<legalnotice>
<copyright>
<year>2007</year>
<holder>Ron Catterall</holder>
</copyright>
<legalnotice>
<para>All Rights Reserved. This is a draft version, and all
permissions to copy, modify or distribute this material are withheld
unless specifically granted in writing. The right of Ron Catterall to be identified
as author of this work has been asserted by him in accordance with the
Copyright, Designs and Patents Act 1988.</para>
</legalnotice>
produced the following output at the start of the first
column:
<authorgroup>
Ron Catterall </authorgroup>
<copyright>
<year>2007</year>
<holder>Ron Catterall</holder>
</copyright>
<legalnotice>
All Rights Reserved. This is a draft version,
and all permissions to copy, modify or distribute
this material are withheld unless specifically
granted in writing. The right of Ron Catterall
to be identified as author of this work has been
asserted by him in accordance with the Copyright,
<copyright>
<year>2007</year>
<holder>Ron Catterall</holder>
</copyright>
<legalnotice>
All Rights Reserved. This is a draft version,
and all permissions to copy, modify or distribute
this material are withheld unless specifically
granted in writing. The right of Ron Catterall
to be identified as author of this work has been
asserted by him in accordance with the Copyright,
Designs and Patents
Act 1988.
</legalnotice>
3. the 'wrap' code
<xsl:attribute-set name="verbatim.properties">
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
</xsl:attribute-set>
did not wrap the long lines in the <literallayout> in
<blockquote> elements.
For literallayout wrapping, you want to add a wrap-option="wrap" property to the verbatim.properties attribute set, as shown in the following example.
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:import href="">
<xsl:param name="column.count.titlepage" select="1" />
<xsl:param name="column.count.lot" select="1" />
<xsl:param name="column.count.body" select="2" />
<xsl:param name="column.count.back" select="1" />
<xsl:param name="double.sided">0</xsl:param>
<xsl:attribute-set name="verbatim.properties">
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
</xsl:attribute-set>
<xsl:template name="initial.page.number">auto</xsl:template>
<xsl:template match="article">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:call-template name="page.sequence">
<xsl:with-param name="master-reference">titlepage</xsl:with-param>
<xsl:with-param name="content">
<fo:block id="{$id}"
xsl:use-attribute-sets="component.titlepage.properties">
<xsl:call-template name="article.titlepage"/>
</fo:block>
<xsl:variable name="toc.params">
<xsl:call-template name="find.path.params">
<xsl:with-param name="table" select="normalize-space($generate.toc)"/>
</xsl:call-template>
</xsl:variable>
<xsl:if test="contains($toc.params, 'toc')">
<xsl:call-template name="component.toc">
<xsl:with-param name="toc.title.p"
select="contains($toc.params, 'title')"/>
</xsl:call-template>
<xsl:call-template name="component.toc.separator"/>
</xsl:if>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="page.sequence">
<xsl:with-param name="master-reference">body</xsl:with-param>
<xsl:with-param name="content">
<xsl:apply-templates select="*[not(self::bibliography)]"/>
</xsl:with-param>
</xsl:call-template>
<xsl:if test="bibliography">
<xsl:call-template name="page.sequence">
<xsl:with-param name="master-reference">back</xsl:with-param>
<xsl:with-param name="content">
<xsl:apply-templates select="bibliography"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]
--
Ron Catterall, Phd, DSc
email: [EMAIL PROTECTED]
Prolongacion de Hidalgo 140
http://catterall.net/
San Felipe del Agua
tel:
+52 951 520 1821
Oaxaca 68020
Mexico
fax:
+1 530 348 8309
Prolongacion de Hidalgo 140
San Felipe del Agua
Oaxaca 68020
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
