<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:element name="SCATALOG">
                <xs:annotation>
                        <xs:documentation>Simple Catalog Interface describing connection </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="SITE" minOccurs="0" maxOccurs="unbounded">
                                        <xs:annotation>
                                                <xs:documentation>Site declaration. Each added site should be decribed by at least its name. It has been made optional however to supporte early schema missing this element.</xs:documentation>
                                        </xs:annotation>
                                        <xs:complexType>
                                                <xs:sequence>
                                                        <xs:element ref="SERVER" maxOccurs="unbounded"/>
                                                        <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
                                                </xs:sequence>
                                                <xs:attribute name="name" use="required">
                                                        <xs:simpleType>
                                                                <xs:restriction base="xs:NMTOKEN">
                                                                        <xs:enumeration value="BNL"/>
                                                                        <xs:enumeration value="LBL"/>
                                                                </xs:restriction>
                                                        </xs:simpleType>
                                                </xs:attribute>
                                                <xs:attribute name="description" type="xs:string" use="optional"/>
                                                <xs:attribute name="URI" type="xs:anyURI" use="optional"/>
                                                <xs:anyAttribute namespace="##any"/>
                                        </xs:complexType>
                                </xs:element>
                                <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
                        </xs:sequence>
                        <xs:attribute name="VERSION" type="xs:string" use="required"/>
                        <xs:anyAttribute namespace="##any"/>
                </xs:complexType>
        </xs:element>
        <xs:element name="SERVER" type="SERVERType">
                <xs:annotation>
                        <xs:documentation>Called SERVER but should be thought of as 'service'. Our Catalog has the notion of a connection intent and this entry makes the branching between the access intent.</xs:documentation>
                        <xs:documentation>Called SERVER but should be thought of as 'service'. Our Catalog has the notion of a connection intent and this entry makes the branching between the access intent.</xs:documentation>
                </xs:annotation>
        </xs:element>
        <xs:element name="HOST">
                <xs:annotation>
                        <xs:documentation>Db Host. There may be more than one host granting access to the Catalog.</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                        <xs:sequence>
                                <xs:element ref="ACCESS" maxOccurs="unbounded"/>
                                <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
                        </xs:sequence>
                        <xs:attribute name="NAME" type="xs:string" use="required"/>
                        <xs:attribute name="DBTYPE" type="xs:string" use="optional"/>
                        <xs:attribute name="DBNAME" type="xs:string" use="required"/>
                        <xs:attribute name="PORT" type="xs:string" use="optional"/>
                        <xs:anyAttribute namespace="##any"/>
                </xs:complexType>
        </xs:element>
        <xs:element name="ACCESS">
                <xs:annotation>
                        <xs:documentation>Authentication information. One may connect to the Catalog with many Authentication ...</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                        <xs:attribute name="USER" type="xs:string" use="optional"/>
                        <xs:attribute name="PASS" type="xs:string" use="optional"/>
                        <xs:anyAttribute namespace="##any"/>
                </xs:complexType>
        </xs:element>
        <xs:complexType name="SERVERType">
                <xs:sequence>
                        <xs:element ref="HOST" maxOccurs="unbounded"/>
                        <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
                <xs:attribute name="SCOPE" use="required">
                        <xs:simpleType>
                                <xs:restriction base="xs:NMTOKEN">
                                        <xs:enumeration value="Master"/>
                                        <xs:enumeration value="Admin"/>
                                        <xs:enumeration value="User"/>
                                </xs:restriction>
                        </xs:simpleType>
                </xs:attribute>
                <xs:anyAttribute namespace="##any"/>
        </xs:complexType>
</xs:schema>