<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 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 targetNamespace="http://java.sun.com/xml/ns/portlet"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:portlet="http://java.sun.com/xml/ns/portlet" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
         attributeFormDefault="unqualified" version="1.0" xml:lang="EN">

<xs:annotation>
  <xs:documentation>
    This is the XML Schema for the Portlet 1.0 deployment descriptor. 
  </xs:documentation>
</xs:annotation>

<xs:annotation>
  <xs:documentation>
    The following conventions apply to all J2EE 
    deployment descriptor elements unless indicated otherwise.
    In elements that specify a pathname to a file within the
    same JAR file, relative filenames (i.e., those not
    starting with "/") are considered relative to the root of
    the JAR file's namespace. Absolute filenames (i.e., those 
    starting with "/") also specify names in the root of the
    JAR file's namespace. In general, relative names are
    preferred. The exception is .war files where absolute
    names are preferred for consistency with the Servlet API.
  </xs:documentation> 
</xs:annotation>

<!-- <include schemaLocation="j2ee_1_4.xsd"/> -->
<!-- *********************************************************** -->

<xs:import namespace="http://www.w3.org/XML/1998/namespace"
           schemaLocation="http://www.w3.org/2001/xml.xsd"/> 

<!-- *********************************************************** -->
<!--   portlet-app                                               -->
<!-- *********************************************************** -->
<xs:element name="portlet-app" type="portlet:portlet-appType">

<xs:annotation>
  <xs:documentation>
    The portlet-app element is the root of the deployment descriptor
    for a portlet application 
  </xs:documentation>
</xs:annotation>
</xs:element>

<xs:complexType name="portlet-appType">
  <xs:sequence> 
    <xs:element name="description" type="portlet:descriptionType" 
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="portlet-app-name" type="portlet:portlet-app-nameType"/>
    <xs:element name="display-name" type="portlet:display-nameType" 
                minOccurs="0" maxOccurs="unbounded"/> 
    <xs:element name="portlet" type="portlet:portletType" maxOccurs="unbounded"/>
    <xs:element name="security-role" type="portlet:security-roleType" 
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="custom-portlet-mode" type="portlet:custom-portlet-modeType" 
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="custom-window-state" type="portlet:custom-window-stateType" 
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="user-attribute" type="portlet:user-attributeType"
                minOccurs="0" maxOccurs="unbounded"/> 
    <xs:element name="deployment-extension" type="portlet:deployment-extensionType"
                minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute name="version" type="string" use="required"/>
</xs:complexType> 

<!-- *********************************************************** -->
<!--   custom-portlet-mode                                       -->
<!-- *********************************************************** -->

<xs:complexType name="custom-portlet-modeType">
  <xs:annotation>
    <xs:documentation>
      A custom portlet mode that one or more portlets in this 
      portlet application supports. 
      Used in: portlet-app
    </xs:documentation>
  </xs:annotation>

  <xs:sequence>
    <xs:element name="description" type="portlet:descriptionType"
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="portlet-mode" type="portlet:portlet-modeType"/>
  </xs:sequence>
</xs:complexType> 


<!-- *********************************************************** -->
<!--   custom-window-state                                       -->
<!-- *********************************************************** -->

<xs:complexType name="custom-window-stateType">
  <xs:annotation>
    <xs:documentation>
      A custom window state that one or more portlets in this
      portlet application supports. 
      Used in: portlet-app
    </xs:documentation>
  </xs:annotation>

  <xs:sequence>
    <xs:element name="description" type="portlet:descriptionType" 
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="window-state" type="portlet:window-stateType"/>
  </xs:sequence>
</xs:complexType>

<!-- *********************************************************** -->
<!--   portlet-info                                              -->
<!-- *********************************************************** -->

<xs:complexType name="default-infoType"> 
  <xs:annotation>
    <xs:documentation>
      The default-info element defines the default language the
      portlet would like to be displayed in.
      Used in: portlet-info 
    </xs:documentation>
  </xs:annotation>
</xs:complexType>

<!-- *********************************************************** -->
<!--   expiration-cache                                          -->
<!-- *********************************************************** -->

<xs:complexType name="expiration-cacheType">
  <xs:annotation> 
    <xs:documentation>
      Expiration-cache defines expiration-based caching for this
      portlet. The parameter indicates
      the time in seconds after which the portlet output expires.
      -1 indicates that the output never expires. 
      Used in: portlet
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent>
    <xs:extension base="xs:string"> 
      <xs:attribute ref="xml:lang"/>
    </xs:extension>
  </xs:simpleContent>

</xs:complexType>

