複数のベース期間を扱うのはむしろ簡単だと思います。単純なアプローチは、個々のベース期間でそれらを区別するためにsubper_expand
DIVコンテナ(およびそのアンカー)のための第2の識別子を追加することである、すなわち:
subper_expand{base period position}_{periond position}
BasePeriod:
<xsl:apply-templates select="Period">
<xsl:with-param name="bpPos" select="position()"/>
</xsl:apply-templates>
期間:
<xsl:param name="bpPos"/>
<xsl:variable name="subper">
<xsl:value-of select="concat('subper_expand', $bpPos, '_', position())"/>
</xsl:variable>
<xsl:variable name="subperiod">
<xsl:value-of select="concat('subperiod_expand', $bpPos, '_', position())"/>
</xsl:variable>
...
<a href="javascript:expandIt({$subper}, {$subperiod})"
name="{$subperiod}" class="expandit">Sub Periods</a>
<div id="{$subper}" style="display:none;">
あなたはそれがXSLの変数を使用して読みやすくなります見ての通り。
ありがとうございます。 paramとしての位置を使用すると、問題は解決されました。 – Manu