<?xml version="1.0" encoding="UTF-8"?>
<!-- XML Schema for Invoke orphan validation report  -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
		xmlns="http://www.invoke-software.com/2017/orphan-fact-report" 
		targetNamespace="http://www.invoke-software.com/2017/orphan-fact-report" 
		elementFormDefault="qualified" 
		attributeFormDefault="unqualified">
	
	<!-- Type of the orphan element -->
	<xs:complexType name="orphanType">	    
		<xs:attribute name="namespace" type="xs:string" use="required"/>	
		<xs:attribute name="localName" type="xs:NCName" use="required"/>
		<xs:attribute name="value" type="xs:string"/>		
		<xs:attribute name="contextID" type="xs:string"/>
	</xs:complexType>
	
	
	<!-- Type of the base element that contains the validation results  -->
	<xs:complexType name="orphanFactValidationType">
	    <xs:sequence>
			<!-- Element that is a custom rule result -->
			<xs:element name="orphan" type="orphanType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="message" type="xs:string"  minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	    <xs:attribute name="validated" type="xs:boolean" use="required"/>
	</xs:complexType>
	
	<!-- Base element that contains the validation results -->
	<xs:element name="orphanFacts" type="orphanFactValidationType" nillable="false"/>
</xs:schema>
