<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.sitemaps.org/schemas/sitemap/0.9"
            xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
            elementFormDefault="qualified">

  <xsd:element name="sitemapindex">
    <xsd:annotation>
      <xsd:documentation>
        Container for a set of up to 50,000 sitemap URLs.
        This is the root element of the XML file.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="sitemap" type="tSitemap" maxOccurs="unbounded" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <xsd:complexType name="tSitemap">
    <xsd:annotation>
      <xsd:documentation>
        Container for the data needed to describe a sitemap.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="loc" type="tLocSitemap" />
      <xsd:element name="lastmod" type="tLastmodSitemap" minOccurs="0" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:simpleType name="tLocSitemap">
    <xsd:annotation>
      <xsd:documentation>
        REQUIRED: The location URI of a sitemap.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:anyURI">
      <xsd:minLength value="1" />
      <xsd:maxLength value="2048" />
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="tLastmodSitemap">
    <xsd:annotation>
      <xsd:documentation>
        OPTIONAL: The date the document was last modified.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:union>
      <xsd:simpleType>
        <xsd:restriction base="xsd:date" />
      </xsd:simpleType>
      <xsd:simpleType>
        <xsd:restriction base="xsd:dateTime" />
      </xsd:simpleType>
    </xsd:union>
  </xsd:simpleType>

</xsd:schema>
