<t:titlepage-content side="verso">
<title
+ named-template="book.verso.title"
fo:font-size="&hsize2;"
fo:font-weight="bold"
fo:font-family="{$title.font.family}"/>
<!-- ==================================================================== -->
<!-- Book templates -->
+<!-- Note: these templates cannot use *.titlepage.recto.mode or
+ *.titlepage.verso.mode. If they do then subsequent use of a custom
+ titlepage.templates.xml file will not work correctly. -->
+
<!-- book recto -->
-<xsl:template match="authorgroup" mode="book.titlepage.recto.mode">
+<xsl:template match="bookinfo/authorgroup" mode="titlepage.mode" priority="2">
<fo:wrapper>
<xsl:if test="@id">
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
</xsl:if>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode"/>
+ <xsl:apply-templates mode="titlepage.mode"/>
</fo:wrapper>
</xsl:template>
<!-- book verso -->
-<xsl:template match="title" mode="book.titlepage.verso.mode">
+<xsl:template name="book.verso.title">
<fo:block>
- <xsl:apply-templates mode="book.titlepage.verso.mode"/>
+ <xsl:apply-templates mode="titlepage.mode"/>
<xsl:if test="following-sibling::subtitle
|following-sibling::bookinfo/subtitle">
<xsl:apply-templates select="(following-sibling::subtitle
|following-sibling::bookinfo/subtitle)[1]"
- mode="book.titlepage.verso.mode"/>
+ mode="book.verso.subtitle.mode"/>
</xsl:if>
</fo:block>
</xsl:template>
-<xsl:template match="subtitle" mode="book.titlepage.verso.mode">
- <xsl:apply-templates mode="book.titlepage.verso.mode"/>
+<xsl:template match="subtitle" mode="book.verso.subtitle.mode">
+ <xsl:apply-templates mode="titlepage.mode"/>
<xsl:if test="following-sibling::subtitle">
<xsl:text>: </xsl:text>
- <xsl:apply-templates select="following-sibling::subtitle[1]"/>
+ <xsl:apply-templates select="following-sibling::subtitle[1]"
+ mode="book.verso.subtitle.mode"/>
</xsl:if>
</xsl:template>
-<xsl:template match="bookinfo/author" mode="book.titlepage.verso.mode">
+<xsl:template match="bookinfo/author" mode="titlepage.mode" priority="2">
<fo:block>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'by'"/>
</fo:block>
</xsl:template>
-<xsl:template match="bookinfo/corpauthor" mode="book.titlepage.verso.mode">
+<xsl:template match="bookinfo/corpauthor" mode="titlepage.mode" priority="2">
<fo:block>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'by'"/>
</fo:block>
</xsl:template>
-<xsl:template match="authorgroup" mode="book.titlepage.verso.mode">
+<xsl:template match="bookinfo/authorgroup" mode="titlepage.mode" priority="2">
<fo:block>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'by'"/>
</fo:block>
</xsl:template>
-<xsl:template match="pubdate" mode="book.titlepage.verso.mode">
+<xsl:template match="bookinfo/pubdate" mode="titlepage.mode" priority="2">
<fo:block>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'published'"/>
</xsl:call-template>
<xsl:text> </xsl:text>
- <xsl:apply-templates mode="book.titlepage.verso.mode"/>
+ <xsl:apply-templates mode="titlepage.mode"/>
</fo:block>
</xsl:template>
-<!-- ==================================================================== -->
-<!-- Part templates -->
-
-<!-- part recto -->
-
-<xsl:template match="title" mode="part.titlepage.recto.mode">
- <xsl:apply-templates select="ancestor::part" mode="title.markup"/>
-</xsl:template>
-
<!-- ==================================================================== -->
</xsl:stylesheet>
</div>
</xsl:template>
-<xsl:template match="title" mode="dedication.titlepage.recto.mode">
+<xsl:template match="dedication/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="component.title">
<xsl:with-param name="node" select="ancestor::dedication[1]"/>
</xsl:call-template>
</xsl:template>
-<xsl:template match="subtitle" mode="dedication.titlepage.recto.mode">
+<xsl:template match="dedication/subtitle" mode="titlepage.mode" priority="2">
<xsl:call-template name="component.subtitle">
<xsl:with-param name="node" select="ancestor::dedication[1]"/>
</xsl:call-template>
</div>
</xsl:template>
-<xsl:template match="title" mode="preface.titlepage.recto.mode">
+<xsl:template match="preface/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="component.title">
<xsl:with-param name="node" select="ancestor::preface[1]"/>
</xsl:call-template>
</xsl:template>
-<xsl:template match="subtitle" mode="preface.titlepage.recto.mode">
+<xsl:template match="preface/subtitle
+ |preface/prefaceinfo/subtitle
+ |preface/docinfo/subtitle"
+ mode="titlepage.mode" priority="2">
<xsl:call-template name="component.subtitle">
<xsl:with-param name="node" select="ancestor::preface[1]"/>
</xsl:call-template>
</div>
</xsl:template>
-<xsl:template match="title" mode="chapter.titlepage.recto.mode">
+<xsl:template match="chapter/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="component.title">
<xsl:with-param name="node" select="ancestor::chapter[1]"/>
</xsl:call-template>
</xsl:template>
-<xsl:template match="subtitle" mode="chapter.titlepage.recto.mode">
+<xsl:template match="chapter/subtitle
+ |chapter/chapterinfo/subtitle
+ |chapter/docinfo/subtitle"
+ mode="titlepage.mode" priority="2">
<xsl:call-template name="component.subtitle">
<xsl:with-param name="node" select="ancestor::chapter[1]"/>
</xsl:call-template>
</div>
</xsl:template>
-<xsl:template match="title" mode="appendix.titlepage.recto.mode">
+<xsl:template match="appendix/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="component.title">
<xsl:with-param name="node" select="ancestor::appendix[1]"/>
</xsl:call-template>
</xsl:template>
-<xsl:template match="subtitle" mode="appendix.titlepage.recto.mode">
+<xsl:template match="appendix/subtitle
+ |appendix/appendixinfo/subtitle
+ |appendix/docinfo/subtitle"
+ mode="titlepage.mode" priority="2">
<xsl:call-template name="component.subtitle">
<xsl:with-param name="node" select="ancestor::appendix[1]"/>
</xsl:call-template>
</div>
</xsl:template>
-<xsl:template match="title" mode="article.titlepage.recto.mode">
+<xsl:template match="article/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="component.title">
<xsl:with-param name="node" select="ancestor::article[1]"/>
</xsl:call-template>
</xsl:template>
-<xsl:template match="subtitle" mode="article.titlepage.recto.mode">
+<xsl:template match="article/subtitle
+ |article/articleinfo/subtitle
+ |article/artheader/subtitle"
+ mode="titlepage.mode" priority="2">
<xsl:call-template name="component.subtitle">
<xsl:with-param name="node" select="ancestor::article[1]"/>
</xsl:call-template>
</xsl:call-template>
</xsl:template>
-<xsl:template match="title" mode="section.titlepage.recto.mode">
+<xsl:template match="section/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="section.title"/>
</xsl:template>
-<xsl:template match="x-title" mode="section.titlepage.recto.mode">
- <xsl:variable name="section" select="(ancestor::section
- |ancestor::simplesect
- |ancestor::sect1
- |ancestor::sect2
- |ancestor::sect3
- |ancestor::sect4
- |ancestor::sect5)[last()]"/>
-
- <xsl:variable name="level">
- <xsl:call-template name="section.level">
- <xsl:with-param name="node" select="$section"/>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:message>Level: <xsl:value-of select="$level"/>: <xsl:value-of select="."/></xsl:message>
-
- <xsl:element name="h{$level}">
- <xsl:attribute name="class">title</xsl:attribute>
- <xsl:if test="$css.decoration != '0'">
- <xsl:if test="$level<3">
- <xsl:attribute name="style">clear: both</xsl:attribute>
- </xsl:if>
- </xsl:if>
- <a>
- <xsl:attribute name="name">
- <xsl:call-template name="object.id">
- <xsl:with-param name="object" select="$section"/>
- </xsl:call-template>
- </xsl:attribute>
- </a>
- <xsl:apply-templates select="$section" mode="object.title.markup"/>
- </xsl:element>
-</xsl:template>
-
<xsl:template match="sect1">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</div>
</xsl:template>
-<xsl:template match="title" mode="sect1.titlepage.recto.mode">
+<xsl:template match="sect1/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="section.title"/>
</xsl:template>
</div>
</xsl:template>
-<xsl:template match="title" mode="sect2.titlepage.recto.mode">
+<xsl:template match="sect2/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="section.title"/>
</xsl:template>
</div>
</xsl:template>
-<xsl:template match="title" mode="sect3.titlepage.recto.mode">
+<xsl:template match="sect3/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="section.title"/>
</xsl:template>
</div>
</xsl:template>
-<xsl:template match="title" mode="sect4.titlepage.recto.mode">
+<xsl:template match="sect4/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="section.title"/>
</xsl:template>
</div>
</xsl:template>
-<xsl:template match="title" mode="sect5.titlepage.recto.mode">
+<xsl:template match="sect5/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="section.title"/>
</xsl:template>
</div>
</xsl:template>
-<xsl:template match="title" mode="simplesect.titlepage.recto.mode">
+<xsl:template match="simplesect/title" mode="titlepage.mode" priority="2">
<xsl:call-template name="section.title"/>
</xsl:template>