<?xml version="1.0" encoding="UTF-8"?>
<!-- coding: utf-8

    schéma du webservice opendata "Recueil des Actes Administratifs
    de Besançon et du Grand Besançon".
    
    voir :
    datasets.grandbesancon.fr/besanconfr.php?method=getRaaVille&output=xml
    datasets.grandbesancon.fr/besanconfr.php?method=getCagb&output=xml

-->
<xs:schema attributeFormDefault="unqualified"
    elementFormDefault="qualified" version="1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="liste" type="listeType" />

    <xs:complexType name="listeType">
      <xs:sequence>
            <xs:element name="description" minOccurs="1" maxOccurs="1" type="xs:string" />
            <xs:element name="collectivite" minOccurs="1" maxOccurs="1" type="collectiviteType" />
            <xs:element name="raa" minOccurs="0" maxOccurs="unbounded" type="raaType" />
      </xs:sequence>
    </xs:complexType>

    <xs:complexType name="collectiviteType">
        <xs:attribute name="siret" type="xs:string"></xs:attribute>
        <xs:attribute name="siren" type="xs:string"></xs:attribute>
        <xs:attribute name="nom" type="xs:string"></xs:attribute>
    </xs:complexType>

    <xs:complexType name="raaType">
      <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="annee" type="xs:int"/>
                <xs:attribute name="mois" type="xs:int"/>
                <xs:attribute name="poids" type="xs:string"/>
            </xs:extension>
        </xs:simpleContent>
        
    </xs:complexType>
    
</xs:schema>