<?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="5.1">
  <xsd:annotation>
    <xsd:documentation>
      @(#)jonas-web-app_5_1.xsd  21/11/08
    </xsd:documentation>
  </xsd:annotation>
  <xsd:annotation>
    <xsd:documentation>
      <![CDATA[
      JOnAS: Java(TM) Open Application Server
      Copyright (C) 2009 Bull S.A.S.
      Contact: jonas-team@ow2.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 : Philippe Coq
      ]]>
   </xsd:documentation>
  </xsd:annotation>

  <xsd:annotation>
    <xsd:documentation>
    <![CDATA[

    This is XML Schema for jonas deployment webapp deployment descriptor information.
    The deployment descriptor must be named "META-INF/jonas-web.xml" in
    the WAR file
    All JOnAS webapp deployment descriptors must indicate
    the jonas-web-app 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-web-app 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://jonas.ow2.org/ns/jonas-web-app_5_1.xsd">
    ...
    </jonas-web-app>

    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://jonas.ow2.org/ns//jonas-web-app_5_1.xsd

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

  <xsd:include schemaLocation="jonas_j2ee_4_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-web-app" type="jonas:jonas-web-appType">
    <xsd:annotation>
      <xsd:documentation>
  This is the root element of the JOnAS specific WEB deployment descriptor.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:element>

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

  <xsd:complexType name="jonas-web-appType">
    <xsd:annotation>
      <xsd:documentation>
 The jonas-web-appType  defines the root element of the JOnAS specific
 WEB deployment descriptor.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice maxOccurs="unbounded">
      <xsd:group ref="jonas:referenceGroup" />
      <xsd:element name="jonas-message-destination"
                   minOccurs="0"
                   maxOccurs="unbounded"
                   type="jonas:jonas-message-destinationType" />

      <xsd:element name="host" minOccurs="0" type="j2ee:string" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>
         The host element specifies the name of host
         used for deploy the web application
     </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="context-root" minOccurs="0" type="j2ee:string" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>
         The context-root element specifies the context root
         for the web application.
     </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="port" minOccurs="0" type="j2ee:string" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>
          The port element specifies the port number used
          to access the web application.
          Only used for Web Services !
     </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="java2-delegation-model"
                   minOccurs="0"
                   maxOccurs="1"
                   type="j2ee:true-falseType">
        <xsd:annotation>
          <xsd:documentation>
          The java2-delegation-model element specifies :
          if true  : the context uses a classloader using
             the Java 2 delegation model (default value).
          if false : the class loader looks inside the web application first,
             before asking parent class loaders.
     </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="on-demand"
                   minOccurs="0"
                   maxOccurs="1"
                   type="j2ee:true-falseType">
        <xsd:annotation>
          <xsd:documentation>
          The on-deman element specifies :
          if true  : the web application will be loaded when the URL of this context will be reached.
                     It will work only if the on-demand feature is also enabled on the 'web' service.
          if false : the web application is loaded directly, not when the URL is reached.
     </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="servlet"
                   minOccurs="0"
                   maxOccurs="unbounded"
                   type="jonas:servlet-Type">
        <xsd:annotation>
          <xsd:documentation>
          The servlet element specifies a servlet name and a principal name.
          Only used during security identity propagation.
     </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:choice>
    <xsd:attribute name="id" type="xsd:ID" />
  </xsd:complexType>
  
  <!-- **************************************************** --> 
  <xsd:complexType name="servlet-Type">
    <xsd:annotation>
      <xsd:documentation>
        The servlet-Type defines the JOnAS specific information for a servlet.
        It contains:
          - the name of the servlet destination specified in the standard WEB deployment
          - the principal name associated to the servlet. 
     </xsd:documentation>
    </xsd:annotation>
   <xsd:sequence>
      <xsd:element name="servlet-name"
    type="j2ee:string">
    <xsd:annotation>
      <xsd:documentation>
        The servlet-name element contains the name of a servlet.
        The name must be specified in the standard WEB deployment descriptor.
      </xsd:documentation>
    </xsd:annotation>
      </xsd:element>
     <xsd:element name="principal-name"
    type="j2ee:string">
    <xsd:annotation>
      <xsd:documentation>
        The principal-name element contains the principal name of a servlet.
        This element may be used during security identity propagation.
      </xsd:documentation>
    </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <!-- **************************************************** --> 
</xsd:schema>