<?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
10 Apr 2008    JB      Added correct Copyright and update comments to schema.
 
        *****     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"
    attributeFormDefault="unqualified">

    
    <xsd:include schemaLocation="../Components/Operational/MasterDataComponents.xsd"/>

    <xsd:element name="CodeDefinition" type="CodeDefinitionType">
        <xsd:annotation>
            <xsd:documentation > Codes are used to
                represent concepts not included in the architecture that might be desired for
                grouping, or reporting; and As a short-cut to a concrete noun, or as a code that
                currently existing in an existing system. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:complexType name="CodeDefinitionType">
        <xsd:annotation>
            <xsd:documentation> Each code published using this noun belongs to a list, or a
                collection of codes, that are used in a specific context. The codes used to identify
                these lists is itself a code which belongs to the base list of codes which is the
                Code Type List. The lists are tied together through the ListID which points to the
                DocumentID of code that defines that list of codes. The codes that belong to the
                Code Type list will not have a ListID.</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:group ref="DocumentIDsGroup"/>
        	<xsd:element ref="LastModificationDateTime" minOccurs="0"/>
        	<xsd:element ref="LastModificationPerson" minOccurs="0"/>
            <xsd:element ref="EffectiveTimePeriod" minOccurs="0"/>
            <xsd:element ref="Status" minOccurs="0"/>
            <xsd:element ref="ReadOnlyIndicator" minOccurs="0"/>
            <xsd:element ref="UnitForMemoIndicator" minOccurs="0"/>
            <xsd:element ref="DocumentReference" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> When a code is designed as a shortcut to a concrete noun,
                        this element is used to reference the concrete noun. The schemeName
                        attribute must be set to the name of the noun. When defining concepts that
                        don't exist inside the enterprise or pur codes, this element should be
                        onmitted. </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="ListID" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> The ListID is the CodeValue of the dimension. When defining a dimension this value must be 'Dimension'
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="CodeValue" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation> The CodeValue is the actual code. This is the value that
                        will be placed in the code element in documents that reference this code.
                        The first value, using document order will be taken as the default
                    value.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="Name" minOccurs="0" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation> The Name is the longer identifier of the code. This value
                        can be printed on screens and reports. This is multilingual. The language of
                        the code on another BOD does not influence the Name that is
                    used.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="Description" minOccurs="0" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation> The Description is multilingual. This value should only be
                        available as additional information.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="Property" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="AlternateIDs" minOccurs="0"/>
            <xsd:element ref="ReportingSlot" minOccurs="0"/>
        	<xsd:element ref="UserArea" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>

    
    <xsd:element name="UnitForMemoIndicator" type="IndicatorType">
        <xsd:annotation>
            <xsd:documentation>Indicates that this code list can be used as a unit for memo amounts.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="CodeValue" type="CodeType"/>
    <xsd:element name="ReportingSlot" type="CodeType">
        <xsd:annotation>
            <xsd:documentation>
                This allows us to place dimensions with a similar reporting concept in the same column in BIS. 
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    
</xsd:schema>
