<a name="{concat('footnote-', generate-id(.))}" />
<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>
<a name="{concat('footnote-', generate-id(.))}" />
<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>