﻿<?xml version="1.0" encoding="UTF-8" ?>
<!--<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:adlib="http://www.adlibsoft.com/2002/adlibXML" xmlns:NameSpace1="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.adlibsoft.com/2002/adlibXML" version="1.0">-->
<!--<xs:schema id="adlibXML" targetNamespace="http://tempuri.org/adlibXML.xsd" xmlns:mstns="http://tempuri.org/adlibXML.xsd" xmlns="http://tempuri.org/adlibXML.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified"> KB: replaced this line -->
<xs:schema id="adlibXML" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified">
    <xs:annotation>
        <xs:documentation xml:lang="en">
            adlibXML schema for validating data in adlibXML format.
            Copyright 2001-2002 ADLIB Information Systems. All rights reserved.
        </xs:documentation>
    </xs:annotation>
    <xs:element name="adlibXML" msdata:IsDataSet="true" msdata:EnforceConstraints="False">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="recordList" minOccurs="0" maxOccurs="1">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="record" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded" /> <!-- KB: added two attributes -->
                                        <!--<xs:element name="priref" type="xs:positiveInteger" minOccurs="0" msdata:Ordinal="0" />-->
                                    </xs:sequence>
                                    <xs:attribute name="creation" form="unqualified" type="xs:positiveInteger" />
                                    <xs:attribute name="modification" form="unqualified" type="xs:positiveInteger" />
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="diagnostic">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:annotation>
                                <xs:documentation xml:lang="en">
                                    The hits tag represents the number of hits in the result of the query.
                                    The first_item equals the startfrom in the searchstring.
                                    The hits_on_display equals the limit in the searchstring, or the number of hits, whichever is smaller,
                                    and also is the number of record elements in the recordList.
                                    The limit element is the limit in the searchstring.
                                    The search element is the search query.
                                    The sort element is the sorting argument.
                                    The error element is an error message (if an error has occurred).
                                    The language element indicates the language that was requested.
                                    The backwards and forward tags indicate whether a SCAN can go forwards and/or backwards or not.
                                    The dbname and dsname tags indicate the database and dataset that was searched in.
                                </xs:documentation>
                            </xs:annotation>
                            <xs:element name="xmltype" type="xs:string" />
                            <xs:element name="hits" type="xs:unsignedInt" />
                            <xs:element name="search" type="xs:string" />
                            <xs:element name="sort" type="xs:string" />
                            <xs:element name="limit" type="xs:unsignedInt" />
                            <xs:element name="hits_on_display" type="xs:unsignedInt" />
                            <xs:element name="first_item" type="xs:unsignedInt" />
                            <xs:element name="backward" type="xs:string" />
                            <xs:element name="forward" type="xs:string" />
                            <xs:element name="databasepath" type="xs:string" /> <!-- KB: added this line -->
                            <xs:element name="dbname" type="xs:string" />
                            <xs:element name="dsname" type="xs:string" />
                            <xs:element name="cgistring" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="param" nillable="true" minOccurs="0" maxOccurs="unbounded">
                                            <xs:complexType>
                                                <xs:simpleContent msdata:ColumnName="param_Text" msdata:Ordinal="1">
                                                    <xs:extension base="xs:string">
                                                        <xs:attribute name="name" form="unqualified" type="xs:string" />
                                                    </xs:extension>
                                                </xs:simpleContent>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                    <xs:attribute name="url" form="unqualified" type="xs:string" />
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="language" type="xs:unsignedInt" />
                            <xs:element name="epoch" type="xs:unsignedLong"></xs:element>
                            <xs:element name="error" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="code" type="xs:unsignedInt" minOccurs="0" maxOccurs="1" />
<!--                                        <xs:element name="text" type="xs:unsignedInt" minOccurs="0" maxOccurs="1" /> KB: replaced this line -->
                                        <xs:element name="text" type="xs:string" minOccurs="0" maxOccurs="1" />
                                        <xs:element name="hint" type="xs:unsignedInt" minOccurs="0" maxOccurs="1" />
                                        <xs:element name="info" type="xs:string" minOccurs="0" maxOccurs="1" />
                                        <xs:element name="message" type="xs:string" minOccurs="0" maxOccurs="1" />
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
