<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE xs:schema [
<!ENTITY common SYSTEM 'common.xml'>
]>
<!--
  Copyright 2005-2006 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://logging.apache.org/configuration/draft1" elementFormDefault="qualified"
    xmlns="http://logging.apache.org/configuration/draft1" 
    xmlns:target="http://logging.apache.org/configuration/draft1"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    &common;
    <xs:simpleType name="encoding-literal">
        <xs:restriction base="xs:string">
            <xs:enumeration value="utf-8"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="console" type="console">
            <xs:annotation>
                <xs:documentation>
            Output logging events to console.
        </xs:documentation>
            </xs:annotation>
    </xs:element>
    <xs:element name="file" type="file">
            <xs:annotation>
                <xs:documentation>
            Output logging events to file.
        </xs:documentation>
            </xs:annotation>
    </xs:element>

    <xs:group name="transport">
        <xs:choice>
            <xs:element ref="console" />
            <xs:element ref="file" />
        </xs:choice>
    </xs:group>
    <xs:group name="filter">
        <xs:choice>
            <xs:element ref="denyAll"/>
            <xs:element ref="levelMatch"/>
        </xs:choice>
    </xs:group>
    <xs:simpleType name="level">
        <xs:union memberTypes="level-literal expression"/>
    </xs:simpleType>
    <xs:complexType name="root">
        <xs:attribute name="id" type="xs:ID" use="optional"/>
        <xs:attribute name="level" type="level" use="optional"/>
        <xs:attribute name="appenders" type="xs:IDREFS" use="optional"/>
    </xs:complexType>
    <xs:group name="layout">
        <xs:choice>
            <xs:element ref="pattern"/>
            <xs:element ref="ttcc"/>
            <xs:element ref="simple"/>
        </xs:choice>
    </xs:group>

</xs:schema>