Identify the statement that is NOT true about XSLT (Extensible Stylesheet Language Transformations).
-
AXSLT is a declarative transformation language.
-
BXSLT uses a set of rules that govern how a document is to be materialized is created.
-
CXSLT uses a set of procedures that specify how a document is to be programmed.
-
DXSLT is used to transform the input document into another document.
Answer
Correct Answer: XSLT uses a set of procedures that specify how a document is to be programmed.
Explanation
Introduction / Context:XSLT transforms XML (or XML-like trees) into other formats such as HTML, plain text, or different XML vocabularies. Its programming model is distinct from imperative languages because it is template- and rule-driven.
Given Data / Assumptions:
- XSLT operates declaratively with pattern matching.
- It applies templates to nodes, guided by XPath expressions.
- We must spot the statement that mischaracterizes XSLT as procedural.
Concept / Approach:In XSLT, developers declare templates that match parts of the source tree. The processor decides order of application based on patterns and priorities. There is no explicit step-by-step “procedure” that mutates state in the classic imperative sense, although XSLT 2.0/3.0 add functions and stronger typing.
Step-by-Step Solution:
Evaluate each statement against the declarative nature of XSLT.A (declarative) → true; D (transformation) → true.C claims “procedures … programmed” → not true of XSLT’s model.Verification / Alternative check:Review XSLT specs: templates, pattern matching, and result trees are central; no required imperative control flow.
Why Other Options Are Wrong (as choices for “not true”):They correctly describe XSLT’s rule-based, transformation-oriented nature (even if option B’s wording is awkward).
Common Pitfalls:Trying to write XSLT like a procedural script rather than leveraging template matching and XPath selection.
Final Answer:XSLT uses a set of procedures that specify how a document is to be programmed.