joe
joe

Reputation: 17488

Difference between <xsl:apply-templates select="./*"/> and <xsl:apply-templates />

When using XSL what is the difference between

<xsl:apply-templates select="./*"/>

and

<xsl:apply-templates />

The former does not appear to bring in any text after a child element.

Upvotes: 7

Views: 1151

Answers (1)

Michael Kay
Michael Kay

Reputation: 163595

Correct. "*" or "./*" selects the child elements of the context node. But "node()" or "./node()" selects all the children including elements, text nodes, comments, and processing instructions. The default for xsl:apply-templates is select="node()".

Upvotes: 13

Related Questions