You can test XML well-formedness, compare HTML and XHTML syntax, explain WML/XHTML mobile profiles historically, transform XML with XSLT, and select nodes with XPath/XQuery. Readiness: identify start tags, end tags, attributes, and nesting in HTML.
A department must exchange course data between different systems. A structured format needs explicit nesting and machine-checkable syntax. XML supplies a syntax for documents; a schema can add vocabulary rules; transformations and queries operate on the resulting tree.
<?xml version="1.0" encoding="UTF-8"?>
<course code="DI-322">
<title>Web Technologies</title>
<credits>3</credits>
</course>
XML is case-sensitive, requires one document element, quoted attribute values, and properly nested/closed elements. Well-formed means the XML syntax rules are satisfied; valid means it also conforms to a chosen DTD or schema. XHTML applies XML syntax to an HTML vocabulary. The source spelling XHTM MP is preserved in the ledger; this lesson provisionally interprets it as XHTML Mobile Profile, a historical mobile-web profile. WML is likewise historical and targeted early constrained wireless devices. Modern responsive HTML/CSS is the practical default, but the historical topics remain required.
For the document above, XPath /course/title/text() selects Web Technologies; /course/@code selects DI-322. XSLT can match course and emit HTML. XPath selects; XSLT transforms; XQuery can construct and query across XML collections.
Repair <Course code=DI-322><title>Web</Course>.
<course code="DI-322"><title>Web</title></course>..xml extension does not prove well-formedness or validity./ for paths; it is not a SQL table query.Create courses.xml with three courses. Write XPath expressions for all titles, the course with code DI-322, and courses with credits greater than 2. Then draft an XSLT template that outputs a list. Record whether your tool executed XPath/XSLT or whether the result is a reasoned trace.
Q1: Well-formed versus valid? Answer: syntax only versus syntax plus schema/DTD conformance.Q2: Why close <br /> in XHTML? Answer: XML syntax requires an empty element to be explicitly closed.Q3: XHTM MP handling? Answer: preserve source wording; likely XHTML Mobile Profile, marked provisional.Q4: WML status in this course? Answer: required historical topic, not the modern default.Q5: XSLT’s job? Answer: transform XML trees into another result.Q6: XPath /course/@code selects what? Answer: the code attribute of the root course.Design XML for a course, two lessons, and outcomes; include one namespace. Supply three XPath queries and a short XSLT output sketch. Rubric: well-formed XML 3, model 2, namespace 1, queries 2, transformation reasoning 2.
XML syntax -> optional validation -> query/transform. Historical mobile profiles solved constraints that responsive standards now address differently.