Model structured documents with elements, attributes, namespaces, schemas, parsing, and transformations.
Lessons
Describe and validate allowed XML document structure.
DTD, XSD & Validation is easiest to learn by reading the example, changing it, and observing the result.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="lesson">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element name="minutes" type="xs:positiveInteger"/>
</xs:sequence>
<xs:attribute name="level">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="beginner"/>
<xs:enumeration value="advanced"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>Practice the DTD, XSD & Validation example in a small scratch file, then explain what changed and why.