1
<?xml version='1.0' encoding='utf-8'?><!-- -*- indent-tabs-mode: nil -*- -->
1
<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
3
This program is free software; you can redistribute it and/or modify it under
4
the terms of the GNU Lesser General Public License as published by the Free
5
Software Foundation; either version 2 of the License, or (at your option) any
8
This program is distributed in the hope that it will be useful, but WITHOUT
9
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13
You should have received a copy of the GNU Lesser General Public License
14
along with this program; see the file COPYING.LGPL. If not, write to the
15
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3
19
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
20
xmlns:doc="http://www.gnome.org/~shaunm/xsldoc"
71
87
<xsl:template name="db.linenumbering">
72
88
<xsl:param name="node" select="."/>
73
89
<xsl:param name="number" select="1"/>
74
<xsl:variable name="substr" select="string($node)"/>
75
<xsl:number value="$number"/>
90
<xsl:variable name="substr">
92
<xsl:when test="node()[1]/self::text()">
95
<xsl:when test="starts-with(string($node), '
')">
96
<xsl:value-of select="substring-after(string($node), '
')"/>
99
<xsl:when test="starts-with(string($node), '
')">
100
<xsl:value-of select="substring-after(string($node), '
')"/>
103
<xsl:when test="starts-with(string($node), '
')">
104
<xsl:value-of select="substring-after(string($node), '
')"/>
107
<xsl:when test="starts-with(string($node), '…')">
108
<xsl:value-of select="substring-after(string($node), '…')"/>
111
<xsl:value-of select="string($node)"/>
116
<xsl:value-of select="string($node)"/>
76
120
<xsl:call-template name="db.linenumbering.substr">
77
121
<xsl:with-param name="substr" select="$substr"/>
78
<xsl:with-param name="number" select="$number + 1"/>
122
<xsl:with-param name="number" select="$number"/>
79
123
</xsl:call-template>
82
126
<xsl:template name="db.linenumbering.substr" doc:private="true">
83
127
<xsl:param name="substr"/>
84
128
<xsl:param name="number"/>
85
<xsl:if test="contains($substr, '
')">
86
<xsl:text>
</xsl:text>
87
<xsl:number value="$number"/>
88
<xsl:call-template name="db.linenumbering.substr">
89
<xsl:with-param name="substr"
90
select="substring-after($substr, '
')"/>
91
<xsl:with-param name="number" select="$number + 1"/>
130
<xsl:when test="contains($substr, '
')">
131
<xsl:number value="$number"/>
132
<xsl:text>
</xsl:text>
133
<xsl:call-template name="db.linenumbering.substr">
134
<xsl:with-param name="substr"
135
select="substring-after($substr, '
')"/>
136
<xsl:with-param name="number" select="$number + 1"/>
139
<xsl:when test="string-length($substr) != 0">
140
<xsl:number value="$number"/>
141
<xsl:text>
</xsl:text>
96
146
<!-- == db.personname ====================================================== -->