86
XSLT <xsl:for-each> Element
The XSLT <xsl:for-each> element is used to apply a template repeatedly for each node.
Parameter explanation
Select: XPath Expression to be evaluated in current context to determine the set of nodes to be iterated.
XSLT Element Example
Let’s take an example to creates a table of <employee> element with its attribute “id” and its child <firstname>,<lastname><nickname> and <salary> by iterating over each employee.
Employee.xml
Employee.xsl
Output:
Next TopicXSLT <sort>