<?xml version="1.0" encoding="UTF-8"?>

<!--
    Infor messages based upon the Open Applications Group OAGIS standard BODs. 
    For more information about the Open Applications Group please see
    www.openapplications.org
    
    
    ** Revision: Infor version 1.0   ** based on OAGIS 9.0** 
    ** Date: Aug 2006 **
    Infor Global Solutions and Open Applications Group
    Copyright 1995-2004, All Rights Reserved
    
    License information for this file is provided in LICENSE.TXT
    For support, more information, or to report implementation bugs,
    please contact the Open Applications Group at xml@openapplications.org
    
    Name: \OAGIS\9.0\Resources\Nouns\Code.xsd
    
-->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:oa="http://www.openapplications.org/oagis/9" xmlns="http://schema.infor.com/Infor1.0"
    targetNamespace="http://schema.infor.com/Infor1.0" elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.openapplications.org/oagis/9"
        schemaLocation="../../../9.0/Resources/Components/Common/Components.xsd"/>
    <xsd:include schemaLocation="../Components/Common/Components.xsd"/>


    <xsd:element name="Code" type="CodeType">
        <xsd:annotation>
            <xsd:documentation source="http://schema.infor.com/Infor1.0"> 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="CodeType">
        <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="oa:DocumentIDsGroup"/>
            <xsd:element ref="oa:EffectiveTimePeriod" minOccurs="0"/>
            <xsd:element ref="Status" minOccurs="0"/>
            <xsd:element ref="ReadOnlyIndicator" minOccurs="0"/>
            <xsd:element ref="oa: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 DocumentID of the Code that is the Code
                        Type for this list. </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="oa: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="oa: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:sequence>
    </xsd:complexType>

    <xsd:element name="ReadOnlyIndicator" type="oa:IndicatorType">
        <xsd:annotation>
            <xsd:documentation>Indicates that this instance is ReadOnly, but if this instance is for a Dimension Type instance it is not inherited by the children.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="CodeValue" type="oa:CodeType"/>
    <xsd:element name="Property" type="oa:PropertyType"/>

</xsd:schema>
