我被困在試圖在這些限制內工作,我正在使用XSLT 1.0 {under .net}。 我希望能夠做到以下幾點: 我是的xsl:for-each'ing通過一組類型的節點的帶有修改的XSLT副本
<node>
<data> unknown unstructured xml </data>
<owner></owner>
</node>
我想能夠輸出
<node>
<data> unknown unstructured xml </data>
<!--RESULT of calling an XSL template with certain parameters -->
</node>
從我的搜索到目前爲止,我想我可以做這樣的事情在here:
<xsl:copy>
<xsl:apply-template name="findownerdetails">
<xsl:with-param name="data" select="something" />
</xsl:apply-template>
</xsl:copy>
但這顯然是無效的。任何建議如何得到這個工作或實現類似的目標?恐怕我不能直接調用apply-templates作爲我想要的模板,這取決於我爲每個節點元素創建的數據。
任何意見理解
好問題(+1)。請參閱我的答案,以獲得完全符合XSLT精神的最簡單解決方案,利用最基本的XSLT設計模式 - 使用和重寫身份規則。 – 2010-08-08 23:21:48