summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Smith <bmsmith@src.gnome.org>2005-10-12 21:31:30 +0000
committerBrent Smith <bmsmith@src.gnome.org>2005-10-12 21:31:30 +0000
commit7f9cae8885e6f770009a9b19d79ea6ac894d59ff (patch)
tree2e94b18dfe4a3329c6c6b7e6b47f5fdfe61475f9
parent74319f332bd5ca5d7432e9f5de072a07e17119ac (diff)
downloadgnome-doc-utils-7f9cae8885e6f770009a9b19d79ea6ac894d59ff.tar.gz
Brent Smith <gnome@nextreality.net>
* xslt/docbook/common/db-common.xsl: - add another fix for line numbering, #317270
-rw-r--r--ChangeLog5
-rw-r--r--xslt/docbook/common/db-common.xsl31
2 files changed, 35 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 869cce6..02403a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-12 Brent Smith <gnome@nextreality.net>
+
+ * xslt/docbook/common/db-common.xsl:
+ - add another fix for line numbering, #317270
+
2005-10-11 Shaun McCance <shaunm@gnome.org>
* NEWS:
diff --git a/xslt/docbook/common/db-common.xsl b/xslt/docbook/common/db-common.xsl
index 51f3f18..3897794 100644
--- a/xslt/docbook/common/db-common.xsl
+++ b/xslt/docbook/common/db-common.xsl
@@ -87,7 +87,36 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
<xsl:template name="db.linenumbering">
<xsl:param name="node" select="."/>
<xsl:param name="number" select="1"/>
- <xsl:variable name="substr" select="string($node)"/>
+ <xsl:variable name="substr">
+ <xsl:choose>
+ <xsl:when test="node()[1]/self::text()">
+ <xsl:choose>
+ <!-- CR LF -->
+ <xsl:when test="starts-with(string($node), '&#x000D;&#x000A;')">
+ <xsl:value-of select="substring-after(string($node), '&#x000D;&#x000A;')"/>
+ </xsl:when>
+ <!-- CR -->
+ <xsl:when test="starts-with(string($node), '&#x000D;')">
+ <xsl:value-of select="substring-after(string($node), '&#x000D;')"/>
+ </xsl:when>
+ <!-- LF -->
+ <xsl:when test="starts-with(string($node), '&#x000A;')">
+ <xsl:value-of select="substring-after(string($node), '&#x000A;')"/>
+ </xsl:when>
+ <!-- NEL -->
+ <xsl:when test="starts-with(string($node), '&#x0085;')">
+ <xsl:value-of select="substring-after(string($node), '&#x0085;')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string($node)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string($node)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<xsl:call-template name="db.linenumbering.substr">
<xsl:with-param name="substr" select="$substr"/>
<xsl:with-param name="number" select="$number"/>