differences between for-each and templates in xsl?

前端 未结 7 689
你的背包
你的背包 2020-12-03 10:48

Both xsl:for-each and xsl:template are used to retrieve nodes from xml in an xsl stylesheet. But what is the fundamental difference between them? P

7条回答
  •  悲哀的现实
    2020-12-03 11:32

    for-each can only be used inside one place in your template. Templates can be re-used with different apply-templates calls. I mostly use templates instead of for-each because of the added flexibility.

提交回复
热议问题