<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://drools.org/drools-5.0/change-set" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns:change-set="http://drools.org/drools-5.0/change-set">
  <xsd:import namespace="http://www.w3.org/2001/XMLSchema-instance"/>
  <xsd:element name="change-set">
    <xsd:complexType>
      <xsd:choice>
        <xsd:element ref="change-set:add"/>
        <xsd:element ref="change-set:remove"/>
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="add">
    <xsd:complexType mixed="true">
      <xsd:sequence>
        <xsd:element minOccurs="0" maxOccurs="unbounded" ref="change-set:resource"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="remove">
    <xsd:complexType mixed="true">
      <xsd:sequence>
        <xsd:element minOccurs="0" maxOccurs="unbounded" ref="change-set:resource"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="resource">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:any/>
        <xsd:element minOccurs="0" ref="change-set:decisiontable-conf"/>
      </xsd:sequence>
      <!-- URL to the resource, can be file based -->
      <xsd:attribute name="source" use="required" type="xsd:anyURI"/>
      <!-- for example, DRL, or PKG -->
      <xsd:attribute name="type" use="required" type="xsd:string"/>
      <xsd:attribute name="basicAuthentication" type="xsd:string"/>
      <xsd:attribute name="username" type="xsd:string"/>
      <xsd:attribute name="password" type="xsd:string"/>
    </xsd:complexType>

  </xsd:element>
  <xsd:element name="decisiontable-conf">
    <xsd:complexType>
      <xsd:attribute name="input-type" use="required" type="xsd:NCName"/>
      <xsd:attribute name="worksheet-name" use="required" type="xsd:NCName"/>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>