Model structured documents with elements, attributes, namespaces, schemas, parsing, and transformations.
Lessons
Define elements that contain child elements and attributes.
XSD Complex Types 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 XSD Complex Types example in a small scratch file, then explain what changed and why.