<?xml version="1.0" encoding="utf-8"?>
<!--
        
        ** OAGIS® Revision: 9.1  **
        ** Date: 11 May 2007 **
        ** Copyright 1997-2007, All Rights Reserved **
        
        This is an OAGIS® BOD XML Schema (XSD) Definition.
        
       License information for this file is provided in the file **OAGi License Agreement.txt** that is provided with this download package.
        
        For support, more information, or to report implementation bugs, please contact the Open Applications Group at xml@openapplications.org.
        
        XML Schema 
        
-->

<!--
© Copyright 2007 Infor Global Solutions Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. The 
word and design marks set forth herein are trademarks and/or registered trademarks of Infor Global Solutions 
Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. All other trademarks listed herein 
are the property of their respective owners.
 
-->

<!--    *****     Update Log     *****
    Date            By    Note
    11 Aug 15        LA`    New noun, CaptureDocument; BOD-2986
    
*****     Update End     ***** 
 
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns="http://schema.infor.com/InforOAGIS/2"
	targetNamespace="http://schema.infor.com/InforOAGIS/2" elementFormDefault="qualified">

	<xsd:include schemaLocation="../Components/System/Components.xsd"/>
    
    <xsd:element name="CaptureDocument" type="CaptureDocumentType">
        <xsd:annotation>
            <xsd:documentation>
                To specify any type of captured (OCR/ICR) data coming in from a document capture system. 
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:complexType name="CaptureDocumentType">
        <xsd:complexContent>
            <xsd:extension base="StatusEnabledHeaderType">
                <xsd:sequence>
                    <xsd:element ref="CreationDateTime" minOccurs="0"/>
                    <xsd:element ref="CreationPerson" minOccurs="0"/>
                    <xsd:element ref="Version" minOccurs="0"/>   
                    <xsd:element ref="FileSize" minOccurs="0"/>
                    <xsd:element ref="DocumentType" minOccurs="0"/>
                    <xsd:element ref="DocumentLabel" minOccurs="0" maxOccurs="unbounded">
                        <xsd:annotation>
                            <xsd:documentation>
                                To specify additional labels for the document type; some examples
                                are confidence score, confidence threshold, document name, document description 
                                or any customer specific data related to the current document 
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element ref="DocumentField" minOccurs="0" maxOccurs="unbounded">
                        <xsd:annotation>
                            <xsd:documentation>
                                Document level fields within a document.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element ref="DocumentPage" minOccurs="0" maxOccurs="unbounded">
                        <xsd:annotation>
                            <xsd:documentation>
                                Specifies the page details from the captured document
                                the source file for the current page and the source mime type
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element ref="DocumentTable" minOccurs="0" maxOccurs="unbounded">
                        <xsd:annotation>
                            <xsd:documentation>
                                To specify tables within a document
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element ref="UserArea" minOccurs="0"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    
    <xsd:complexType name="DocumentFieldType">
        <xsd:sequence>
            <xsd:element ref="Name" minOccurs="0"/>
            <xsd:element ref="Value" minOccurs="0"/>
            <xsd:element ref="DataType" minOccurs="0"/>
            <xsd:element ref="Category" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Possible categorization for a field; a set of fields could
                        be grouped to one category
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="FieldOrderNumber" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        The order number in which the field was configured within
                        the OCR capturing system for a particular document type
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="FieldValueEnumerationString" minOccurs="0" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation>
                        String containing possible enumeration values for the current field.
                        Used during validations/additional data entry in the external system
                     </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="PageID" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        PageID within the document from which the current field is captured
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="DocumentField" type="DocumentFieldType"/>
    
    <xsd:complexType name="DocumentPageType">
        <xsd:sequence>
            <xsd:element ref="PageID" minOccurs="0"/>
            <xsd:element ref="SourceFileName" minOccurs="0"/>
            <xsd:element ref="SourceMimeType" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="DocumentPage" type="DocumentPageType"/>
    
    <xsd:complexType name="DocumentTableType">
        <xsd:sequence>
            <xsd:element ref="ID" minOccurs="0"/>
            <xsd:element ref="Name" minOccurs="0"/>
            <xsd:element ref="Row" minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="DocumentTable" type="DocumentTableType"/>
    
    <xsd:complexType name="RowType">
        <xsd:sequence>
            <xsd:element name="ID" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        ID for the row
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="Column" minOccurs="1" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation>
                        Column(s) that make up a row; the column name is included with
                        every value
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="Row" type="RowType"/>
    
   
    <xsd:element name="Column" type="DocumentFieldType"/>
    <xsd:element name="DocumentLabel" type="TextType"/>
    <xsd:element name="FieldOrderNumber" type="IntegerNumericType"/>
    <xsd:element name="FieldValueEnumerationString" type="StringType"/>
    <xsd:element name="PageID" type="IdentifierType"/>
    <xsd:element name="SourceFileName" type="NameType"/>
     <xsd:element name="SourceMimeType" type="NormalizedStringType"/>
</xsd:schema>
