Matrjóška

  • globální je jen jeden element

  • špatné možnosti znovupoužití

  • schéma je krátké a kompaktní

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  
  <xs:element name="zamestnanec">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="jmeno" type="xs:string"/>
        <xs:element name="prijmeni" type="xs:string"/>
        <xs:element name="adresa">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ulice" type="xs:string"/>
              <xs:element name="město" type="xs:string"/>
              <xs:element name="psč" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="plat" type="xs:decimal"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  
</xs:schema>