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

<!--
    
    Work in Process - Not for development use!!!
    
-->

<!--
    
    ** 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.
    
-->

<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="Hierarchy" type="HierarchyType">
        <xsd:annotation>
            <xsd:documentation source="http://schema.infor.com/Infor1.0"> Hierarchy used for
                accounting analysis. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:complexType name="HierarchyType">
        <xsd:sequence>
            <xsd:element ref="HierarchyHeader" minOccurs="0"/>
            <xsd:element ref="HierarchyNode" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="HierarchyHeaderType">
        <xsd:complexContent>
            <xsd:extension base="oa:StatusEnabledHeaderType">
                <xsd:sequence>
                    <xsd:element ref="oa:Name" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="CodeReference" minOccurs="0"/>
                    <xsd:element ref="CompleteIndicator" minOccurs="0"/>
                    <xsd:element ref="SecurityIndicator" minOccurs="0"/>
                    <xsd:element ref="PriceBookIndicator" minOccurs="0"/>
                    <xsd:element ref="EnterpriseHierarchyIndicator" minOccurs="0"/>
                    <xsd:element ref="LookupIndicator" minOccurs="0"/>
                    <xsd:element ref="oa:EffectiveTimePeriod" minOccurs="0"/>
                    <xsd:element ref="Locale" minOccurs="0"/>
                    <xsd:element ref="oa:UserArea" minOccurs="0"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="HierarchyNodeType">
        <xsd:sequence>
            <xsd:element ref="NodeID" minOccurs="0"/>
            <xsd:element ref="oa:Name" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="ParentNodeID" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> When the ParentNodeID is omitted or null then the node is
                        the root node or the unassigned node. </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="RootIndicator" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> The default is false. </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="DefaultIndicator" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> The default is false. </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="NodeRule" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="Members" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="CodeReferenceType">
        <xsd:sequence>
            <xsd:element ref="ListID" minOccurs="0"/>
            <xsd:element ref="CodeContext" minOccurs="0"/>
            <xsd:element ref="LeafField" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="NodeRuleType">
        <xsd:sequence>
            <xsd:choice>
                <xsd:sequence>
                    <xsd:annotation>
                        <xsd:documentation> For individually selected members </xsd:documentation>
                    </xsd:annotation>
                    <xsd:element ref="EqualValue" minOccurs="0"/>
                </xsd:sequence>
                <xsd:sequence>
                    <xsd:annotation>
                        <xsd:documentation> When members are sleected by a range.
                        </xsd:documentation>
                    </xsd:annotation>
                    <xsd:element ref="MinValue" minOccurs="0"/>
                    <xsd:element ref="MaxValue" minOccurs="0"/>
                </xsd:sequence>
                <xsd:sequence>
                    <xsd:annotation>
                        <xsd:documentation> When members are sleected by wildcard.
                        </xsd:documentation>
                    </xsd:annotation>
                    <xsd:element ref="PatternValue" minOccurs="0"/>
                </xsd:sequence>
            </xsd:choice>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:element name="CodeReference" type="CodeReferenceType">
        <xsd:annotation>
            <xsd:documentation> Reference to the type of the Code. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="HierarchyHeader" type="HierarchyHeaderType"/>
    <xsd:element name="HierarchyNode" type="HierarchyNodeType"/>
    <xsd:element name="CodeContext" type="oa:NormalizedStringType">
        <xsd:annotation>
            <xsd:documentation> Defines the context for the Code Type when the code type is for a
                calendar or chart of accounts. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:element name="LeafField" type="oa:NormalizedStringType">
        <xsd:annotation>
            <xsd:documentation> The name of the leaf being referenced.  </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="CompleteIndicator" type="oa:IndicatorType">
        <xsd:annotation>
            <xsd:documentation> Indicates that all possible values must be represented in the
                hierarchy. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="SecurityIndicator" type="oa:IndicatorType">
        <xsd:annotation>
            <xsd:documentation> Indicates that the hierarchy is built for security.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="PriceBookIndicator" type="oa:IndicatorType">
        <xsd:annotation>
            <xsd:documentation> Indicates that the hierarchy will be used for a price list.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="EnterpriseHierarchyIndicator" type="oa:IndicatorType">
        <xsd:annotation>
            <xsd:documentation> Indicates that this hierarchy is the enterprise organizational
                hierarchy. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="LookupIndicator" type="oa:IndicatorType">
        <xsd:annotation>
            <xsd:documentation> Indicates that this hierarchy will be used for lookups.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="Members" type="oa:SequencedCodesType">
        <xsd:annotation>
            <xsd:documentation> The sequence indicates the correlation sequence.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="ParentNodeID" type="oa:IdentifierType">
        <xsd:annotation>
            <xsd:documentation> The NodeID of the node that is the parent of the current Node.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="RootIndicator" type="oa:IndicatorType">
        <xsd:annotation>
            <xsd:documentation> Indicates that this node is the root node of the hierarchy.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="DefaultIndicator" type="oa:IndicatorType">
        <xsd:annotation>
            <xsd:documentation> Indicates that this node is the default node for the hierarchy.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="NodeRule" type="NodeRuleType"/>
    <xsd:element name="EqualValue" type="oa:NormalizedStringType"/>
    <xsd:element name="MinValue" type="oa:NormalizedStringType"/>
    <xsd:element name="MaxValue" type="oa:NormalizedStringType"/>
    <xsd:element name="PatternValue" type="oa:NormalizedStringType"/>
    <xsd:element name="Locale" type="oa:NormalizedStringType">
        <xsd:annotation>
            <xsd:documentation> Values must conform to RFC 1766. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
</xsd:schema>
