<?xml version="1.0" encoding="UTF-8"?>
<!-- 
/*
 * Copyright 2001-2005 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 xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="document">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="properties"/>
        <xs:element ref="body"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="properties">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="title"/>
        <xs:element ref="author" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="title">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string"/>
    </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="author">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute name="email" type="xs:string" use="optional"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="body">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="release" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="release">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="action" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute name="version" type="xs:string"/>
          <xs:attribute name="date" type="xs:string"/>
          <xs:attribute name="description" type="xs:string" use="optional"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="action">
    <xs:complexType>
      <xs:attribute name="dev" type="xs:string"/>
      <xs:attribute name="type" type="xs:string"/>
      <xs:attribute name="issue" type="xs:string" use="optional"/>
      <xs:attribute name="due-to" type="xs:string" use="optional"/>
      <xs:attribute name="due-to-email" type="xs:string" use="optional"/>
      <xs:sequence>
        <xs:element ref="description"/>
        <xs:element ref="fixes" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="dueto" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="description" type="anything"/>
  <xs:element name="fixes">
    <xs:complexType>
      <xs:attribute name="issue" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="dueto">
    <xs:complexType>
      <xs:attribute name="name" type="xs:string"/>
      <xs:attribute name="email" type="xs:string" use="optional"/>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="anything" mixed="true">
      <xs:sequence>
          <xs:any namespace="##any" processContents="lax"
              minOccurs="0" maxOccurs="unbounded" /> 
      </xs:sequence>
      <xs:anyAttribute namespace="##other" processContents="lax" /> 
  </xs:complexType>    
</xs:schema>
