<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2004-2005 The Apache Software Foundation

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<xs:schema
    xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
    targetNamespace="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
    xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
    xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="1.0">

    <xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.0" schemaLocation="geronimo-naming-1.0.xsd"/>
    <xs:import namespace="http://geronimo.apache.org/xml/ns/security-1.1" schemaLocation="geronimo-security-1.1.xsd"/>
    <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment-1.0" schemaLocation="geronimo-config-1.0.xsd"/>

    <xs:element name="web-app" type="web:web-appType"/>


    <xs:complexType name="web-appType">
        <xs:sequence>
<!--            <xs:element ref="sys:parent" minOccurs="0" maxOccurs="unbounded"/>-->
<!--            <xs:element ref="sys:dependency" minOccurs="0" maxOccurs="unbounded"/>-->
<!--            <xs:element ref="sys:hidden-classes" minOccurs="0" maxOccurs="unbounded"/>-->
<!--            <xs:element ref="sys:non-overridable-classes" minOccurs="0" maxOccurs="unbounded"/>-->
            <xs:group ref="sys:classloader-infoGroup"/>

            <xs:element name="context-root" type="xs:string" minOccurs="0"/>
            <xs:element name="context-priority-classloader" type="xs:boolean" minOccurs="0"/>
            <xs:element name="container-config" type="web:container-configType" minOccurs="0"/>

            <xs:group ref="naming:jndiEnvironmentRefsGroup"/>
            <xs:element ref="naming:message-destination" minOccurs="0" maxOccurs="unbounded"/>

            <xs:sequence minOccurs="0">
                <xs:element name="security-realm-name" type="xs:string"/>
                <xs:element ref="security:security" minOccurs="0"/>
            </xs:sequence>

            <xs:element ref="sys:gbean" minOccurs="0" maxOccurs="unbounded"/>

        </xs:sequence>
        <xs:attribute name="configId" type="xs:string" use="required"/>
        <xs:attribute name="parentId" type="xs:string" use="optional"/>
    </xs:complexType>

    <xs:complexType name="container-configType">
        <xs:sequence>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

</xs:schema>
