<a href="{concat('#anchor-', generate-id(.))}" class="annotation">[<xsl:number value="count(preceding::*[self::pa or self::pe or self::pr or self::pt]) + 1" />]</a>
<xsl:choose>
<xsl:when test="count(akap|akap_cd|strofa) = 0">
<a href="{concat('#anchor-', generate-id(.))}" class="annotation">[<xsl:number value="count(preceding::*[self::pa or self::pe or self::pr or self::pt]) + 1" />]</a>
<xsl:choose>
<xsl:when test="count(akap|akap_cd|strofa) = 0">