次のコードには、「this-article」という名前の変数があります。
通常、このように「xsl:apply-templates」を使用します
<xsl:apply-templates select="somenode"/>
「somenode」は子ノードを意味します。
しかし、この変数では、apply-template はこのように記述されています。変です。
<xsl:apply-templates select="." mode="id"/>
意味を教えていただけると助かります。
<!-- ============================================================= -->
<!-- "make-article" for the document architecture -->
<!-- ============================================================= -->
<xsl:template name="make-article">
<!-- Generates a series of (flattened) divs for contents of any
article, sub-article or response -->
<!-- variable to be used in div id's to keep them unique -->
<xsl:variable name="this-article">
<xsl:apply-templates select="." mode="id"/>
</xsl:variable>
<div id="{$this-article}-front" class="front">
<xsl:apply-templates select="front | front-stub"/>
</div>
<!-- body -->
<xsl:for-each select="body">
<div id="{$this-article}-body" class="body">
<xsl:apply-templates/>
</div>
</xsl:for-each>
<xsl:if test="back | $loose-footnotes">
<!-- $loose-footnotes is defined below as any footnotes outside
front matter or fn-group -->
<div id="{$this-article}-back" class="back">
<xsl:call-template name="make-back"/>
</div>
</xsl:if>
<xsl:for-each select="floats-group">
<div id="{$this-article}-floats" class="back">
<xsl:call-template name="main-title">
<xsl:with-param name="contents">
<span class="generated">Floating objects</span>
</xsl:with-param>
</xsl:call-template>
<xsl:apply-templates/>
</div>
</xsl:for-each>
<!-- more metadata goes in the footer -->
<div id="{$this-article}-footer" class="footer">
<xsl:call-template name="footer-metadata"/>
<xsl:call-template name="footer-branding"/>
</div>
<!-- sub-article or response (recursively calls
this template) -->
<xsl:apply-templates select="sub-article | response"/>
</xsl:template>