In the preceding section, I used the expression "PLANET/ NAME " to match all <NAME> elements that are direct children of <PLANET> elements, and the expression "PLANET/*/NAME" to match all <NAME> elements that are grandchildren of <PLANET> elements. However, theres an easier way to perform both matches: just use the expression "PLANET//NAME" , which matches all <NAME> elements that are inside <PLANET> elements, no matter how many levels deep (the matched elements are called descendants of the <PLANET> element). In other words, "PLANET//NAME" matches "PLANET/NAME" , "PLANET/*/NAME" , "PLANET/*/*/NAME" , and so on:
<xsl:template match="PLANETS//NAME"> <H3> <xsl:value-of select="."/> </H3> </xsl:template>