XSLT について質問があります。基本的には、何らかの変換を行う必要がありますが、最後に、行ったすべての変換を 1 つの xslt:variable 内で行いたいと考えています。
基本的に私が意味するのは、このようなものです。もちろん、xslt はより複雑になりますが、私が何を意味するかを説明するために、次のようにします。
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema">
<xsl:output method="html" indent="no"/>
<xsl:decimal-format NaN=""/>
<xsl:template match="/">
<xsl:call-template name="base_template"/>
</xsl:template>
<xsl:template name="base_template">
<!-- This is what i mean -->
<xsl:variable name="general_variale">
<xsl:call-template name="template_three" />
<br />
<xsl:call-template name="template_two" />
<br />
<xsl:call-template name="template_one" />
</xsl:variable>
</xsl:template>
<xsl:template name="template_three">
<xsl:for-each select="$Rows">
<xsl:variable name="id" select="@ID" />
<xsl:for-each select="$filteredRows_Releases">
<process name="$id">
....
</process>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<xsl:template name="template_two">
<xsl:for-each select="$Rows">
<xsl:variable name="id" select="@ID" />
<xsl:for-each select="$filteredRows_Releases">
<task name="$id">
....
</task>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
この xslt を使用して、general_variable を次のように考えたいと思います。
<process name="somename">
</process>
...
<task name="somename">
</task>
...
これは機能しますか、それとも不可能ですか?