<?xml version="1.0" encoding="UTF-8"?>

<!--
  This schema describes the weblogic-extension schema.  This includes
  unsupported features that may be removed without notice in future
  WebLogic Server releases.
-->

<schema
  targetNamespace="http://www.bea.com/ns/weblogic/weblogic-extension"
  xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-extension"
  xmlns="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified" 
  attributeFormDefault="unqualified"
  version="1.0"
  >
  

  <element name="weblogic-extension"
           type="wls:weblogic-extensionType" />

  <complexType name="weblogic-extensionType">
    <sequence>
      <element name="module-provider" minOccurs="0" 
               maxOccurs="unbounded" type="wls:module-providerType" />
      <element name="custom-module" type="wls:custom-moduleType"
               minOccurs="0" maxOccurs="unbounded" />
    </sequence>
    <attribute name="version" type="string" use="optional"/>
  </complexType>

  <complexType name="custom-moduleType">
    <sequence>
      <element name="uri" type="string" minOccurs="1"/>
      <element name="provider-name" type="string" minOccurs="1"/>
      <element name="configuration-support"
               type="wls:configuration-supportType"
               minOccurs="0"/>
    </sequence>
  </complexType>

  <complexType name="module-providerType">
    <sequence>
      <element name="name" type="string" minOccurs="1"/>
      <element name="module-factory-class-name" type="string"
    minOccurs="1"/>
      <element name="binding-jar-uri" type="string" minOccurs="0"/>
    </sequence>
  </complexType>

  <complexType name="configuration-supportType">
    <annotation>
      <documentation>
      <![CDATA[
        If the custom module supports configuration descriptors, 
	then a configuration-support element is required. This element specifies
	- base-root-element   - the root element name of the descriptor being configured.
 	- config-root-element - (optional) the root element of the configuring descriptor.
                                base-root-element is used if not specified.
	- base-namespace      - the namespace associated with the base  descriptors.
	- config-namespace    - (optional) the namespace associated with the  configuration descriptors.
                                base-config-namespace is used if not specified.
	- base-uri            - the relative location of the base descriptor.
	- config-uri          - (optional) relative location of the configuration descriptor.
                                base-config-uri is used if not specified.
	- base-package-name   - the package containing the base descriptor bean interfaces and implementation classes.
	- config-package-name - (optional) the package containing the config descriptor bean interfaces and implementation classes.
                                base-package-name is used if not specified.


	example:

        <weblogic-extension>
	   <custom-module>
             <uri>mymodule</uri>
             <provider-name>fred</provider-name>
             <configuration-support>
               <base-root-element>annotation-manifest</base-root-element>
               <config-root-element>annotation-overrides</config-root-element>
               <base-namespace>http://www.bea.com/2004/03/wlw/external-config/</base-namespace>
               <base-uri>META-INF/manifest.xml</base-uri>
               <config-uri>META-INF/overrides.xml</config-uri>
               <base-package-name>weblogic.j2ee.descriptor.wl</base-package-name>
             </configuration-support>
	   </custom-module>
        </weblogic-extension>
	]]>
      </documentation>
    </annotation>
    <sequence>
      <element name="base-root-element"
               type="string"/>
      <element name="config-root-element"
               type="string"
               minOccurs="0"/>
      <element name="base-namespace"
               type="string"/>
      <element name="config-namespace"
               type="string"
               minOccurs="0"/>
      <element name="base-uri"
               type="string"/>
      <element name="config-uri"
               type="string"
               minOccurs="0"/>
      <element name="base-package-name"
               type="string"/>
      <element name="config-package-name"
               type="string"
               minOccurs="0"/>
    </sequence>
  </complexType>

</schema>

