Difficulty: Easy
Correct Answer: Incorrect: XML carries content and structure, not presentation
Explanation:
Introduction / Context:XML was designed to separate content/structure from presentation. While XML documents express data and hierarchy via elements and attributes, visual formatting is typically handled externally (e.g., CSS, XSLT, XSL-FO). This question probes that separation-of-concerns principle.
Given Data / Assumptions:
Concept / Approach:By default, an XML document stores structured data (elements/attributes) and content (text nodes). It does not prescribe how that data should look when rendered. Presentation requires separate technologies: CSS can style XML in some user agents; XSLT maps XML to presentational HTML; XSL-FO defines layout for paginated output (e.g., PDF). Therefore, the statement that XML bundles structure, content, and format “within one document” is inaccurate as a general rule.
Step-by-Step Solution:
Identify what XML provides: tags convey semantics and hierarchy.Identify what presentation requires: stylesheets or transformations.Conclude that XML alone does not define presentation/format.Verification / Alternative check:Open an XML document in a browser without stylesheets: it shows a generic tree view or plain text; presentation depends on added CSS or transformed HTML, not the XML itself.
Why Other Options Are Wrong:
Common Pitfalls:Embedding presentational hints in element names (e.g.,
Final Answer:Incorrect: XML carries content and structure, not presentation
Discussion & Comments