1
<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が定義されているか、そしてテストが何をしているのかを説明できますか?の子孫であるノードの属性' Parent'および' 'を探していますか?NameParentCheck

また、どういう<xsl:when test="not(descendant::*[SomeAttribute])"> 意味ですか?そうではない他の子要素を参照していSomeAttributeますか?

4

1 に答える 1

3

descendant:*[Parent][Name]「子の「親」要素と「名前」要素を持つ子孫を意味します。

i.e. <SomeElement>
         <Parent/>
         <Name/>
     <SomeElement>

descendant::ParentCheck「ParentCheckという名前の子孫」を意味します

i.e. <ParentCheck />
于 2012-09-06T16:09:56.187 に答える