<fo:root font-family="{$body.font.family}"
font-size="{$body.font.size}"
text-align="{$alignment}">
+ <xsl:if test="$xep.extensions != 0">
+ <xsl:call-template name="xep-document-information"/>
+ </xsl:if>
<xsl:call-template name="setup.pagemasters"/>
<xsl:choose>
<xsl:when test="$rootid != ''">
<xsl:apply-templates select="id($rootid)" mode="outline"/>
</xsl:if>
<xsl:if test="$xep.extensions != 0">
- <xsl:apply-templates select="id($rootid)" mode="xep.outline"/>
+ <rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions">
+ <xsl:apply-templates select="id($rootid)" mode="xep.outline"/>
+ </rx:outline>
</xsl:if>
<xsl:apply-templates select="id($rootid)"/>
</xsl:otherwise>
<xsl:apply-templates mode="outline"/>
</xsl:if>
<xsl:if test="$xep.extensions != 0">
- <xsl:apply-templates mode="xep.outline"/>
+ <rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions">
+ <xsl:apply-templates mode="xep.outline"/>
+ </rx:outline>
</xsl:if>
<xsl:apply-templates/>
</xsl:otherwise>
Document information
******************************************************************** -->
-<xsl:template name="document-information">
- <xsl:param name="document-title" select="//title[1]"/>
+<xsl:template name="xep-document-information">
<rx:meta-info>
+ <xsl:if test="//author[1]">
+ <xsl:element name="rx:meta-field">
+ <xsl:attribute name="name">author</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:call-template name="person.name">
+ <xsl:with-param name="node" select="//author[1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:element>
+ </xsl:if>
+
+ <xsl:variable name="title">
+ <xsl:apply-templates select="/*[1]" mode="label.markup"/>
+ <xsl:apply-templates select="/*[1]" mode="title.markup"/>
+ </xsl:variable>
+
<xsl:element name="rx:meta-field">
- <xsl:attribute name="name">author</xsl:attribute>
+ <xsl:attribute name="name">title</xsl:attribute>
<xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="bookinfo/author">
- <xsl:value-of select="bookinfo/author"/>
- </xsl:when>
- <xsl:otherwise>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:value-of select="$title"/>
</xsl:attribute>
</xsl:element>
- <xsl:element name="rx:meta-field">
- <xsl:attribute name="name">title</xsl:attribute>
- <xsl:attribute name="value">
- <xsl:value-of select="$document-title"/>
- </xsl:attribute>
- </xsl:element>
</rx:meta-info>
</xsl:template>
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="bookmark-label">
- <xsl:apply-templates select="." mode="label.content"/>
- <xsl:apply-templates select="." mode="title.content"/>
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<rx:bookmark internal-destination="{$id}">
<xsl:value-of select="$bookmark-label"/>
</rx:bookmark-label>
- <xsl:if test="part|preface|chapter|appendix">
+ <xsl:if test="part|preface|chapter|appendix">
<xsl:apply-templates select="part|preface|chapter|appendix"
mode="xep.outline"/>
- </xsl:if>
+ </xsl:if>
</rx:bookmark>
</xsl:template>
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="bookmark-label">
- <xsl:apply-templates select="." mode="label.content"/>
- <xsl:apply-templates select="." mode="title.content"/>
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<rx:bookmark internal-destination="{$id}">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="bookmark-label">
- <xsl:apply-templates select="." mode="label.content"/>
- <xsl:apply-templates select="." mode="title.content"/>
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<rx:bookmark internal-destination="{$id}">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="bookmark-label">
- <xsl:apply-templates select="." mode="label.content"/>
- <xsl:apply-templates select="." mode="title.content"/>
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<rx:bookmark internal-destination="{$id}">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="bookmark-label">
- <xsl:apply-templates select="." mode="label.content"/>
- <xsl:apply-templates select="." mode="title.content"/>
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<rx:bookmark internal-destination="{$id}">