Take the 2-minute tour ×

When using XSL what is the difference between



<xsl:apply-templates />

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

share|improve this question

1 Answer 1

up vote 12 down vote accepted

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()".

share|improve this answer
Wondering about this myself. +1 –  FailedDev Oct 7 '11 at 22:29
I am learning xpath and getting stuck in some small points. Now I can put those in SO as a question. But I think those are not welcome in SO. So may I get a kind of personal help from you for the same ? –  Arup Rakshit Jul 6 '13 at 16:58
No. Use the process. Ask a question on SO like everyone else. Just because someone gives time to answer questions here doesn't mean they're prepared to answer direct questions from strangers. You forget that when we answer here, we have selected the questions which (a) we find interesting, (b) we know how to answer, and (c) arrive at a moment that happens to be convenient. –  Michael Kay Jul 6 '13 at 21:47

Your Answer


