File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 212
212
<xsl : with-param name =" dot" select =" true()" />
213
213
</xsl : call-template >
214
214
</xsl : if >
215
- <xsl : value-of select =" count($div/preceding-sibling::tei:div[not(following::tei:divGen)][tei:head][ancestor-or-self::tei:div/@xml:lang=$lang]) + 1 +$offset" />
215
+ <xsl : variable name =" preceding-divs" as =" node()*" >
216
+ <!-- when xml:lang information is present only the respective divs need to be taken into account -->
217
+ <xsl : choose >
218
+ <xsl : when test =" $div/ancestor-or-self::tei:div/@xml:lang" >
219
+ <xsl : sequence select =" $div/preceding-sibling::tei:div[not(following::tei:divGen)][tei:head][ancestor-or-self::tei:div/@xml:lang=$lang]" />
220
+ </xsl : when >
221
+ <xsl : otherwise >
222
+ <xsl : sequence select =" $div/preceding-sibling::tei:div[not(following::tei:divGen)][tei:head]" />
223
+ </xsl : otherwise >
224
+ </xsl : choose >
225
+ </xsl : variable >
226
+ <xsl : value-of select =" count($preceding-divs) + 1 +$offset" />
216
227
<xsl : if test =" $dot" >
217
228
<xsl : text >.  </xsl : text >
218
229
</xsl : if >
You can’t perform that action at this time.
0 commit comments