Reputation: 29
What does this do?
Am I correct to think that this XSLT code doesn't do anything?
....
<xsl:template match="/*[1]">
<xsl:apply-templates />
</xsl:template>
....
Upvotes: 0
Views: 43
Reputation: 167401
It is a template matching the root element of any name and then applying templates to all child nodes of the root element. I wouldn't call that "doesn't do anything", although the built-in templates would suffice to do the same for the root element and other things so the ...
are crucial to tell whether the template is needed.
Upvotes: 1