﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
  <xs:simpleType name="guid">
    <xs:restriction base="xs:string">
      <xs:pattern value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="heuristics" nillable="true" type="Heuristics" />
  <xs:element name="expresion">
    <xs:complexType mixed="true"/>
  </xs:element>        
  <xs:complexType name="Heuristics">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="unbounded" name="heuristic" type="Heuristic" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Heuristic">
    <xs:sequence>
      <xs:element ref="expresion"/>
    </xs:sequence>
    <xs:attribute name="id" xmlns:q1="http://microsoft.com/wsdl/types/" type="guid" use="required" />
    <xs:attribute name="operation">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:pattern value="[Mm][Oo][Vv][Ee]|[Rr][Ee][Pp][Ll][Aa][Cc][Ee]|[Mm][Aa][Tt][Cc][Hh][Uu][Pp][Dd][Aa][Tt][Ee]|[Mm][Aa][Tt][Cc][Hh]|[Ff][Ii][Nn][Dd]" />
      </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="to" type="xs:string" />
    <xs:attribute name="conditions">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:pattern value="[Nn][Uu][Ll][Ll]|[Nn][Oo][Tt][Nn][Uu][Ll][Ll]|[Nn][Oo][Nn][Ee]" />
      </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="description" type="xs:string" />
  </xs:complexType>
</xs:schema>