<?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     *****


  *****     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:element name="NounRelations" type="NounRelationsType"/>

  <xsd:complexType name="NounRelationsType">
    <xsd:sequence>
      <xsd:element ref="NounRelation" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="version" type="xsd:NMTOKEN" use="required"/>
  </xsd:complexType>

  <xsd:element name="NounRelation" type="NounRelationType"/>

  <xsd:complexType name="NounRelationType">
    <xsd:sequence>
      <xsd:element ref="FromNoun"/>
      <xsd:element ref="FromNounVersion"/>
      <xsd:element ref="ToNoun"/>
      <xsd:element ref="AttributeRelation" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="type" use="required" type="TypeType"/>
  </xsd:complexType>

  <xsd:element name="FromNoun" type="xsd:string"/>

  <xsd:element name="FromNounVersion" type="xsd:string"/>

  <xsd:element name="ToNoun" type="ToNounType"/>

  <xsd:simpleType name="TypeType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="MasterData"/>
      <xsd:enumeration value="System"/>
      <xsd:enumeration value="Transactional"/>
    </xsd:restriction>
  </xsd:simpleType>


  <xsd:element name="AttributeRelation" type="AttributeRelationType"/>

  <xsd:complexType name="AttributeRelationType">
    <xsd:sequence>
      <xsd:element ref="FromNounPath"/>
      <xsd:element ref="ToNounPath" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="FromNounPath" type="xsd:string"/>

  <xsd:element name="ToNounPath" type="xsd:string"/>
  
  <xsd:complexType name="ToNounType">
    <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="ValueType" use="optional" default="fixed" type="ValueTypeType"/>
      </xsd:extension>
    </xsd:simpleContent> 
  </xsd:complexType>

  <xsd:simpleType name="ValueTypeType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="calculated"/>
      <xsd:enumeration value="fixed"/>
    </xsd:restriction>
  </xsd:simpleType>

</xsd:schema>
