<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
  targetNamespace="http://www.foo.com" xmlns:ns="http://www.foo.com">

  <xs:element name="personnel">
    <xs:complexType>
      <xs:sequence maxOccurs="unbounded">
        <xs:element name="person" type="ns:Person"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="Person">
    <xs:sequence>
      <xs:element name="name" type="ns:Name"/>
      <xs:element name="email" type="xs:string"/>
      <xs:element name="yearsOfService" type="xs:nonNegativeInteger"/>
      <xs:element name="birthday" type="xs:date"/>
    </xs:sequence>
    <xs:attribute name="id" use="required" type="xs:NCName"/>
  </xs:complexType>

  <xs:complexType name="Name">
    <xs:sequence>
      <xs:element name="family" type="xs:string"/>
      <xs:element name="given" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>

</xs:schema>
