[yelp-xsl] db2html: Added support for bridgehead element
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] db2html: Added support for bridgehead element
- Date: Mon, 13 Feb 2012 23:48:33 +0000 (UTC)
commit dd48c12fa9f67c9a4eb9b0dabe2d3299b915e1db
Author: Shaun McCance <shaunm gnome org>
Date: Mon Feb 13 18:48:14 2012 -0500
db2html: Added support for bridgehead element
xslt/docbook/html/db2html-block.xsl | 33 ++++++++++++++++++++++++++++++
xslt/docbook/html/db2html-css.xsl | 2 +
xslt/docbook/html/db2html-suppressed.xsl | 1 -
3 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/xslt/docbook/html/db2html-block.xsl b/xslt/docbook/html/db2html-block.xsl
index 9737526..ba29650 100644
--- a/xslt/docbook/html/db2html-block.xsl
+++ b/xslt/docbook/html/db2html-block.xsl
@@ -395,6 +395,39 @@ syntax highlighting support based on the #{language} attribute of ${node}.
<xsl:call-template name="db2html.blockquote"/>
</xsl:template>
+<!-- == bridgehead = -->
+<xsl:template match="bridgehead | db:bridgehead">
+ <xsl:param name="depth_in_chunk">
+ <xsl:call-template name="db.chunk.depth-in-chunk"/>
+ </xsl:param>
+ <xsl:variable name="render">
+ <xsl:choose>
+ <xsl:when test="starts-with(@renderas, 'sect')">
+ <xsl:value-of select="substring-after(@renderas, 'sect')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>6</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level" select="number($depth_in_chunk) + number($render) - 1"/>
+ <xsl:variable name="title_h">
+ <xsl:choose>
+ <xsl:when test="$depth_in_chunk < 6">
+ <xsl:value-of select="concat('h', $level)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>h6</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <div class="hgroup bridgehead">
+ <xsl:element name="{$title_h}" namespace="{$html.namespace}">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </div>
+</xsl:template>
+
<!-- = caption = -->
<xsl:template match="caption | db:caption">
<xsl:call-template name="db2html.block">
diff --git a/xslt/docbook/html/db2html-css.xsl b/xslt/docbook/html/db2html-css.xsl
index d964ebd..0448453 100644
--- a/xslt/docbook/html/db2html-css.xsl
+++ b/xslt/docbook/html/db2html-css.xsl
@@ -43,6 +43,8 @@ REMARK: Describe this module
</xsl:call-template>
</xsl:param>
<xsl:text>
+div.hgroup.bridgehead { margin-top: 1em; }
+
<!-- == common == -->
sub { font-size: 0.83em; }
sub sub { font-size: 1em; }
diff --git a/xslt/docbook/html/db2html-suppressed.xsl b/xslt/docbook/html/db2html-suppressed.xsl
index ecebb6e..74db0bc 100644
--- a/xslt/docbook/html/db2html-suppressed.xsl
+++ b/xslt/docbook/html/db2html-suppressed.xsl
@@ -42,7 +42,6 @@ modes because of the DocBook content model.
<xsl:template match="alt | db:alt"/>
<xsl:template match="beginpage"/>
<xsl:template match="bibliocoverage | db:bibliocoverage"/>
-<xsl:template match="bridgehead | db:bridgehead"/>
<!-- Explicitly matched by parent -->
<xsl:template match="listitem | db:listitem"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]