mirror of
https://github.com/moparisthebest/xeps
synced 2025-01-30 23:10:10 -05:00
Fix note numbering for nested notes in XHTML XSL
This commit is contained in:
parent
cbd6ca999b
commit
62083cddeb
4
xep.xsl
4
xep.xsl
@ -401,7 +401,7 @@ OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
<xsl:variable name='me' select='.' />
|
<xsl:variable name='me' select='.' />
|
||||||
<xsl:variable name='firstOccurrence' select='(//note[. = $me])[1]' />
|
<xsl:variable name='firstOccurrence' select='(//note[. = $me])[1]' />
|
||||||
<xsl:variable name='oid' select='generate-id($firstOccurrence)' />
|
<xsl:variable name='oid' select='generate-id($firstOccurrence)' />
|
||||||
<xsl:variable name='notenum' select='count($firstOccurrence/preceding::note[not(.=preceding::note)])+1' />
|
<xsl:variable name='notenum' select='count($firstOccurrence/preceding::note[not(.=preceding::note)]) + count($me/ancestor::note) + 1' />
|
||||||
<xsl:if test='generate-id($me) = generate-id($firstOccurrence)'>
|
<xsl:if test='generate-id($me) = generate-id($firstOccurrence)'>
|
||||||
<p>
|
<p>
|
||||||
<a name='nt-{$oid}'><xsl:value-of select='$notenum'/></a>
|
<a name='nt-{$oid}'><xsl:value-of select='$notenum'/></a>
|
||||||
@ -994,7 +994,7 @@ OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
<xsl:variable name='me' select='.' />
|
<xsl:variable name='me' select='.' />
|
||||||
<xsl:variable name='firstOccurrence' select='(//note[. = $me])[1]' />
|
<xsl:variable name='firstOccurrence' select='(//note[. = $me])[1]' />
|
||||||
<xsl:variable name='oid' select='generate-id($firstOccurrence)' />
|
<xsl:variable name='oid' select='generate-id($firstOccurrence)' />
|
||||||
<xsl:variable name='notenum' select='count($firstOccurrence/preceding::note[not(.=preceding::note)])+1' />
|
<xsl:variable name='notenum' select='count($firstOccurrence/preceding::note[not(.=preceding::note)]) + count($me/ancestor::note) + 1' />
|
||||||
<xsl:text> [</xsl:text><a href='#nt-{$oid}'>
|
<xsl:text> [</xsl:text><a href='#nt-{$oid}'>
|
||||||
<xsl:value-of select='$notenum'/></a>
|
<xsl:value-of select='$notenum'/></a>
|
||||||
<xsl:text>]</xsl:text>
|
<xsl:text>]</xsl:text>
|
||||||
|
Loading…
Reference in New Issue
Block a user