<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2008 rel. 2 sp2 (http://www.altova.com) by Martin Otter (Deutsches Zentrum für Luft- und Raumfahrt e. V.) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:annotation>
    <xs:documentation>
Copyright(c) 2008-2010, MODELISAR consortium. All rights reserved.
This file is licensed by the copyright holders under the BSD License
(http://www.opensource.org/licenses/bsd-license.html):
----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice,
  this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.
- Neither the name of the copyright holders nor the names of its
  contributors may be used to endorse or promote products derived
  from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
with the extension:
You may distribute or publicly perform any modification only
under the terms of this license.
    </xs:documentation>
  </xs:annotation>
  <xs:complexType name="fmiScalarVariable">
    <xs:annotation>
      <xs:documentation>Properties of a scalar variable</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:choice>
        <xs:element name="Real">
          <xs:complexType>
            <xs:attribute name="declaredType" type="xs:normalizedString">
              <xs:annotation>
                <xs:documentation>If present, name of type defined with TypeDefinitions (fmiType) providing defaults.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="quantity" type="xs:normalizedString"/>
            <xs:attribute name="unit" type="xs:normalizedString"/>
            <xs:attribute name="displayUnit" type="xs:normalizedString">
              <xs:annotation>
                <xs:documentation>Default display unit, provided the conversion of displayUnit to unit is defined in UnitDefinitions (fmiBaseUnit).</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="relativeQuantity" type="xs:boolean" use="optional" default="false">
              <xs:annotation>
                <xs:documentation>If relativeQuantity=true, offset for displayUnit must be ignored.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="min" type="xs:double"/>
            <xs:attribute name="max" type="xs:double"/>
            <xs:attribute name="nominal" type="xs:double"/>
            <xs:attribute name="start" type="xs:double"/>
            <xs:attribute name="fixed" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Only allowed, if start is present; =true: fixed initial value; =false: guess value</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="Integer">
          <xs:complexType>
            <xs:attribute name="declaredType" type="xs:normalizedString">
              <xs:annotation>
                <xs:documentation>If present, name of type defined with TypeDefinitions (fmiType) providing defaults.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="quantity" type="xs:normalizedString"/>
            <xs:attribute name="min" type="xs:int"/>
            <xs:attribute name="max" type="xs:int"/>
            <xs:attribute name="start" type="xs:int"/>
            <xs:attribute name="fixed" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Only allowed, if start is present; =true: fixed initial value; =false: guess value</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="Boolean">
          <xs:complexType>
            <xs:attribute name="declaredType" type="xs:normalizedString">
              <xs:annotation>
                <xs:documentation>If present, name of type defined with TypeDefinitions (fmiType) providing defaults.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="start" type="xs:boolean"/>
            <xs:attribute name="fixed" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Only allowed, if start is present; =true: fixed initial value; =false: guess value</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="String">
          <xs:complexType>
            <xs:attribute name="declaredType" type="xs:normalizedString">
              <xs:annotation>
                <xs:documentation>If present, name of type defined with TypeDefinitions (fmiType) providing defaults.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="start" type="xs:string"/>
            <xs:attribute name="fixed" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Only allowed, if start is present; =true: fixed initial value; =false: guess value</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="Enumeration">
          <xs:complexType>
            <xs:attribute name="declaredType" type="xs:normalizedString" use="required">
              <xs:annotation>
                <xs:documentation>Name of type defined with TypeDefinitions (fmiType) that provides the items of the enumeration as well as defaults.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="quantity" type="xs:normalizedString"/>
            <xs:attribute name="min" type="xs:int"/>
            <xs:attribute name="max" type="xs:int"/>
            <xs:attribute name="start" type="xs:int"/>
            <xs:attribute name="fixed" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Only allowed, if start is present; =true: fixed initial value; =false: guess value</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
      </xs:choice>
      <xs:element name="DirectDependency" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Only allowed, if causality = output. If not present, the output depends on all inputs.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="Name" type="xs:normalizedString" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The names of the input variables that are needed to compute this output</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="name" type="xs:normalizedString" use="required">
      <xs:annotation>
        <xs:documentation>Unique identifier of variable, e.g. "a.b.mod[3,4].'#123'.c"</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="valueReference" type="xs:unsignedInt" use="required">
      <xs:annotation>
        <xs:documentation>Identifier for variable value in function calls (not necessarily unique with respect to all variables)</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="description" type="xs:string"/>
    <xs:attribute name="variability" default="continuous">
      <xs:simpleType>
        <xs:restriction base="xs:normalizedString">
          <xs:enumeration value="constant"/>
          <xs:enumeration value="parameter"/>
          <xs:enumeration value="discrete"/>
          <xs:enumeration value="continuous"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="causality" default="internal">
      <xs:annotation>
        <xs:documentation>internal: After initialization only allowed to get value, e.g., for result storage; none: tool specific variable that does not influence simulation (e.g. switch logging on)</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:normalizedString">
          <xs:enumeration value="input"/>
          <xs:enumeration value="output"/>
          <xs:enumeration value="internal"/>
          <xs:enumeration value="none"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="alias" default="noAlias">
      <xs:annotation>
        <xs:documentation>If negatedAlias, the value referenced by valueReference must be negated</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:normalizedString">
          <xs:enumeration value="noAlias"/>
          <xs:enumeration value="alias"/>
          <xs:enumeration value="negatedAlias"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
</xs:schema>
