Multiple choice technology programming languages

What is the correct syntax of For Loop in XSLT?

  1. <for-each> code... </for-each>

  2. <xsl:for>code...</xsl:for>

  3. <xsl:for-each>code...</xsl:for-each>

  4. <xsl:foreach>code...</xsl:foreach>

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

XSLT uses to iterate over node sets in an XML document. The syntax requires the xsl namespace prefix. Option A lacks the namespace prefix, while options B and D use incorrect element names (xsl:for and xsl:foreach are not valid XSLT elements).