有什么区别-6ren"> 有什么区别- 之间有什么区别?和 .我认为 select="."没有必要,但根据我使用的不同,我得到了不同的结果。 抱歉,如果这是重复的。我曾尝试搜索此问题,但找不到任何内容。 最佳答案 What is the-6ren">
gpt4 book ai didi

xml - and 有什么区别

转载 作者:数据小太阳 更新时间:2023-10-29 01:44:00 24 4
gpt4 key购买 nike

<xsl:apply-templates /> 之间有什么区别?和 <xsl:apply-templates select="." /> .我认为 select="."没有必要,但根据我使用的不同,我得到了不同的结果。

抱歉,如果这是重复的。我曾尝试搜索此问题,但找不到任何内容。

最佳答案

What is the difference between <xsl:apply-templates /> and <xsl:apply-templates select="." />

第一条指令:

<xsl:apply-templates />

的简写:

<xsl:apply-templates select="child::node()" />

第二条指令:

<xsl:apply-templates select="." />

是以下内容的简写:

<xsl:apply-templates select="self::node()" />

我们看到,不仅这两个指令不同(前者对所有子节点应用模板,后者对当前节点应用模板),但后者是危险的 并且经常会导致死循环!

关于xml - <xsl :apply-templates/> and <xsl:apply-templates select ="."/> 有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3963605/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com