xpath advanced syntax confusion

hamzan95

New Member
\[code\]<xsl:template name="makeDiv"> <xsl:when test="descendant::*[Parent][Name]"> </xsl:when> </xsl:template>\[/code\]somewhere down the line...\[code\]<xsl:if test="descendant::ParentCheck"> <xsl:call-template name="makeDiv"/></xsl:if>\[/code\]can some one explain to me what template-name=makeDiv is defined and what the test is doing? Is it looking for attributes '\[code\]Parent\[/code\]' and '\[code\]Name\[/code\]' of any nodes that is a descendant of \[code\]ParentCheck\[/code\]?Also, what does \[code\]<xsl:when test="not(descendant::*[SomeAttribute])">\[/code\] mean? Is it referring to other child elements that is NOT \[code\]SomeAttribute\[/code\] ?
 
Back
Top