- <div id="footnotes">
- <h3>Przypisy</h3>
- <xsl:for-each select="descendant::*[self::pe or self::pa or self::pr or self::pt][not(parent::extra)]">
- <div>
- <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>
- <xsl:when test="count(akap|akap_cd|strofa) = 0">
- <p><xsl:apply-templates select="text()|*" mode="inline" /></p>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="text()|*" mode="inline" />
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:for-each>
- </div>
+ <xsl:if test="count(descendant::*[self::pe or self::pa or self::pr or self::pt][not(parent::extra)])">
+ <div id="footnotes">
+ <h3>Przypisy</h3>
+ <xsl:for-each select="descendant::*[self::pe or self::pa or self::pr or self::pt][not(parent::extra)]">
+ <div>
+ <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>
+ <xsl:when test="count(akap|akap_cd|strofa) = 0">
+ <p><xsl:apply-templates select="text()|*" mode="inline" /></p>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="text()|*" mode="inline" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </xsl:for-each>
+ </div>
+ </xsl:if>