Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
A Document Type Definition (DTD) is one of the original schema languages for XML (inherited conceptually from SGML). It specifies the legal building blocks of an XML document—what elements and attributes may appear, in what order, and how many times. This question verifies understanding of the DTD’s role.
Given Data / Assumptions:
Concept / Approach:
DTDs define structure and permissible attributes but lack strong typing (e.g., cannot easily constrain numeric ranges). Even so, they do define the structure of XML documents. Therefore, the statement is correct, though modern systems often prefer XSD/RELAX NG for richer typing.
Step-by-Step Solution:
Verification / Alternative check:
Validate an XML instance against a DTD with a validating parser; invalid structures are rejected, confirming the DTD’s structural role.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing well-formedness (XML syntax) with validity (conforming to a DTD or schema); assuming DTDs are obsolete and therefore “incorrect.”
Final Answer:
Correct
Discussion & Comments