📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    Which of the following language defines the structure,

    the legal elements and the attributes of an XML document?
    A XSL Correct Answer Incorrect Answer
    B DTD Correct Answer Incorrect Answer
    C CSS Correct Answer Incorrect Answer
    D XSLT Correct Answer Incorrect Answer

    Solution

    Why this is correct:
    A DTD defines the permitted structure of an XML document (what elements are allowed, their nesting, and attributes). It’s one formal mechanism to define the grammar of an XML document. Why the others are wrong:

    • 1 (XSL): Extensible Stylesheet Language, used for styling/transformation, not for defining XML grammar.
    • 3 (CSS): Cascading Style Sheets — used for styling HTML/XML, not for structure/grammar.
    • 4 (XSLT): XSL Transformations — used to transform XML documents (e.g., into HTML), not to declare XML structure.

    Practice Next

    Relevant for Exams:

    ask-question