user2568737
user2568737

Reputation: 29

What does this XSLT code do?

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

Answers (1)

Martin Honnen
Martin Honnen

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

Related Questions