﻿<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid XML Studio 0.9.14.0 (http://www.liquid-technologies.com) -->
<xsd:schema elementFormDefault="qualified" version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:annotation>
    <xsd:documentation>Copyright(c) Scientio LLC 2006 all rights reserved. 
This schema describes the encoding of instructions to evaluate multiple interlinked rule sets simultaneously. 
It describes which rule sets are involved, and how the individual dataset inputs and outputs, and rule set inputs and outputs are interconnected to create the required output data set.
		
		
		
		
		</xsd:documentation>
  </xsd:annotation>
  <xsd:element name="processingmap">
    <xsd:annotation>
      <xsd:documentation>Root node</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="rulesets" />
        <xsd:element ref="mappings" />
        <xsd:element ref="selectionpattern" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="rulesets">
    <xsd:annotation>
      <xsd:documentation>The set of rulesets accessed by this processingMap.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element maxOccurs="unbounded" ref="ruleset" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="mappings">
    <xsd:annotation>
      <xsd:documentation>The collection of mappings associating souce data, output data and individual rule set inputs and outputs</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element maxOccurs="unbounded" ref="map" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="map">
    <xsd:annotation>
      <xsd:documentation>A single mapping</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="source" />
        <xsd:element ref="destination" />
      </xsd:sequence>
      <xsd:attribute name="reference" type="xsd:string" use="optional" />
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="source">
    <xsd:annotation>
      <xsd:documentation>The source of the data</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:choice>
        <xsd:element ref="sourcedoc" />
        <xsd:element ref="rulesetout" />
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="destination">
    <xsd:annotation>
      <xsd:documentation>The destination of the data</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:choice>
        <xsd:element ref="outputdoc" />
        <xsd:element ref="rulesetin" />
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="sourcedoc">
    <xsd:annotation>
      <xsd:documentation>A document used as a source of data</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="name" />
        <xsd:element ref="path" />
      </xsd:sequence>
      <xsd:attribute name="saliency" type="xsd:integer" />
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="outputdoc">
    <xsd:annotation>
      <xsd:documentation>The document used as a sink for data</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="name" />
        <xsd:element ref="path" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="rulesetin">
    <xsd:annotation>
      <xsd:documentation>Aninput to a rule set</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="rulesetname" />
        <xsd:element ref="ioname" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="rulesetout">
    <xsd:annotation>
      <xsd:documentation>An output from a rule set.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="rulesetname" />
        <xsd:element ref="ioname" />
      </xsd:sequence>
      <xsd:attribute name="uncertainty" type="xsd:boolean" />
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="name" type="xsd:string">
    <xsd:annotation>
      <xsd:documentation>The name of an input or output.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <xsd:element name="rulesetid" type="xsd:string">
    <xsd:annotation>
      <xsd:documentation>The id of the ruleset provided by XmlMinerServer</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <xsd:element name="ruleset">
    <xsd:annotation>
      <xsd:documentation>Represents a rule set.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="rulesetid" />
        <xsd:element ref="name" />
        <xsd:element minOccurs="0" ref="execorder" />
      </xsd:sequence>
      <xsd:attribute name="common" type="xsd:boolean" />
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="path" type="xsd:string">
    <xsd:annotation>
      <xsd:documentation>The XPath  location of the data relative to the selectionPattern.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <xsd:element name="selectionpattern" type="xsd:string">
    <xsd:annotation>
      <xsd:documentation>Identifies nodes in the source document acting as foci for data from which results can be inferred.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <xsd:element name="execorder" type="xsd:integer">
    <xsd:annotation>
      <xsd:documentation>Determines the order of execution of rule sets. Unspecified are executed last, otherwise rule sets are executed in numeric order. Rule sets with the same number may be executed in arbitrary order.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <xsd:element name="rulesetname" type="xsd:string" />
  <xsd:element name="ioname" type="xsd:string" />
</xsd:schema>