<!-- ==================================================================== -->
<xsl:template match="reference">
+ <!-- If there is a partintro, it triggers the page sequence -->
<xsl:if test="not(partintro)">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
<fo:block id="{$id}">
<xsl:call-template name="reference.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>
+
<!-- Create one page sequence if no pagebreaks needed -->
<xsl:if test="$refentry.pagebreak = 0">
<xsl:apply-templates select="refentry"/>
<xsl:call-template name="partintro.titlepage"/>
</xsl:if>
<xsl:apply-templates/>
+
+ <!-- switch contexts to generate any toc -->
+ <xsl:for-each select="..">
+ <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:for-each>
+
<!-- Create one page sequence if no pagebreaks needed -->
<xsl:if test="$refentry.pagebreak = 0">
<xsl:apply-templates select="../refentry"/>