Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
XSLT is a declarative language for transforming XML trees into other trees—commonly HTML, XHTML, plain text, or different XML vocabularies. The “stylesheet” is the executable transformation script. This question checks recognition of the stylesheet’s purpose.
Given Data / Assumptions:
Concept / Approach:
An XSLT stylesheet declares template rules that match source XML nodes and produce result nodes. It controls mapping, reordering, filtering, and formatting of the source content. XPath provides selection and testing of nodes; XSLT constructs the new tree. Stylesheets therefore “indicate how to transform” source elements into target structures or formats.
Step-by-Step Solution:
Verification / Alternative check:
Run the stylesheet with any XSLT 1.0/2.0/3.0 processor (Saxon, Xalan, libxslt, browser engines) and observe that the specified rules dictate the resulting output structure and content.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing CSS (presentation styling) with XSLT (structural transformation). CSS alters presentation of existing markup; XSLT builds new markup trees.
Final Answer:
Correct
Discussion & Comments