From: uid48421 Date: Wed, 4 Jul 2001 10:10:33 +0000 (+0000) Subject: Remove internal references to *.titlepage.recto.mode and *.titlepage.verso.mode X-Git-Tag: release/1.79.1~6^2~6444 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eeaf7d42f6d52d850e79069a9481b8151eeedb33;p=docbook-dsssl Remove internal references to *.titlepage.recto.mode and *.titlepage.verso.mode --- diff --git a/xsl/fo/titlepage.templates.xml b/xsl/fo/titlepage.templates.xml index b206a7e01..aac56ea2c 100644 --- a/xsl/fo/titlepage.templates.xml +++ b/xsl/fo/titlepage.templates.xml @@ -126,6 +126,7 @@ diff --git a/xsl/fo/titlepage.xsl b/xsl/fo/titlepage.xsl index f17be3725..fd239a0a2 100644 --- a/xsl/fo/titlepage.xsl +++ b/xsl/fo/titlepage.xsl @@ -533,22 +533,26 @@ <!-- ==================================================================== --> <!-- 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"> @@ -556,20 +560,21 @@ <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'"/> @@ -579,7 +584,7 @@ </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'"/> @@ -589,7 +594,7 @@ </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'"/> @@ -599,25 +604,16 @@ </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> diff --git a/xsl/html/component.xsl b/xsl/html/component.xsl index d886a0139..9e393879b 100644 --- a/xsl/html/component.xsl +++ b/xsl/html/component.xsl @@ -62,13 +62,13 @@ </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> @@ -113,13 +113,16 @@ </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> @@ -148,13 +151,16 @@ </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> @@ -198,13 +204,16 @@ </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> @@ -297,13 +306,16 @@ </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> diff --git a/xsl/html/sections.xsl b/xsl/html/sections.xsl index 8ec282da1..608ef8457 100644 --- a/xsl/html/sections.xsl +++ b/xsl/html/sections.xsl @@ -56,45 +56,10 @@ </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"/> @@ -112,7 +77,7 @@ </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> @@ -132,7 +97,7 @@ </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> @@ -153,7 +118,7 @@ </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> @@ -173,7 +138,7 @@ </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> @@ -193,7 +158,7 @@ </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> @@ -209,7 +174,7 @@ </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>