Hi folks,
DITA 1.1 bookmap with DITA 1.4 OT
I’m trying to create an additional front matter page in the PDF output that we
can tell our vendor to print on cardstock, essentially automating the book’s
cover in addition to the title page. The text for this page is identical to the
title page, but the styling needs to be different. This is the approach I’m
trying to use:
1. Leave the title page how it is for the time being.
2. Duplicate the content that appears on the title page on the next odd page.
3. Change the look of the first page by applying new attribute sets.
Unfortunately, I’ve only been able to accomplish step 1. :-)
I’ve tried editing the createFrontMatter template by duplicating the relevant
blocks in the flow, which resulted in duplicated text in the output. But I need
that text to appear on the next odd page, and when I tried adding a break, the
duplicated text did not appear.
Can someone help me get started looking in the right place? Do I need to look
more places than layout-masters.xsl, front-matter.xsl, and
front-matter-attr.xsl?
Thank you,
Patrick
<xsl:template name="createFrontMatter">
<fo:page-sequence master-reference="front-matter" format="i"
xsl:use-attribute-sets="__force__page__count">
<xsl:call-template name="insertFrontMatterStaticContents"/>
<fo:flow flow-name="xsl-region-body">
<fo:block xsl:use-attribute-sets="__frontmatter">
<!-- set the title -->
<fo:block xsl:use-attribute-sets="__frontmatter__title">
<xsl:choose>
<xsl:when test="//*[contains(@class,' bkinfo/bkinfo ')][1]">
<xsl:apply-templates select="//*[contains(@class,'
bkinfo/bkinfo ')][1]/*[contains(@class,' topic/title ')]/node()"/>
</xsl:when>
<xsl:when test="//*[contains(@class, ' map/map ')]/@title">
<xsl:value-of select="//*[contains(@class, ' map/map
')]/@title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/descendant::*[contains(@class, '
topic/topic ')][1]/*[contains(@class, ' topic/title ')]"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
<!-- set the subtitle -->
<xsl:apply-templates select="//*[contains(@class,' bkinfo/bkinfo
')][1]/*[contains(@class,' bkinfo/bktitlealts ')]/*[contains(@class,'
bkinfo/bksubtitle ')]"/>
<!--break--><fo:block xsl:use-attribute-sets="__frontmatter__owner"
break-after="odd-page">
<xsl:choose>
<xsl:when test="//*[contains(@class,' bkinfo/bkowner ')]">
<xsl:apply-templates select="//*[contains(@class,'
bkinfo/bkowner ')]"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="$map/*[contains(@class, '
map/topicmeta ')]"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
<!-- duplicated frontmatter text -->
<fo:block xsl:use-attribute-sets="__frontmatter__title">
<xsl:choose>
<xsl:when test="//*[contains(@class,' bkinfo/bkinfo ')][1]">
<xsl:apply-templates select="//*[contains(@class,'
bkinfo/bkinfo ')][1]/*[contains(@class,' topic/title ')]/node()"/>
</xsl:when>
<xsl:when test="//*[contains(@class, ' map/map ')]/@title">
<xsl:value-of select="//*[contains(@class, ' map/map
')]/@title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/descendant::*[contains(@class, '
topic/topic ')][1]/*[contains(@class, ' topic/title ')]"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
<!-- set the subtitle -->
<xsl:apply-templates select="//*[contains(@class,' bkinfo/bkinfo
')][1]/*[contains(@class,' bkinfo/bktitlealts ')]/*[contains(@class,'
bkinfo/bksubtitle ')]"/>
<fo:block xsl:use-attribute-sets="__frontmatter__owner">
<xsl:choose>
<xsl:when test="//*[contains(@class,' bkinfo/bkowner ')]">
<xsl:apply-templates select="//*[contains(@class,'
bkinfo/bkowner ')]"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="$map/*[contains(@class, '
map/topicmeta ')]"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
<!-- end duplicated text -->
</fo:block>
<xsl:call-template name="processCopyrigth"/>
</fo:flow>
</fo:page-sequence>
</xsl:template>