<!-- *********************************************************** -->
<!--   init-param                                                -->
<!-- *********************************************************** -->

<xs:complexType name="init-paramType"> 
  <xs:annotation>
    <xs:documentation>
      The init-param element contains a name/value pair as an
      initialization param of the portlet
      Used in:portlet 
    </xs:documentation>
  </xs:annotation>

  <xs:sequence>
    <xs:element name="description" type="portlet:descriptionType"
                minOccurs="0"/> 
    <xs:element name="name" type="portlet:nameType"/>
    <xs:element name="value" type="portlet:valueType"/>
  </xs:sequence>
</xs:complexType>

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

<xs:complexType name="keywordsType"> 
  <xs:annotation>
    <xs:documentation>
      Locale specific keywords associated with this portlet.
      The kewords are separated by commas.
      Used in: portlet-info 
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute ref="xml:lang"/> 
    </xs:extension>
  </xs:simpleContent>

</xs:complexType>

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

<xs:complexType name="localeType">
  <xs:annotation>
    <xs:documentation>
      The locale element defines the a language the 
      portlet supports in the Java Resource
      Bundles (en, de, ...).
      The first locale in this list is treated as default locale.
      Used in: portlet-info 
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent>
    <xs:extension base="xs:string"/>
  </xs:simpleContent> 
</xs:complexType>

<!-- *********************************************************** -->
<!--   mime-type                                                 -->
<!-- *********************************************************** -->

<xs:complexType name="mime-typeType">
  <xs:annotation>
    <xs:documentation>
      MIME type name, e.g. "text/html". 
      Used in: supports
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent>
    <xs:extension base="xs:string"/> 
  </xs:simpleContent>
</xs:complexType>

<!-- *********************************************************** -->
<!--   multi-value                                               -->
<!-- *********************************************************** -->

<xs:complexType name="multi-valueType"/>
  <xs:annotation>
    <xs:documentation> 
      Multi-value indicates that a the preference is of type array.
      Used in: preferences
    </xs:documentation>
  </xs:annotation> 

<!-- *********************************************************** -->
<!--   non-modifiable                                            -->
<!-- *********************************************************** -->

<xs:complexType name="non-modifiableType"/>
  <xs:annotation>
    <xs:documentation>
      Non-modifiable indicates that a setting can only be changed by
      an administrator. For normal users this value is not modifiable.
      Used in: preferences
    </xs:documentation>
  </xs:annotation>

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

<xs:complexType name="nameType"> 
  <xs:annotation>
    <xs:documentation>
      The name element contains the name of a parameter.
      Used in: init-param, ...
    </xs:documentation> 
  </xs:annotation>

  <xs:simpleContent>
    <xs:extension base="xs:string"/>
  </xs:simpleContent>

</xs:complexType> 

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

<xs:complexType name="portletType">
  <xs:annotation>
    <xs:documentation>
      The portlet element contains the declarative data of a portlet.
      Used in: portlet-app 
    </xs:documentation>
  </xs:annotation>

  <xs:sequence>
    <xs:element name="description" type="portlet:descriptionType"
        minOccurs="0" maxOccurs="unbounded"/> 
    <xs:element name="init-param" type="portlet:init-paramType" 
        minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="portlet-name" type="portlet:portlet-nameType"/>
    <xs:element name="display-name" type="portlet:display-nameType"
        minOccurs="0" maxOccurs="unbounded"/> 
    <xs:element name="portlet-class" type="portlet:portlet-classType"/>
    <xs:element name="expiration-cache" type="portlet:expiration-cacheType"/>
    <xs:element name="supports" type="portlet:supportsType"
                maxOccurs="unbounded"/>
    <xs:element name="portlet-info" type="portlet:portlet-infoType"/>
    <xs:element name="portlet-preferences" type="portlet:portlet-preferencesType"
                minOccurs="0"/> 
    <xs:element name="security-role-ref" type="portlet:security-role-refType"
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="deployment-extension" type="portlet:deployment-extensionType"
                minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence> 
</xs:complexType>

<!-- *********************************************************** -->
<!--   portlet-app-name                                          -->
<!-- *********************************************************** -->

<xs:complexType name="portlet-app-nameType">
  <xs:annotation>
    <xs:documentation>
      The name of this portlet application. 
      This name must be world-wide unique.
      Used in: portlet-app
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent> 
    <xs:extension base="xs:string">
      <xs:attribute ref="xml:lang"/>
    </xs:extension>
  </xs:simpleContent>

</xs:complexType> 

