내부에서 발생 :호출 XSLT 템플릿은 그래서 XSLT에 대한 신원 디자인 패턴을 사용하고있어 XSLT
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()[not(@visible='false')]"/>
</xsl:copy>
</xsl:template>
그리고 서로 다른 노드와 일치하는 많은 템플릿을해야합니까. 이제 내가 원하는 것은 하나의 xsl : 템플릿 안에 코드를 생성하고 또 다른 xsl : 템플릿이 새로 생성 된 코드와 일치하도록하는 것입니다. 이 작업을 수행하는 방법을 알고있는 사람은 누구입니까? 내가하고 싶은 것에
예 :
<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>
버튼을 추가하고 싶지만 스크립트의 일부분을 생성하는 버튼이 실제 버튼 마크 업을 생성하게하기 때문에. – Knarf