<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <xsd:complexType name = "dataPoint">
        <xsd:sequence>
            <xsd:element name = "damage" type = "xsd:integer" />
            <xsd:element name = "numvehicles" type = "xsd:integer" />
            <xsd:element name = "numcivilians" type = "xsd:integer" />
        </xsd:sequence>
	<xsd:attribute name = "time" type = "xsd:integer" />
    </xsd:complexType>
     
    <xsd:element name = "database">
    <xsd:complexType>
        <xsd:sequence>    
	    <xsd:element name = "data" type = "dataPoint"  maxOccurs = "unbounded" />
        </xsd:sequence>
    </xsd:complexType>
        <xsd:key name = "timePoint">
            <xsd:selector xpath =  ".//database/data" />
            <xsd:field xpath =  "@time" />
        </xsd:key>
    </xsd:element>
</xsd:schema>