<!-- *********************************************************** -->
<!--   portlet-class                                             -->
<!-- *********************************************************** -->

<xs:complexType name="portlet-classType">
  <xs:simpleContent>
    <xs:extension base="xs:string"/>
  </xs:simpleContent>
</xs:complexType>

<!-- *********************************************************** -->
<!--   portlet-info                                              -->
<!-- *********************************************************** -->

<xs:complexType name="portlet-infoType"> 
  <xs:annotation>
    <xs:documentation>
      With the portlet-info element the portlet can define
      language depended information for one language, 
      instead of putting these information into a
      resource bundle.
      Used in: portlet
    </xs:documentation>
  </xs:annotation> 

  <xs:choice>
    <xs:sequence>
      <xs:element name="description" type="portlet:descriptionType"
                  minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="title" type="portlet:titleType"/> 
      <xs:element name="short-title" type="portlet:short-titleType"
                  minOccurs="0"/>
      <xs:element name="keywords" type="portlet:keywordsType" minOccurs="0"/>
    </xs:sequence>
    <xs:sequence> 
      <xs:element name="resource-bundle" type="portlet:resource-bundleType"/>
      <xs:element name="locale" type="portlet:localeType"
                  maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:choice> 
</xs:complexType>

<!-- *********************************************************** -->
<!--   portlet-mode                                              -->
<!-- *********************************************************** -->

<xs:complexType name="portlet-modeType">
  <xs:annotation>
    <xs:documentation>
      Portlet modes. The specification pre-defines the following values 
      as valid portlet mode constants:
        CONFIG, EDIT, HELP, VIEW.
      Used in: custom-portlet-mode, supports
    </xs:documentation>
  </xs:annotation> 

  <xs:simpleContent>
    <xs:extension base="xs:string"/>
  </xs:simpleContent>
</xs:complexType>

<!-- *********************************************************** -->
<!--   portlet-name                                              -->
<!-- *********************************************************** -->

<xs:complexType name="portlet-nameType"> 
  <xs:annotation>
    <xs:documentation>
      The portlet-name element contains the canonical name of the
      portlet. Each portlet name is unique within the portlet application.
      Used in: portlet, portlet-mapping
    </xs:documentation> 
  </xs:annotation>

  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:attribute ref="xml:lang"/>
    </xs:extension> 
  </xs:simpleContent>
</xs:complexType>

<!-- *********************************************************** -->
<!--   portlet-preferences                                       -->
<!-- *********************************************************** -->

<xs:complexType name="portlet-preferencesType">
  <xs:annotation>
    <xs:documentation> 
      Portlet persistent preference store.
      Used in: portlet
    </xs:documentation>
  </xs:annotation>

  <xs:sequence> 
    <xs:element name="preference" type="portlet:preferenceType" 
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="preferences-validator" type="portlet:preferences-validatorType"
                minOccurs="0"/>
  </xs:sequence> 
</xs:complexType>

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

<xs:complexType name="preferenceType">
  <xs:annotation>
    <xs:documentation>
      Persistent preference values that may be used for customization 
      and personalization by the portlet.
      Used in: user-preferences, portlet-preferences
    </xs:documentation>
  </xs:annotation>

  <xs:sequence> 
    <xs:element name="description" type="portlet:descriptionType"
      minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="name" type="portlet:nameType"/>
    <xs:element name="value" type="portlet:valueType" maxOccurs="unbounded"/>
    <xs:element name="non-modifiable" type="portlet:non-modifiableType" 
        minOccurs="0"/>
    <xs:element name="multi-value" type="portlet:multi-valueType"
        minOccurs="0"/>
  </xs:sequence>
</xs:complexType> 

<!-- *********************************************************** -->
<!--   preferences-validator                                     -->
<!-- *********************************************************** -->

<xs:complexType name="preferences-validatorType">
  <xs:annotation>
    <xs:documentation>
      The class specified under preferences-validator implements
      the PreferencesValidator interface to validate the 
      preferences settings.
      Used in: user-preferences, portlet-preferences
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent> 
    <xs:extension base="xs:string"/>
  </xs:simpleContent>
</xs:complexType>

<!-- *********************************************************** -->
<!--   resource-bundle                                           -->
<!-- *********************************************************** -->

<xs:complexType name="resource-bundleType">
  <xs:annotation> 
    <xs:documentation>
      Filename of the resource bundle containing the language specific
      portlet informations in different languages.
      Used in: portlet-info
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent>
    <xs:extension base="xs:string"/>
  </xs:simpleContent>
</xs:complexType> 

