<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.objectweb.org/jonas/ns"
            xmlns="http://www.w3.org/2001/XMLSchema"
            xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:jonas="http://www.objectweb.org/jonas/ns"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified"
            version="4.1.4">
  <xsd:annotation>
    <xsd:documentation>
      @(#)jonas-application_4_1_4.xsd  07/12/04
    </xsd:documentation>
  </xsd:annotation>
  <xsd:annotation>
    <xsd:documentation>
      <![CDATA[
      JOnAS: Java(TM) Open Application Server
      Copyright (C) 2004-2005 Bull S.A.
      Contact: jonas-team@objectweb.org

      This library is free software; you can redistribute it and/or
      modify it under the terms of the GNU Lesser General Public
      License as published by the Free Software Foundation; either
      version 2.1 of the License, or any later version.

      This library is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Lesser General Public License for more details.

      You should have received a copy of the GNU Lesser General Public
      License along with this library; if not, write to the Free Software
      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
      USA

      Initial Author : Florent Benoit
      ]]>
   </xsd:documentation>
  </xsd:annotation>

  <xsd:annotation>
    <xsd:documentation>
      <![CDATA[
    This is XML Schema for jonas specific Ear J2EE 1.4 deployment descriptor information.
    The deployment descriptor must be named "META-INF/jonas-application.xml" in
    the Ear file
    All JOnAS Application deployment descriptors must indicate
    the jonas-application schema by using the Jonas namespace:

    http://www.objectweb.org/jonas/ns

    and by indicating the version of the schema by
    using the version element as shown below:

    <jonas-application xmlns="http://www.objectweb.org/jonas/ns"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xsi:schemaLocation="http://www.objectweb.org/jonas/ns
          http://www.objectweb.org/jonas/ns/jonas-application_4_1_4.xsd">
    ...
    </jonas-application>

    The instance documents may indicate the published version of
    the schema using the xsi:schemaLocation attribute for the
    Jonas namespace with the following location:

    http://www.objectweb.org/jonas/ns/jonas-application_4_1_4.xsd

      ]]>
    </xsd:documentation>
  </xsd:annotation>

  <xsd:include schemaLocation="jonas_j2ee_4_1_2.xsd" />

  <import namespace="http://java.sun.com/xml/ns/j2ee"
          schemaLocation="http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd" />

  <!-- **************************************************** -->

  <xsd:element name="jonas-application" type="jonas:jonas-applicationType">
    <xsd:annotation>
      <xsd:documentation>
        This is the root element of the JOnAS specific Ear deployment descriptor.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:element>

 <!-- **************************************************** -->

  <xsd:complexType name="jonas-applicationType">
    <xsd:annotation>
      <xsd:documentation>
        The jonas-application element is the root element of a JOnAS Ear
        specific deployment descriptor.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="jonas-security"
                   type="jonas:jonas-securityType"
                   minOccurs="0" />
    </xsd:sequence>
  </xsd:complexType>


  <!-- **************************************************** -->

  <xsd:complexType name="jonas-securityType">
    <xsd:annotation>
      <xsd:documentation>
        This element defines all security at EAR level of specific DD
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice maxOccurs="unbounded">
      <xsd:element name="security-role-mapping"
                   type="jonas:jonas-securityRoleMappingType"
                   minOccurs="0" />
    </xsd:choice>
  </xsd:complexType>

  <!-- **************************************************** -->

  <xsd:complexType name="jonas-securityRoleMappingType">
    <xsd:annotation>
      <xsd:documentation>
        This element is used for the user-to-role mapping which override
		mapping of jonas-realm.xml file.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="role-name"
                   type="j2ee:string"
                   minOccurs="1" />
      <xsd:element name="principal-name"
                   type="j2ee:string"
                   minOccurs="1"
				   maxOccurs="unbounded" />
    </xsd:sequence>
  </xsd:complexType>

</xsd:schema>
