<!--
 ***************************************************************************
 * Copyright (c) 2013, 2018 Ericsson
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License 2.0 which
 * accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *   Marc-Andre Laperle - Initial API and implementation
 ***************************************************************************
-->
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="file">
    <xs:complexType>
      <xs:attribute type="xs:string" name="name" use="required"/>
    </xs:complexType>
  </xs:element>

  <xs:element name="supplementary-file">
    <xs:complexType>
      <xs:attribute type="xs:string" name="name" use="required"/>
    </xs:complexType>
  </xs:element>

  <xs:element name="bookmarks">
    <xs:complexType>
     <xs:sequence>
        <xs:element name="bookmark" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
            <xs:attribute type="xs:string" name="location" use="required"/>
            <xs:attribute type="xs:string" name="message" use="required"/>
            <xs:anyAttribute processContents="skip"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="exp-trace">
    <xs:complexType>
      <xs:attribute type="xs:string" name="name" use="required"/>
    </xs:complexType>
  </xs:element>

  <xs:element name="trace">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="file" />
        <xs:element ref="supplementary-file" maxOccurs="unbounded" minOccurs="0" />
        <xs:element ref="bookmarks" maxOccurs="unbounded" minOccurs="0" />
      </xs:sequence>
      <xs:attribute type="xs:string" name="name" use="required"/>
      <xs:attribute type="xs:string" name="type" use="required"/>
    </xs:complexType>
  </xs:element>

  <xs:element name="experiment">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="supplementary-file" maxOccurs="unbounded" minOccurs="0" />
        <xs:element ref="bookmarks" maxOccurs="unbounded" minOccurs="0" />
        <xs:element ref="exp-trace" maxOccurs="unbounded" minOccurs="0" />
      </xs:sequence>
      <xs:attribute type="xs:string" name="name" use="required"/>
      <xs:attribute type="xs:string" name="type" use="required"/>
    </xs:complexType>
  </xs:element>

  <xs:element name="tmf-export">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="trace" maxOccurs="unbounded" minOccurs="0" />
        <xs:element ref="experiment" maxOccurs="unbounded" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>