<?xml version="1.0" encoding="iso-8859-1"?>
<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:simpleType name="characterType">
  <xs:restriction base="xs:string">
    <xs:length value="1" />
  </xs:restriction>
</xs:simpleType>

<xs:simpleType name="uuidType">
  <xs:restriction base="xs:hexBinary">
    <xs:length value="16" fixed="true"/>
  </xs:restriction>
</xs:simpleType>

<xs:simpleType name="stringType">
  <xs:restriction base="xs:string">
    <xs:whiteSpace value="preserve" />
  </xs:restriction>
</xs:simpleType>

<xs:complexType name="datetimestampType">
  <xs:sequence>
    <xs:element name="date" type="xs:date" />
    <xs:element name="time" type="xs:time" />
  </xs:sequence>
</xs:complexType>

  <xs:element name="passwordsafe">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="entry">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="group" type="stringType" minOccurs="0" maxOccurs="1" />
              <xs:element name="title" type="stringType" />
              <xs:element name="username" type="stringType" minOccurs="0" maxOccurs="1" />
              <xs:element name="password" type="stringType" />
              <xs:element name="url" type="stringType" minOccurs="0" maxOccurs="1" />
              <xs:element name="autotype" type="stringType" minOccurs="0" maxOccurs="1" />
              <xs:element name="notes" type="stringType" minOccurs="0" maxOccurs="1" />
              <xs:element name="uuid" type="uuidType" minOccurs="0" maxOccurs="1" />
              <xs:element name="ctime" type="datetimestampType" minOccurs="0" maxOccurs="1" />
              <xs:element name="atime" type="datetimestampType" minOccurs="0" maxOccurs="1" />
              <xs:element name="ltime" type="datetimestampType" minOccurs="0" maxOccurs="1" />
              <xs:element name="pmtime" type="datetimestampType" minOccurs="0" maxOccurs="1" />
              <xs:element name="rmtime" type="datetimestampType" minOccurs="0" maxOccurs="1" />
              <xs:element name="pwhistory" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="status" type="xs:integer" minOccurs="1" maxOccurs="1" />
                    <xs:element name="max" type="xs:integer" minOccurs="1" maxOccurs="1" />
                    <xs:element name="num" type="xs:integer" minOccurs="1" maxOccurs="1" />
                    <xs:element name="history_entries" minOccurs="0" maxOccurs="1">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="history_entry" minOccurs="0" maxOccurs="25">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="changed" type="datetimestampType" minOccurs="1" maxOccurs="1" />
                                <xs:element name="oldpassword" type="stringType" minOccurs="1" maxOccurs="1" />
                              </xs:sequence>
                              <xs:attribute name="num" type="xs:integer" use="optional" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="id" type="xs:integer" use="optional" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="delimiter" type="characterType" use="required" />
      <xs:attribute name="Database" type="stringType" use="optional" />
      <xs:attribute name="ExportTimeStamp" type="xs:dateTime" use="optional" />
      <xs:attribute name="FromDatabaseFormat" type="stringType" use="optional" />
      <xs:attribute name="WhatSaved" type="stringType" use="optional" />
      <xs:attribute name="WhoSaved" type="stringType" use="optional" />
    </xs:complexType>
  </xs:element>
</xs:schema>