summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2005-09-29 05:07:04 +0000
committerShaun McCance <shaunm@src.gnome.org>2005-09-29 05:07:04 +0000
commitcb245835d70b6666a505145501c6dda326efd27f (patch)
tree8ab77bc74cfc20226f2a452291ee31a368a30a74
parentf8f242462b2c56f923851cd5758ba559aa632c2e (diff)
downloadgnome-doc-utils-cb245835d70b6666a505145501c6dda326efd27f.tar.gz
- Line numbering fixes from Brent Smith, #317270 #317204
* xslt/docbook/common/db-common.xsl: * xslt/docbook/html/db2html-block.xsl: - Line numbering fixes from Brent Smith, #317270 #317204
-rw-r--r--ChangeLog6
-rw-r--r--xslt/docbook/common/db-common.xsl27
-rw-r--r--xslt/docbook/html/db2html-block.xsl4
3 files changed, 26 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 382bdd9..b7e5eba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-09-28 Shaun McCance <shaunm@gnome.org>
+ * xslt/docbook/common/db-common.xsl:
+ * xslt/docbook/html/db2html-block.xsl:
+ - Line numbering fixes from Brent Smith, #317270 #317204
+
+2005-09-28 Shaun McCance <shaunm@gnome.org>
+
* gnome-doc-utils.make:
- Put figures in the tarball, once and for all
diff --git a/xslt/docbook/common/db-common.xsl b/xslt/docbook/common/db-common.xsl
index ebba357..51f3f18 100644
--- a/xslt/docbook/common/db-common.xsl
+++ b/xslt/docbook/common/db-common.xsl
@@ -88,25 +88,30 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
<xsl:param name="node" select="."/>
<xsl:param name="number" select="1"/>
<xsl:variable name="substr" select="string($node)"/>
- <xsl:number value="$number"/>
<xsl:call-template name="db.linenumbering.substr">
<xsl:with-param name="substr" select="$substr"/>
- <xsl:with-param name="number" select="$number + 1"/>
+ <xsl:with-param name="number" select="$number"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="db.linenumbering.substr" doc:private="true">
<xsl:param name="substr"/>
<xsl:param name="number"/>
- <xsl:if test="contains($substr, '&#x000A;')">
- <xsl:text>&#x000A;</xsl:text>
- <xsl:number value="$number"/>
- <xsl:call-template name="db.linenumbering.substr">
- <xsl:with-param name="substr"
- select="substring-after($substr, '&#x000A;')"/>
- <xsl:with-param name="number" select="$number + 1"/>
- </xsl:call-template>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="contains($substr, '&#x000A;')">
+ <xsl:number value="$number"/>
+ <xsl:text>&#x000A;</xsl:text>
+ <xsl:call-template name="db.linenumbering.substr">
+ <xsl:with-param name="substr"
+ select="substring-after($substr, '&#x000A;')"/>
+ <xsl:with-param name="number" select="$number + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="string-length($substr) != 0">
+ <xsl:number value="$number"/>
+ <xsl:text>&#x000A;</xsl:text>
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<!-- == db.personname ====================================================== -->
diff --git a/xslt/docbook/html/db2html-block.xsl b/xslt/docbook/html/db2html-block.xsl
index ef96cfd..d3520e5 100644
--- a/xslt/docbook/html/db2html-block.xsl
+++ b/xslt/docbook/html/db2html-block.xsl
@@ -276,6 +276,10 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
pre[class~="linenumbering"] {
<!-- This margin is important to get the line numbering
to line up vertically with the content. -->
+ padding-top: 6px;
+ padding-bottom: 6px;
+ -moz-border-radius: 8px;
+ border: solid 1px black;
margin-top: 0px;
margin-left: 0.8em;
background-color: black;