<!-- *********************************************************** -->
<!--   role-link                                                 -->
<!-- *********************************************************** -->

<xs:complexType name="role-linkType">
  <xs:annotation>
    <xs:documentation>
      The role-link element is a reference to a defined security role.
      The role-link element must contain the name of one of the
      security roles defined in the security-role elements.
      Used in: security-role-ref 
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent>
    <xs:extension base="xs:string"/>
  </xs:simpleContent> 
</xs:complexType>

<!-- *********************************************************** -->
<!--   security-role                                             -->
<!-- *********************************************************** -->

<xs:complexType name="security-roleType">
  <xs:annotation>
    <xs:documentation>
      The security-role element contains the definition of a security 
      role. The definition consists of an optional description of the
      security role, and the security role name.
      Used in: portlet-app
      Example:
        <security-role> 
          <description>
            This role includes all employees who are authorized
            to customize the employee service application.
          </description>
          <name>employee</name> 
        </security-role>
    </xs:documentation>
  </xs:annotation>

  <xs:sequence>
    <xs:element name="description" type="portlet:descriptionType" 
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="role-name" type="portlet:role-nameType"/>
  </xs:sequence>
</xs:complexType>

<!-- *********************************************************** -->
<!--   security-role-ref                                         -->
<!-- *********************************************************** -->

<xs:complexType name="security-role-refType"> 
  <xs:annotation>
    <xs:documentation>
      The security-role-ref element contains the declaration of a
      security role reference in the web application�s code. The
      declaration consists of an optional description, the security 
      role name used in the code, and an optional link to a security
      role. If the security role is not specified, the Deployer must
      choose an appropriate security role.
      The value of the role name element must be the String used
      as the parameter to the 
      EJBContext.isCallerInRole(String roleName) method
      or the HttpServletRequest.isUserInRole(String role) method.
      Used in: portlet
    </xs:documentation>
  </xs:annotation> 

  <xs:sequence>
    <xs:element name="description" type="portlet:descriptionType"
        minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="role-name" type="portlet:role-nameType"/>
    <xs:element name="role-link" type="portlet:role-linkType" minOccurs="0"/> 
  </xs:sequence>
</xs:complexType>

<!-- *********************************************************** -->
<!--   short-title                                               -->
<!-- *********************************************************** -->

<xs:complexType name="short-titleType">
  <xs:annotation>
    <xs:documentation> 
      Locale specific short version of the static title.
      Used in: portlet-info
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent> 
    <xs:extension base="xs:string">
      <xs:attribute ref="xml:lang"/>
    </xs:extension>
  </xs:simpleContent>
</xs:complexType> 

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

<xs:complexType name="supportsType">
  <xs:annotation>
    <xs:documentation>
      Supports indicates the portlet modes and window states that the
      portlet supports for a specific content type. All portlets must
      support the view mode and normal window state.
      Used in: portlet 
    </xs:documentation>
  </xs:annotation>

  <xs:sequence>
    <xs:element name="mime-type" type="portlet:mime-typeType"/>
    <xs:element name="portlet-mode" type="portlet:portlet-modeType" 
      minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>

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

<xs:complexType name="titleType">
  <xs:annotation> 
    <xs:documentation>
      Locale specific static title for this portlet.
      Used in: portlet-info
    </xs:documentation>
  </xs:annotation> 

  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:attribute ref="xml:lang"/>
    </xs:extension>
  </xs:simpleContent> 
</xs:complexType>

<!-- *********************************************************** -->
<!--   user-attribute                                            -->
<!-- *********************************************************** -->

<xs:complexType name="user-attributeType">
  <xs:annotation>
    <xs:documentation>
      User attribute defines a user specific attribute that the 
      portlet application needs. The portlet within this application
      can access this attribute via the request parameter USER_INFO map.
      Used in: portlet-app
    </xs:documentation> 
  </xs:annotation>

  <xs:sequence>
    <xs:element name="description" type="portlet:descriptionType"
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="name" type="portlet:nameType"/> 
  </xs:sequence>
</xs:complexType>

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

<xs:complexType name="valueType">
  <xs:annotation>
    <xs:documentation> 
      The value element contains the value of a parameter.
      Used in: init-param
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent> 
    <xs:extension base="xs:string"/>
  </xs:simpleContent>
</xs:complexType>

<!-- *********************************************************** -->
<!--   window-state                                              -->
<!-- *********************************************************** -->

<xs:complexType name="window-stateType">
  <xs:annotation> 
    <xs:documentation>
      Portlet window state. The specification pre-defines the
      following values as valid window state constants:
        MINIMIZED, NORMAL, MAXIMIZED.
      Used in: custom-window-state 
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent>
    <xs:extension base="xs:string"/>
    </xs:simpleContent> 
