diff options
author | Brent Smith <bmsmith@src.gnome.org> | 2005-10-12 21:31:30 +0000 |
---|---|---|
committer | Brent Smith <bmsmith@src.gnome.org> | 2005-10-12 21:31:30 +0000 |
commit | 7f9cae8885e6f770009a9b19d79ea6ac894d59ff (patch) | |
tree | 2e94b18dfe4a3329c6c6b7e6b47f5fdfe61475f9 | |
parent | 74319f332bd5ca5d7432e9f5de072a07e17119ac (diff) | |
download | gnome-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-- | ChangeLog | 5 | ||||
-rw-r--r-- | xslt/docbook/common/db-common.xsl | 31 |
2 files changed, 35 insertions, 1 deletions
@@ -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), '
')"> + <xsl:value-of select="substring-after(string($node), '
')"/> + </xsl:when> + <!-- CR --> + <xsl:when test="starts-with(string($node), '
')"> + <xsl:value-of select="substring-after(string($node), '
')"/> + </xsl:when> + <!-- LF --> + <xsl:when test="starts-with(string($node), '
')"> + <xsl:value-of select="substring-after(string($node), '
')"/> + </xsl:when> + <!-- NEL --> + <xsl:when test="starts-with(string($node), '…')"> + <xsl:value-of select="substring-after(string($node), '…')"/> + </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"/> |