我想你应该把变量改成
<xsl:variable name="footnote-sources" select="$fn-markers-added//tei:date[@type='deposition_date'] |
$fn-markers-added//tei:note[@type='public'] | $fn-markers-added//tei:fn-marker"/>
因为你不再想给
seg
fn-marker
在中间步骤中,它们被转化为。
然后您还需要调整模板以
<!-- outputs each item to a <p> in footnote <div> -->
<xsl:template match="*[. intersect $footnote-sources]" mode="build_footnotes">
<xsl:choose>
<xsl:when test="self::tei:date[@type='deposition_date']">
<xsl:element name="p">
<sup>
<xsl:number count="*[. intersect $footnote-sources]" format="1" level="any"/>
</sup> this is the foo /date (that should be footnote #1)
</xsl:element>
</xsl:when>
<xsl:when test="self::tei:fn-marker">
<xsl:element name="p">
<sup>
<xsl:number count="*[. intersect $footnote-sources]" format="1" level="any"/>
</sup> this is the foo seg/@corresp (that should be footnote #3)
</xsl:element>
</xsl:when>
<xsl:when test="self::tei:note[@type='public']">
<xsl:element name="p">
<sup>
<xsl:number count="*[. intersect $footnote-sources]" format="1" level="any"/>
</sup> this is the foo /note (that should be number footnote #2)
</xsl:element>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:template>
https://xsltfiddle.liberty-development.net/jyH9rNj/1
显示
1 this is the foo /date (that should be footnote #1)
2 this is the foo /note (that should be number footnote #2)
3 this is the foo seg/@corresp (that should be footnote #3)
很明显“这是福”的解释
seg/@corresp
现在是有点误导,因为这是一个真正的
fn标记