predicates.
Note: in previous versions, at most one title, subtitle, or titleabbrev
element would be processed for each title page. In the new design, if you
have multiple title, subtitle, or titleabbrev elements inside an info
wrapper (you shouldn't!), they will all be processed.
<t:titlepage element="article" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
named-template="component.title"
param:node="ancestor-or-self::article[1]"
fo:margin-left="-4pc"
fo:font-size="&hsize5;"
fo:font-weight="bold"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="set" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
named-template="division.title"
param:node="ancestor-or-self::set[1]"
fo:font-size="&hsize5;"
fo:space-before="&hsize5space;"
fo:font-weight="bold"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="book" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
named-template="division.title"
param:node="ancestor-or-self::book[1]"
fo:font-size="&hsize5;"
fo:space-before="&hsize5space;"
fo:font-weight="bold"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-size="&hsize4;"
fo:space-before="&hsize4space;"
fo:font-family="{$title.font.family}"/>
</t:titlepage-content>
<t:titlepage-content side="verso">
- <title predicate="[1]"
+ <title
fo:font-size="&hsize2;"
fo:font-weight="bold"
fo:font-family="{$title.font.family}"/>
<t:titlepage element="part" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
named-template="division.title"
param:node="ancestor-or-self::part[1]"
fo:font-size="&hsize5;"
fo:space-before="&hsize5space;"
fo:font-weight="bold"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-size="&hsize4;"
fo:space-before="&hsize4space;"
fo:font-weight='bold'
<t:titlepage element="partintro" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
fo:font-size="&hsize3;"
fo:font-weight="bold"
fo:margin-left="-4pc"
fo:space-before="1em"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-size="&hsize2;"
fo:font-weight="bold"
fo:font-style="italic"
<t:titlepage element="reference" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
named-template="division.title"
param:node="ancestor-or-self::reference[1]"
fo:font-size="&hsize5;"
fo:space-before="&hsize5space;"
fo:font-weight="bold"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="dedication" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="component.title"
param:node="ancestor-or-self::dedication[1]"
fo:font-size="&hsize3;"
fo:font-family="{$title.font.family}"
fo:font-weight="bold"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
</t:titlepage-content>
<t:titlepage element="preface" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="component.title"
param:node="ancestor-or-self::preface[1]"
fo:font-size="&hsize3;"
fo:font-family="{$title.font.family}"
fo:font-weight="bold"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="chapter" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
named-template="component.title"
param:node="ancestor-or-self::chapter[1]"
fo:margin-left="-4pc"
fo:font-size="&hsize3;"
fo:font-weight="bold"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:space-before="0.5em"
fo:margin-left="-4pc"
fo:font-style="italic"
<t:titlepage element="appendix" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
named-template="component.title"
param:node="ancestor-or-self::appendix[1]"
fo:margin-left="-4pc"
fo:font-size="&hsize3;"
fo:font-weight="bold"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="section" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
fo:margin-left="-4pc"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="sect1" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
fo:margin-left="-4pc"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="sect2" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
fo:margin-left="-4pc"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="sect3" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
fo:margin-left="-4pc"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="sect4" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
fo:margin-left="-4pc"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="sect5" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
fo:margin-left="-4pc"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="simplesect" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
fo:margin-left="-4pc"
fo:font-family="{$title.font.family}"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
<corpauthor/>
<authorgroup/>
<t:titlepage element="bibliography" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="component.title"
param:node="ancestor-or-self::bibliography[1]"
fo:font-size="&hsize3;"
fo:font-family="{$title.font.family}"
fo:font-weight="bold"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
</t:titlepage-content>
<t:titlepage element="glossary" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="component.title"
param:node="ancestor-or-self::glossary[1]"
fo:font-size="&hsize3;"
fo:font-family="{$title.font.family}"
fo:font-weight="bold"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
</t:titlepage-content>
<t:titlepage element="index" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="component.title"
param:node="ancestor-or-self::index[1]"
fo:font-size="&hsize3;"
fo:font-family="{$title.font.family}"
fo:font-weight="bold"/>
- <subtitle predicate="[1]"
+ <subtitle
fo:font-family="{$title.font.family}"/>
</t:titlepage-content>
<t:titlepage element="table.of.contents" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="gentext"
param:key="'TableofContents'"
<t:titlepage element="list.of.tables" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="gentext"
param:key="'ListofTables'"
<t:titlepage element="list.of.figures" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="gentext"
param:key="'ListofFigures'"
<t:titlepage element="list.of.examples" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="gentext"
param:key="'ListofExamples'"
<t:titlepage element="list.of.equations" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="gentext"
param:key="'ListofEquations'"
<t:titlepage element="list.of.unknowns" wrapper="fo:block">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="gentext"
param:key="'ListofUnknown'"
<t:titlepage element="article" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="set" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="book" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="part" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="partintro" wrapper="div">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="reference" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="dedication" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="component.title"
param:node="ancestor-or-self::dedication[1]"/>
- <subtitle predicate="[1]"/>
+ <subtitle/>
</t:titlepage-content>
<t:titlepage-content side="verso">
<t:titlepage element="preface" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="chapter" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="appendix" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="section" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="sect1" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="sect2" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="sect3" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="sect4" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="sect5" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="simplesect" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"/>
- <subtitle predicate="[1]"/>
+ <title/>
+ <subtitle/>
<corpauthor/>
<authorgroup/>
<author/>
<t:titlepage element="bibliography" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="component.title"
param:node="ancestor-or-self::bibliography[1]"/>
- <subtitle predicate="[1]"/>
+ <subtitle/>
</t:titlepage-content>
<t:titlepage-content side="verso">
<t:titlepage element="glossary" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="component.title"
param:node="ancestor-or-self::glossary[1]"/>
- <subtitle predicate="[1]"/>
+ <subtitle/>
</t:titlepage-content>
<t:titlepage-content side="verso">
<t:titlepage element="index" wrapper="div" class="titlepage">
<t:titlepage-content side="recto">
- <title predicate="[1]"
+ <title
force="1"
named-template="component.title"
param:node="ancestor-or-self::index[1]"/>
- <subtitle predicate="[1]"/>
+ <subtitle/>
</t:titlepage-content>
<t:titlepage-content side="verso">
</xsl:element>
</xsl:if>
- <!-- output default templates for each of the elements listed in -->
- <!-- the titlepage-content -->
+ <!-- output default templates for each of the elements listed in -->
+ <!-- the titlepage-content. If a template is suppressed or forced -->
+ <!-- to be off, or has already been output, don't output it. -->
<xsl:for-each select="t:titlepage-content/*">
+ <xsl:variable name="thisnode" select="."/>
<xsl:if test="(not(@suppress-template) or @suppress-template='0')
- and (not(@force) or @force='0')">
+ and (not(@force) or @force='0')
+ and (not(preceding-sibling::*[name(.)=name($thisnode)]))">
<xsl:text>

</xsl:text>
<xsl:element name="xsl:template">
<xsl:attribute name="match">
<xsl:text>|</xsl:text>
</xsl:if>
- <xsl:if test="@predicate">
- <xsl:text>(</xsl:text>
- </xsl:if>
-
<xsl:value-of select="$docinfo"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="name(.)"/>
+ <xsl:if test="@predicate">
+ <xsl:value-of select="@predicate"/>
+ </xsl:if>
<xsl:if test="$altinfo != ''">
<xsl:text>|</xsl:text>
<xsl:value-of select="$altinfo"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="name(.)"/>
+ <xsl:if test="@predicate">
+ <xsl:value-of select="@predicate"/>
+ </xsl:if>
</xsl:if>
- <xsl:if test="name(.) = 'title'
- or name(.) = 'subtitle'
- or name(.) = 'titleabbrev'">
+ <xsl:if test="local-name(.) = 'title'
+ or local-name(.) = 'subtitle'
+ or local-name(.) = 'titleabbrev'">
<xsl:text>|</xsl:text>
<xsl:value-of select="name(.)"/>
- </xsl:if>
-
- <xsl:if test="@predicate">
- <xsl:text>)</xsl:text>
- <xsl:value-of select="@predicate"/>
+ <xsl:if test="@predicate">
+ <xsl:value-of select="@predicate"/>
+ </xsl:if>
</xsl:if>
</xsl:template>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
- <xsl:element name="xsl:apply-templates">
- <xsl:attribute name="mode">
- <xsl:value-of select="$mode"/>
- </xsl:attribute>
- <xsl:attribute name="select">
- <xsl:if test="@predicate">
- <xsl:text>(</xsl:text>
- </xsl:if>
- <xsl:value-of select="$docinfo"/>
- <xsl:text>/</xsl:text>
- <xsl:value-of select="name(.)"/>
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'title'
+ or local-name(.) = 'subtitle'
+ or local-name(.) = 'titleabbrev'">
+ <!-- the title, subtitle, and titleabbrev elements are special -->
+ <xsl:element name="xsl:choose">
+ <xsl:text>
 </xsl:text>
+ <xsl:element name="xsl:when">
+ <xsl:attribute name="test">
+ <xsl:value-of select="$docinfo"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ </xsl:attribute>
+ <xsl:text>
 </xsl:text>
+ <xsl:element name="xsl:apply-templates">
+ <xsl:attribute name="mode">
+ <xsl:value-of select="$mode"/>
+ </xsl:attribute>
+ <xsl:attribute name="select">
+ <xsl:value-of select="$docinfo"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:if test="@predicate">
+ <xsl:value-of select="@predicate"/>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:text>
 </xsl:text>
+ </xsl:element>
- <xsl:if test="$altinfo != ''">
- <xsl:text>|</xsl:text>
- <xsl:value-of select="$altinfo"/>
- <xsl:text>/</xsl:text>
- <xsl:value-of select="name(.)"/>
- </xsl:if>
+ <xsl:if test="$altinfo != ''">
+ <xsl:text>
 </xsl:text>
+ <xsl:element name="xsl:when">
+ <xsl:attribute name="test">
+ <xsl:value-of select="$altinfo"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ </xsl:attribute>
+ <xsl:text>
 </xsl:text>
+ <xsl:element name="xsl:apply-templates">
+ <xsl:attribute name="mode">
+ <xsl:value-of select="$mode"/>
+ </xsl:attribute>
+ <xsl:attribute name="select">
+ <xsl:value-of select="$altinfo"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:if test="@predicate">
+ <xsl:value-of select="@predicate"/>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:text>
 </xsl:text>
+ </xsl:element>
+ </xsl:if>
- <xsl:if test="name(.) = 'title'
- or name(.) = 'subtitle'
- or name(.) = 'titleabbrev'">
- <xsl:text>|</xsl:text>
- <xsl:value-of select="name(.)"/>
- </xsl:if>
+ <xsl:text>
 </xsl:text>
+ <xsl:element name="xsl:when">
+ <xsl:attribute name="test">
+ <xsl:value-of select="name(.)"/>
+ </xsl:attribute>
+ <xsl:text>
 </xsl:text>
+ <xsl:element name="xsl:apply-templates">
+ <xsl:attribute name="mode">
+ <xsl:value-of select="$mode"/>
+ </xsl:attribute>
+ <xsl:attribute name="select">
+ <xsl:value-of select="name(.)"/>
+ <xsl:if test="@predicate">
+ <xsl:value-of select="@predicate"/>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:text>
 </xsl:text>
+ </xsl:element>
+ <xsl:text>
 </xsl:text>
+ </xsl:element>
+ <xsl:text>
</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+
+ <!-- first take care of the $docinfo version -->
+ <xsl:element name="xsl:apply-templates">
+ <xsl:attribute name="mode">
+ <xsl:value-of select="$mode"/>
+ </xsl:attribute>
+ <xsl:attribute name="select">
+ <xsl:value-of select="$docinfo"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:if test="@predicate">
+ <xsl:value-of select="@predicate"/>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:element>
- <xsl:if test="@predicate">
- <xsl:text>)</xsl:text>
- <xsl:value-of select="@predicate"/>
+ <!-- then take care of the $altinfo version -->
+ <xsl:if test="$altinfo != ''">
+ <xsl:text>
 </xsl:text>
+ <xsl:element name="xsl:apply-templates">
+ <xsl:attribute name="mode">
+ <xsl:value-of select="$mode"/>
+ </xsl:attribute>
+ <xsl:attribute name="select">
+ <xsl:value-of select="$altinfo"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:if test="@predicate">
+ <xsl:value-of select="@predicate"/>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:element>
</xsl:if>
- </xsl:attribute>
- </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>