mmkd
mmkd

Reputation: 900

What does node()|@* mean XSLT?

I have seen this being used in this contect:

<xsl:template match="node()|@*">
<xsl:copy>
  <xsl:apply-templates select="node()|@*"/>
</xsl:copy>

Can anyone explain that the "node()|@*" means?

Upvotes: 7

Views: 7914

Answers (1)

Daniel Haley
Daniel Haley

Reputation: 52858

This is called the identity transform. The node()|@* is matching all child nodes (node() is all text,element,processing instructions,comments) and attributes (@*) of the current context.

Upvotes: 6

Related Questions