したがって、XSLT のアイデンティティ デザイン パターンを使用しています。
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()[not(@visible='false')]"/>
</xsl:copy>
</xsl:template>
そして、さまざまなノードに一致する多くのテンプレートがあります。今私がやりたいことは、1 つの xsl:template 内にいくつかのコードを生成し、別の xsl:template を新たに生成されたコードと一致させることです。これを行う方法を知っている人はいますか?
私がやりたいことの例:
<xsl:template match="button">
<a href="@url" class="button"> <xsl:value-of select="@name" /> </a>
</xsl:template>
<xsl:template match="stuff">
<!-- do some stuff -->
<!-- get this following line parsed by the template over! -->
<button url="something" name="a button" />
</xsl:template>