Multiple choice technology web technology

Considering the following XML and XSLT documents, what is the output? XML: <?xml version="1.0"?> <staff> <employee id="45"> <name>John</name> <salary>$100,000</salary> </employee> </staff> XSLT: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:if test="employee/name = 'John'"> true </xsl:if> </xsl:template> </xsl:stylesheet>

  1. a. The transformation will not output anything

  2. b. The transformation will throw an error

  3. c. The output will be true

  4. d. None

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

The XSLT transformation will not output anything because the test condition 'employee/name = 'John'' is evaluated in the wrong context. The template match is on '/' (root), so the test looks for employee/name as direct children of root, but the actual path is staff/employee/name. To fix it, the test should be 'staff/employee/name = 'John''. Since the condition fails, the xsl:if block doesn't execute and produces no output.