【发布时间】:2012-09-06 16:00:22
【问题描述】:
<xsl:template name="makeDiv">
<xsl:when test="descendant::*[Parent][Name]">
</xsl:when>
</xsl:template>
某处...
<xsl:if test="descendant::ParentCheck">
<xsl:call-template name="makeDiv"/>
</xsl:if>
有人可以向我解释一下 template-name=makeDiv 的定义以及测试在做什么吗?它是否正在寻找属于ParentCheck 后代的任何节点的属性“Parent”和“Name”?
另外,<xsl:when test="not(descendant::*[SomeAttribute])"> 是什么意思?它是指不是SomeAttribute 的其他子元素吗?
【问题讨论】: