1. majas-user.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:ns="http://www.w3.org/1999/xhtml" 
    xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" 
    targetNamespace="http://www.majas.org/schema/2006/configuration/" 
    xmlns:mc="http://www.majas.org/schema/2006/configuration/">

    <xsd:annotation>
        <xsd:documentation xml:lang="en">Configuration Copyright 2006 DFC NV,
        K.U.Leuven. All rights reserved.</xsd:documentation>
    </xsd:annotation>



    <!-- ================ USER ================ -->

    <xsd:element name="user">

        <xsd:complexType>

            <xsd:sequence>
                <xsd:element name="id" type="xsd:integer" maxOccurs="1" minOccurs="1" />

                <xsd:element maxOccurs="unbounded" name="application" 
                    type="mc:applicationType" />

            </xsd:sequence>

        </xsd:complexType>

    </xsd:element>




    <!-- ================ APPLICATION ================ -->
    
    <xsd:complexType name="applicationType">
        <xsd:sequence>

            <xsd:element name="layerFilters" type="mc:layerFiltersType" />

            <xsd:element name="initialMapExtent" type="mc:mapExtentType">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Determines the view this user has when he enters 
                        the application.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="maxMapExtent" type="mc:mapExtentType">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Determines the maximum view this user can have in 
                        this application. He is not allowed outside these
                        boundaries.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="bookmarks" type="mc:bookmarksType" />

        </xsd:sequence>
        
        <xsd:attribute name="ref" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation xml:lang="en">
                    Determines the name of the application this is a config 
                    for. What we need here, is not the param you enter in 
                    the url, but the name of the application.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        
        
        <xsd:attribute name="label" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation xml:lang="en">
                    Determines the label of the application this is a config 
                    for. In case of multiple user configs for the same 
                    application, the user can choose one of them by label.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>

    </xsd:complexType>
    
    
    
    
    <!-- ================ USER FILTERS ================ -->

    <xsd:complexType name="layerFiltersType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                List of user specific filter for an application. For each 
                layer in the application, we can define a filter here. Both
                regular and geometrical filters are allowed here.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" 
                name="layerFilter" type="mc:layerFilterType" />
        </xsd:sequence>
    </xsd:complexType>


    <xsd:complexType name="layerFilterType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                Determines a filter on a specific layer for this user. 
                The layer is referred to by the 'layer' attribute, and 
                the filter itself is determined by the 'filter' attribute.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:attribute name="layer" type="xsd:positiveInteger" use="required"/>
        <xsd:attribute name="filter" type="xsd:string" use="required"/>
    </xsd:complexType>




    <!-- ================ MAPEXTENTS ================ -->

    <xsd:complexType name="mapExtentType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                Defines an axis-aligned bounding box.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:attribute name="minX" type="xsd:integer" use="required"/>
        <xsd:attribute name="maxX" type="xsd:integer" use="required"/>
        <xsd:attribute name="minY" type="xsd:integer" use="required"/>
        <xsd:attribute name="maxY" type="xsd:integer" use="required"/>
    </xsd:complexType>




    <!-- ================ BOOKMARKS ================ -->

    <xsd:complexType name="bookmarksType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                A list of bookmarks that this user has defined for this 
                application.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" 
                name="bookmark" type="mc:bookmarkType" />
        </xsd:sequence>
    </xsd:complexType>


    <xsd:complexType name="bookmarkType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                Defines a bookmark. It simply is a mapExtent with a name 
                tagged to it.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="mc:mapExtentType">
                <xsd:attribute name="name" type="xsd:string" use="required"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

</xsd:schema>