<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema version="2.20.260.0" xml:lang="en" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:annotation>
        <xsd:documentation xml:lang="en">
            Common schema type definitions for DriveWindow 2.20.
        </xsd:documentation>
    </xsd:annotation>

    <xsd:complexType name="desktopPreferencesType">
        <xsd:sequence>
            <xsd:element name="statusrefresh">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="all" />
                        <xsd:enumeration value="selected" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
            <xsd:element name="itemnames">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="fixed" />
                        <xsd:enumeration value="fetch" />
                        <!-- xsd:enumeration value="default" / -->
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
            <xsd:element name="na-items">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="hide" />
                        <xsd:enumeration value="show" />
                        <xsd:enumeration value="template" />
                        <!-- xsd:enumeration value="default" / -->
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
            <xsd:element name="use-panel-format" type="xsd:token" fixed="" minOccurs="0" />
            <xsd:element name="desktoprefresh">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="cache" />
                        <xsd:enumeration value="device" />
                        <xsd:enumeration value="on-line" />
                        <!-- xsd:enumeration value="default" / -->
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
            <xsd:element name="sourcedrive" type="desktopSourceInfoType" />
        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="itemnamesType">
        <xsd:restriction base="xsd:token">
            <xsd:enumeration value="fixed" />
            <xsd:enumeration value="fetch" />
            <xsd:enumeration value="default" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="na-itemsType">
        <xsd:restriction base="xsd:token">
            <xsd:enumeration value="hide" />
            <xsd:enumeration value="show" />
            <xsd:enumeration value="template" />
            <xsd:enumeration value="default" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="desktoprefreshType">
        <xsd:restriction base="xsd:token">
            <xsd:enumeration value="cache" />
            <xsd:enumeration value="device" />
            <xsd:enumeration value="on-line" />
            <xsd:enumeration value="default" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="opc-settingsType">
        <xsd:sequence minOccurs="0">
            <xsd:element name="name" type="xsd:token" />
            <xsd:element name="updaterate">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:integer">
                        <xsd:minInclusive value="1" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
            <xsd:element name="deadband">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:float">
                        <xsd:minInclusive value="0.0" />
                        <xsd:maxInclusive value="100.0" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
            <xsd:element name="timebias" type="xsd:integer" />
            <xsd:element name="lcid">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:integer">
                        <xsd:minInclusive value="0" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="active" use="optional" type="xsd:token" fixed="no" />
        <xsd:attribute name="valid" use="optional" type="xsd:token" fixed="no" />
    </xsd:complexType>

    <xsd:complexType name="includeType">
        <xsd:sequence>
            <xsd:element name="status">
                <xsd:complexType>
                    <xsd:attribute name="acknowledged" use="optional" type="xsd:token" fixed="yes" />
                    <xsd:attribute name="not-acknowledged" use="optional" type="xsd:token" fixed="yes" />
                    <xsd:attribute name="active" use="optional" type="xsd:token" fixed="yes" />
                    <xsd:attribute name="reset" use="optional" type="xsd:token" fixed="yes" />
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="type">
                <xsd:complexType>
                    <xsd:attribute name="events" use="optional" type="xsd:token" fixed="yes" />
                    <xsd:attribute name="faults" use="optional" type="xsd:token" fixed="yes" />
                    <xsd:attribute name="warnings" use="optional" type="xsd:token" fixed="yes" />
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="maximum">
                <xsd:complexType>
                    <xsd:attribute name="drives" use="required">
                        <xsd:simpleType>
                            <xsd:restriction base="xsd:integer">
                                <xsd:minInclusive value="0" />
                            </xsd:restriction>
                        </xsd:simpleType>
                    </xsd:attribute>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="eventsType">
        <xsd:sequence>
            <xsd:element name="event" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="description" type="xsd:string" />
                        <xsd:element name="status" type="xsd:token" />
                        <xsd:element name="type" type="xsd:token" />
                        <xsd:element name="drivetime" type="xsd:token" />
                        <xsd:element name="pc-time" type="xsd:token" />
                        <xsd:element name="drive" type="xsd:string" />
                    </xsd:sequence>
                    <xsd:attribute name="selected" use="optional" type="xsd:token" fixed="yes" />
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="on-line" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:token">
                    <xsd:enumeration value="yes" /> 
                    <xsd:enumeration value="no" /> 
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
    </xsd:complexType>

    <xsd:complexType name="sourceInfoType">
        <xsd:sequence>
            <xsd:element name="channel" minOccurs="0">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:integer">
                        <xsd:minInclusive value="0" />
                        <xsd:maxInclusive value="9" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
            <xsd:element name="node" minOccurs="0">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:integer">
                        <xsd:minInclusive value="1" />
                        <xsd:maxInclusive value="254" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="type" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:token">
                    <xsd:enumeration value="fixed" />
                    <xsd:enumeration value="selected" />
                    <xsd:enumeration value="controlled" />
                    <xsd:enumeration value="default" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="relativeoffset" use="optional">
            <xsd:simpleType>
                <xsd:restriction base="xsd:integer">
                    <xsd:minInclusive value="-2039" />
                    <xsd:maxInclusive value="2039" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
    </xsd:complexType>

    <xsd:complexType name="desktopSourceInfoType">
        <xsd:sequence>
            <xsd:element name="channel" minOccurs="0">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:integer">
                        <xsd:minInclusive value="0" />
                        <xsd:maxInclusive value="9" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
            <xsd:element name="node" minOccurs="0">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:integer">
                        <xsd:minInclusive value="1" />
                        <xsd:maxInclusive value="254" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="type" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:token">
                    <xsd:enumeration value="fixed" />
                    <xsd:enumeration value="selected" />
                    <xsd:enumeration value="controlled" />
                    <!-- xsd:enumeration value="default" / -->
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="relativeoffset" use="optional">
            <xsd:simpleType>
                <xsd:restriction base="xsd:integer">
                    <xsd:minInclusive value="-2039" />
                    <xsd:maxInclusive value="2039" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
    </xsd:complexType>

    <xsd:simpleType name="decimalsType">
        <xsd:restriction base="xsd:integer">
            <xsd:minInclusive value="0" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="itemformatType">
        <xsd:restriction base="xsd:token">
            <xsd:pattern value="FLT[0-3]?" />
            <xsd:pattern value="INT(16|24)?" />
            <xsd:pattern value="HEX(24)?" />
            <xsd:pattern value="PP" />
            <xsd:pattern value="PANEL" />
            <xsd:pattern value="NORMAL" />
            <xsd:pattern value="EXP" />
            <xsd:pattern value="BIN" />
            <xsd:pattern value="UNDEFINED" />
            <xsd:pattern value="default" />
            <xsd:pattern value="unknown \(\-?\d+\)" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="userformatType">
        <xsd:simpleContent>
            <xsd:extension base="itemformatType">
                <xsd:attribute name="decimals" use="optional" type="decimalsType" />
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>

    <xsd:simpleType name="canonical-datatypeType">
        <xsd:restriction base="xsd:token">
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_EMPTY" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_NULL" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_I2" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_I4" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_R4" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_R8" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_CY" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_DATE" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_BSTR" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_DISPATCH" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_ERROR" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_BOOL" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_VARIANT" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_UNKNOWN" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_DECIMAL" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_I1" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_UI1" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_UI2" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_UI4" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_I8" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_UI8" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_INT" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_UINT" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_VOID" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_HRESULT" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_PTR" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_SAFEARRAY" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_CARRAY" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_USERDEFINED" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_LPSTR" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_LPWSTR" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_FILETIME" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_BLOB" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_STREAM" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_STORAGE" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_STREAMED_OBJECT" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_STORED_OBJECT" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_BLOB_OBJECT" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_CF" />
            <xsd:pattern value="(VT_BYREF \| )?(VT_ARRAY \| )?(VT_VECTOR \| )?VT_CLSID" />
            <xsd:pattern value="0x(\d|[A-F]){4}" />
        </xsd:restriction>
    </xsd:simpleType>

     <xsd:simpleType name="qualityType">
        <xsd:restriction base="xsd:token">
            <xsd:pattern value="good" />
            <xsd:pattern value="bad" />
            <xsd:pattern value="uncertain" />
            <xsd:pattern value="0x(\d|[A-F]){2}" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="valueType">
        <xsd:simpleContent>
            <xsd:extension base="xsd:string">
                <xsd:attribute name="quality" use="required" type="qualityType" />
                <xsd:attribute name="timestamp" use="required" type="xsd:token" />
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>

    <xsd:complexType name="enumerationsType">
        <xsd:sequence>
            <xsd:element name="enumeration" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                    <xsd:simpleContent>
                        <xsd:extension base="xsd:string">
                            <xsd:attribute name="index" use="required" type="xsd:integer" />
                        </xsd:extension>
                    </xsd:simpleContent>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="itemInItemListType">
        <xsd:complexContent>
            <xsd:extension base="itemInParametersType" >
                <xsd:attribute name="selected" use="optional" type="xsd:token" fixed="yes" />
                <xsd:attribute name="item-type" use="optional">
                    <xsd:simpleType>
                        <xsd:restriction base="xsd:token">
                            <xsd:enumeration value="template" />
                            <xsd:enumeration value="file" />
                        </xsd:restriction>
                    </xsd:simpleType>
                </xsd:attribute> 
                <xsd:attribute name="on-line" use="optional" type="xsd:token" fixed="yes" />
                <xsd:attribute name="locked" use="optional" type="xsd:token" fixed="yes" />
                <xsd:attribute name="monitor-channel" use="optional">
                    <xsd:simpleType>
                        <xsd:restriction base="xsd:integer">
                            <xsd:minInclusive value="1" />
                            <xsd:maxInclusive value="6" />
                        </xsd:restriction>
                    </xsd:simpleType>
                </xsd:attribute>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="itemInParametersType">
        <xsd:sequence>
            <xsd:element name="name" type="xsd:string" />
            <xsd:element name="display-value" type="xsd:string" />
            <xsd:element name="opc-address" type="xsd:token" />
            <xsd:element name="description" type="xsd:string" minOccurs="0" />
            <xsd:element name="group-description" type="xsd:string" minOccurs="0" />
            <xsd:element name="canonical-datatype" type="canonical-datatypeType" minOccurs="0" />
            <xsd:element name="desktoprefresh" type="desktoprefreshType" minOccurs="0" />
            <xsd:sequence minOccurs="0">
                <xsd:element name="itemformat" type="itemformatType" />
                <xsd:element name="userformat" type="userformatType" minOccurs="0" />
            </xsd:sequence>
            <xsd:element name="value" type="valueType" />
            <xsd:element name="enumerations" type="enumerationsType" minOccurs="0" />
        </xsd:sequence>
        <xsd:attribute name="readable" use="optional">
            <xsd:simpleType>
                <xsd:restriction base="xsd:token">
                    <xsd:enumeration value="yes" />
                    <xsd:enumeration value="no" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="writeable" use="optional">
            <xsd:simpleType>
                <xsd:restriction base="xsd:token">
                    <xsd:enumeration value="yes" />
                    <xsd:enumeration value="no" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="EUType" use="optional">
            <xsd:simpleType>
                <xsd:restriction base="xsd:token">
                    <xsd:enumeration value="enumerated" />
                    <xsd:enumeration value="analog" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute> 
        <xsd:attribute name="min" use="optional" type="xsd:double" />
        <xsd:attribute name="max" use="optional" type="xsd:double" />
    </xsd:complexType>

    <xsd:simpleType name="drivesSelectionType">
        <xsd:restriction base="xsd:token">
            <xsd:enumeration value="selected" />
            <xsd:enumeration value="all" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="driveType">
        <xsd:sequence>
            <xsd:element name="name" type="xsd:string" />
            <xsd:element name="branch" type="branchType" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
        <xsd:attribute name="type" use="optional" type="xsd:token" fixed="file" />
    </xsd:complexType>

    <xsd:complexType name="branchType">
        <xsd:sequence>
            <xsd:element name="name" type="xsd:string" />
            <xsd:element name="branch" type="branchType" minOccurs="0" maxOccurs="unbounded" />
            <xsd:element name="items" type="itemsType" minOccurs="0" />
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="itemsType">
        <xsd:sequence>
            <xsd:element name="item" type="itemInParametersType" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
    </xsd:complexType>

   <xsd:attributeGroup name="printingInfoAttributes">
        <xsd:attribute name="count" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:integer">
                    <xsd:minInclusive value="0" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="selected" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:integer">
                    <xsd:minInclusive value="0" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="printrange" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:token">
                    <xsd:enumeration value="selected" />
                    <xsd:enumeration value="all" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
    </xsd:attributeGroup>

    <xsd:attributeGroup name="xmlAttributes">
        <xsd:attribute name="css" use="optional" type="xsd:anyURI" />
        <xsd:attribute name="install-path" use="required" type="xsd:anyURI" />
        <xsd:attribute name="style-path" use="optional" type="xsd:anyURI" />
        <xsd:attribute name="version" use="optional" type="xsd:token" />
    </xsd:attributeGroup>

</xsd:schema>
