<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4"
            targetNamespace="http://www.timelog.com/XML/Schema/tlp/v4_4"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified">
  <xsd:element name="WorkUnits">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="WorkUnit" type="tlp:WorkUnitRaw_Type" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
    </xsd:complexType>
    <xsd:key name="WorkUnit_Key">
      <xsd:selector xpath=".//tlp:WorkUnit" />
      <xsd:field xpath="@ID" />
    </xsd:key>
  </xsd:element>

  <xsd:complexType name="WorkUnitRaw_Type">
    <xsd:sequence>
      <xsd:element name="EmployeeID" type="xsd:positiveInteger" />
      <xsd:element name="EmployeeInitials" type="xsd:string" />
      <xsd:element name="EmployeeFirstName" type="xsd:string" />
      <xsd:element name="EmployeeLastName" type="xsd:string" />
      <xsd:element name="AllocationID" type="xsd:positiveInteger" />
      <xsd:element name="TaskID" type="xsd:positiveInteger" />
      <xsd:element name="ProjectID" type="xsd:positiveInteger" />
      <xsd:element name="Date" type="xsd:dateTime" />
      <xsd:element name="Note" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="RegHours" type="xsd:decimal" />
      <xsd:element name="InvHours" type="xsd:decimal" />
      <xsd:element name="CostAmount" type="xsd:decimal" />
      <xsd:element name="RegAmount" type="xsd:decimal" />      
      <xsd:element name="InvAmount" type="xsd:decimal" />      
    </xsd:sequence>
    <xsd:attribute name="ID" type="xsd:positiveInteger" use="required" />
  </xsd:complexType>
  
</xsd:schema>