</xs:complexType>

<!-- *********************************************************** -->
<!-- everything below is copied from j2ee_1_4.xsd                -->
<!-- *********************************************************** -->

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

<xs:complexType name="descriptionType">
  <xs:annotation>
    <xs:documentation> 
      The description element is used to provide text describing the
      parent element. The description element should include any
      information that the portlet application war file producer wants
      to provide to the consumer of the portlet application war file
      (i.e., to the Deployer). Typically, the tools used by the
      portlet application war file consumer will display the
      description when processing the parent element that contains the 
      description.
      Used in: init-param, portlet, portlet-app, security-role
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent> 
    <xs:extension base="xs:string">
      <xs:attribute ref="xml:lang"/>
    </xs:extension>
  </xs:simpleContent>
</xs:complexType> 

<!-- *********************************************************** -->
<!--   display-name                                              -->
<!-- *********************************************************** -->

<xs:complexType name="display-nameType">
  <xs:annotation>
    <xs:documentation>
      The display-name type contains a short name that is intended
      to be displayed by tools. It is used by display-name 
      elements. The display name need not be unique.
      Example:
      ...
      <display-name xml:lang="en">Employee Self Service</display-name>
      
      The value of the xml:lang attribute is "en" (English) by
      default.
    </xs:documentation>
  </xs:annotation>

  <xs:simpleContent> 
    <xs:extension base="portlet:string">
      <xs:attribute ref="xml:lang"/>
    </xs:extension>
  </xs:simpleContent>
</xs:complexType> 

<!-- *********************************************************** -->
<!--   deployment-extension                                      -->
<!-- *********************************************************** -->

<xs:complexType name="deployment-extensionType">
  <xs:annotation>
    <xs:documentation>
      The deployment-extensionType is used to indicate
      extensions to the specific Deployment Component. 
      It is used by deployment-extension elements to designate an
      extension block that is targeted to a specific extension
      designated by a set of extension elements that are declared
      by a namespace. The namespace identifies the extension to 
      the deployment tool that processes the extension.
      The mustUnderstand attribute is provided by the Application
      Assembler to indicate whether the extension described is an
      essential extension that must exist in the container. If 
      mustUnderstand is "true", the deployment tool must indicate
      an error when processing a deployment-extension element with
      a namespace it does not understand. Extensions that are not
      essential are declared by default as optional extensions
      that need not be provided by a container. Applications that 
      use such extensions are portable to other containers because
      deployment tools will ignore extensions that they don't
      support.
      The type of the extension-element is abstract. Therefore, a 
      concrete type must be specified by the deployment descriptor
      using xsi:type attribute for each extension-element.
      The value of the mustUnderstand attribute is "false"
      by default. 
    </xs:documentation>
  </xs:annotation>
  
  <xs:sequence>
    <xs:element name="extension-element" type="portlet:extensibleType"
                maxOccurs="unbounded"/> 
  </xs:sequence>
  <xs:attribute name="namespace" type="xs:anyURI" use="required"/>
  <xs:attribute name="mustUnderstand" type="xs:boolean"/>
</xs:complexType>

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

<xs:complexType name="extensibleType" abstract="true">
  <xs:annotation>
    <xs:documentation> 
      The extensibleType is an abstract base type which is used to
      define the type of extension-elements. Instance documents
      must substitute a known type to define the extension by
      using xsi:type attribute to define the actual type of
      extension-elements. 
    </xs:documentation>
  </xs:annotation>
</xs:complexType>

<!-- *********************************************************** -->
<!--   role-name                                                 -->
<!-- *********************************************************** -->

<xs:simpleType name="role-nameType">
  <xs:annotation> 
    <xs:documentation>
      The role-nameType designates the name of a security role.
      The name must conform to the lexical rules for an NMTOKEN.
    </xs:documentation> 
  </xs:annotation>

  <xs:restriction base="xs:NMTOKEN"/>
</xs:simpleType>

<xs:simpleType name="string">
  <xs:annotation> 
    <xs:documentation>
      This is a special string datatype that is defined by J2EE
      as a base type for defining collapsed strings. When
      schemas require trailing/leading space elimination as
      well as collapsing the existing whitespace, this base 
      type may be used.
    </xs:documentation>
  </xs:annotation>

  <xs:restriction base="xs:string">
    <xs:whiteSpace value="collapse"/> 
  </xs:restriction>
</xs:simpleType>

</xs:schema>

