<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by  Fred van Blommestein -->
<!--
  Library:           QDA-XML version 1.0
                     
  Release Date:      18 March 2019
  Module:            Project.xsd
  -->
<!-- ===== Copyright Notice ===== -->
<!--
The Rotterdam Exchange Format Initiative (REFI, www.qdasoftware.org) as the publisher of 
QDA-XML takes no position regarding the validity or scope of any 
intellectual property or other rights that might be claimed to pertain 
to the implementation or use of the technology described in this 
document or the extent to which any license under such rights 
might or might not be available; neither does it represent that it has 
made any effort to identify any such rights. Information on QDA-XML's 
procedures with respect to rights in QDA-XML specifications can be 
found at the QDA-XML website www.qdasoftware.org..

REFI invites any interested party to bring to its attention any 
copyrights, patents or patent applications, or other proprietary 
rights which may cover technology that may be required to 
implement this specification.

This specification is licensed under the MIT license.  

Copyright 2019 REFI www.qdasoftware.org.
 
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
-->
<xsd:schema xmlns="urn:QDA-XML:project:1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:QDA-XML:project:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
  <!-- ===== Element Declarations ===== -->
  <xsd:element name="Project" type="ProjectType">
    <xsd:annotation>
      <xsd:documentation>This element MUST be conveyed as the root element in any instance document based on this Schema expression</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!-- ===== Type Definitions ===== -->
  <xsd:complexType name="ProjectType">
    <xsd:sequence>
      <xsd:element name="Users" type="UsersType" minOccurs="0"/>
      <xsd:element name="CodeBook" type="CodeBookType" minOccurs="0"/>
      <xsd:element name="Variables" type="VariablesType" minOccurs="0"/>
      <xsd:element name="Cases" type="CasesType" minOccurs="0"/>
      <xsd:element name="Sources" type="SourcesType" minOccurs="0"/>
      <xsd:element name="Notes" type="NotesType" minOccurs="0"/>
      <xsd:element name="Links" type="LinksType" minOccurs="0"/>
      <xsd:element name="Sets" type="SetsType" minOccurs="0"/>
      <xsd:element name="Graphs" type="GraphsType" minOccurs="0"/>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
      <!-- Note(s) that apply to the project as a whole -->
    </xsd:sequence>
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="origin" type="xsd:string"/>
    <xsd:attribute name="creatingUserGUID" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUserGUID" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="basePath" type="xsd:string"/>
  </xsd:complexType>
  <xsd:complexType name="UsersType">
    <xsd:sequence>
      <xsd:element name="User" type="UserType" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="UserType">
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="id" type="xsd:string"/>
  </xsd:complexType>
  <xsd:complexType name="CodeBookType">
    <xsd:sequence>
      <xsd:element name="Codes" type="CodesType"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CodesType">
    <xsd:sequence>
      <xsd:element name="Code" type="CodeType" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CodeType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="Code" type="CodeType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="isCodable" type="xsd:boolean" use="required"/>
    <xsd:attribute name="color" type="RGBType"/>
  </xsd:complexType>
  <xsd:complexType name="CasesType">
    <xsd:sequence>
      <xsd:element name="Case" type="CaseType" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CaseType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="CodeRef" type="CodeRefType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="VariableValue" type="VariableValueType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="SourceRef" type="SourceRefType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="SelectionRef" type="SelectionRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
  </xsd:complexType>
  <xsd:complexType name="VariablesType">
    <xsd:sequence>
      <xsd:element name="Variable" type="VariableType" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="VariableType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="typeOfVariable" type="typeOfVariableType" use="required"/>
  </xsd:complexType>
  <xsd:complexType name="VariableValueType">
    <xsd:sequence>
      <xsd:element name="VariableRef" type="VariableRefType"/>
      <xsd:choice>
        <xsd:element name="TextValue" type="xsd:string" minOccurs="0"/>
        <xsd:element name="BooleanValue" type="xsd:boolean" minOccurs="0"/>
        <xsd:element name="IntegerValue" type="xsd:integer" minOccurs="0"/>
        <xsd:element name="FloatValue" type="xsd:decimal" minOccurs="0"/>
        <xsd:element name="DateValue" type="xsd:date" minOccurs="0"/>
        <xsd:element name="DateTimeValue" type="xsd:dateTime" minOccurs="0"/>
      </xsd:choice>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="SetsType">
    <xsd:sequence>
      <xsd:element name="Set" type="SetType" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="SetType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="MemberCode" type="CodeRefType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="MemberSource" type="SourceRefType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="MemberNote" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string" use="required"/>
  </xsd:complexType>
  <xsd:complexType name="SourcesType">
    <xsd:choice maxOccurs="unbounded">
      <xsd:element name="TextSource" type="TextSourceType"/>
      <xsd:element name="PictureSource" type="PictureSourceType"/>
      <xsd:element name="PDFSource" type="PDFSourceType"/>
      <xsd:element name="AudioSource" type="AudioSourceType"/>
      <xsd:element name="VideoSource" type="VideoSourceType"/>
    </xsd:choice>
  </xsd:complexType>
  <xsd:complexType name="TextSourceType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="PlainTextContent" type="xsd:string" minOccurs="0"/>
      <xsd:element name="PlainTextSelection" type="PlainTextSelectionType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="VariableValue" type="VariableValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="richTextPath" type="xsd:string"/>
    <xsd:attribute name="plainTextPath" type="xsd:string"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
    <!-- Either PlainTextContent or plainTextPath MUST be filled, not both -->
  </xsd:complexType>
  <xsd:complexType name="PlainTextSelectionType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="startPosition" type="xsd:integer" use="required"/>
    <xsd:attribute name="endPosition" type="xsd:integer" use="required"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="PictureSourceType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="TextDescription" type="TextSourceType" minOccurs="0"/>
      <xsd:element name="PictureSelection" type="PictureSelectionType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="VariableValue" type="VariableValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="path" type="xsd:string"/>
    <xsd:attribute name="currentPath" type="xsd:string"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="PictureSelectionType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="firstX" type="xsd:integer" use="required"/>
    <xsd:attribute name="firstY" type="xsd:integer" use="required"/>
    <xsd:attribute name="secondX" type="xsd:integer" use="required"/>
    <xsd:attribute name="secondY" type="xsd:integer" use="required"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="PDFSourceType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="PDFSelection" type="PDFSelectionType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="Representation" type="TextSourceType" minOccurs="0"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="VariableValue" type="VariableValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="path" type="xsd:string"/>
    <xsd:attribute name="currentPath" type="xsd:string"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="PDFSelectionType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="Representation" type="TextSourceType" minOccurs="0"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="page" type="xsd:integer" use="required"/>
    <xsd:attribute name="firstX" type="xsd:integer" use="required"/>
    <xsd:attribute name="firstY" type="xsd:integer" use="required"/>
    <xsd:attribute name="secondX" type="xsd:integer" use="required"/>
    <xsd:attribute name="secondY" type="xsd:integer" use="required"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="AudioSourceType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="Transcript" type="TranscriptType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="AudioSelection" type="AudioSelectionType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="VariableValue" type="VariableValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="path" type="xsd:string"/>
    <xsd:attribute name="currentPath" type="xsd:string"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="AudioSelectionType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="begin" type="xsd:integer" use="required"/>
    <xsd:attribute name="end" type="xsd:integer" use="required"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="VideoSourceType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="Transcript" type="TranscriptType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="VideoSelection" type="VideoSelectionType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="VariableValue" type="VariableValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="path" type="xsd:string"/>
    <xsd:attribute name="currentPath" type="xsd:string"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="VideoSelectionType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="begin" type="xsd:integer" use="required"/>
    <xsd:attribute name="end" type="xsd:integer" use="required"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="TranscriptType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="PlainTextContent" type="xsd:string" minOccurs="0"/>
      <xsd:element name="SyncPoint" type="SyncPointType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="TranscriptSelection" type="TranscriptSelectionType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="richTextPath" type="xsd:string"/>
    <xsd:attribute name="plainTextPath" type="xsd:string"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
    <!-- Either PlainTextContent or plainTextPath MUST be filled, not both -->
  </xsd:complexType>
  <xsd:complexType name="TranscriptSelectionType">
    <xsd:sequence>
      <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
      <xsd:element name="Coding" type="CodingType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="fromSyncPoint" type="GUIDType"/>
    <xsd:attribute name="toSyncPoint" type="GUIDType"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
    <xsd:attribute name="modifyingUser" type="GUIDType"/>
    <xsd:attribute name="modifiedDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="SyncPointType">
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="timeStamp" type="xsd:integer"/>
    <xsd:attribute name="position" type="xsd:integer"/>
  </xsd:complexType>
  <xsd:complexType name="CodingType">
    <xsd:sequence>
      <xsd:element name="CodeRef" type="CodeRefType"/>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="creatingUser" type="GUIDType"/>
    <xsd:attribute name="creationDateTime" type="xsd:dateTime"/>
  </xsd:complexType>
  <xsd:complexType name="GraphsType">
    <xsd:sequence>
      <xsd:element name="Graph" type="GraphType" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="GraphType">
    <xsd:sequence>
      <xsd:element name="Vertex" type="VertexType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="Edge" type="EdgeType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
  </xsd:complexType>
  <xsd:complexType name="VertexType">
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="representedGUID" type="GUIDType"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="firstX" type="xsd:integer" use="required"/>
    <xsd:attribute name="firstY" type="xsd:integer" use="required"/>
    <xsd:attribute name="secondX" type="xsd:integer"/>
    <xsd:attribute name="secondY" type="xsd:integer"/>
    <xsd:attribute name="shape" type="ShapeType"/>
    <xsd:attribute name="color" type="RGBType"/>
  </xsd:complexType>
  <xsd:complexType name="EdgeType">
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="representedGUID" type="GUIDType"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="sourceVertex" type="GUIDType" use="required"/>
    <xsd:attribute name="targetVertex" type="GUIDType" use="required"/>
    <xsd:attribute name="color" type="RGBType"/>
    <xsd:attribute name="direction" type="directionType"/>
    <xsd:attribute name="lineStyle" type="LineStyleType"/>
  </xsd:complexType>
  <xsd:complexType name="NotesType">
    <xsd:sequence>
      <xsd:element name="Note" type="TextSourceType" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="LinksType">
    <xsd:sequence>
      <xsd:element name="Link" type="LinkType" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="LinkType">
    <xsd:sequence>
      <xsd:element name="NoteRef" type="NoteRefType" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="guid" type="GUIDType" use="required"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="direction" type="directionType"/>
    <xsd:attribute name="color" type="RGBType"/>
    <xsd:attribute name="originGUID" type="GUIDType"/>
    <xsd:attribute name="targetGUID" type="GUIDType"/>
  </xsd:complexType>
  <xsd:complexType name="NoteRefType">
    <xsd:attribute name="targetGUID" type="GUIDType" use="required"/>
  </xsd:complexType>
  <xsd:complexType name="CodeRefType">
    <xsd:attribute name="targetGUID" type="GUIDType" use="required"/>
  </xsd:complexType>
  <xsd:complexType name="SourceRefType">
    <xsd:attribute name="targetGUID" type="GUIDType" use="required"/>
  </xsd:complexType>
  <xsd:complexType name="SelectionRefType">
    <xsd:attribute name="targetGUID" type="GUIDType" use="required"/>
  </xsd:complexType>
  <xsd:complexType name="VariableRefType">
    <xsd:attribute name="targetGUID" type="GUIDType" use="required"/>
  </xsd:complexType>
  <xsd:simpleType name="GUIDType">
    <xsd:restriction base="xsd:token">
      <xsd:pattern value="([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|(\{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\})"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="RGBType">
    <xsd:restriction base="xsd:token">
      <xsd:pattern value="#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="directionType">
    <xsd:restriction base="xsd:token">
      <xsd:enumeration value="Associative"/>
      <xsd:enumeration value="OneWay"/>
      <xsd:enumeration value="Bidirectional"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="typeOfVariableType">
    <xsd:restriction base="xsd:token">
      <xsd:enumeration value="Text"/>
      <xsd:enumeration value="Boolean"/>
      <xsd:enumeration value="Integer"/>
      <xsd:enumeration value="Float"/>
      <xsd:enumeration value="Date"/>
      <xsd:enumeration value="DateTime"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ShapeType">
    <xsd:restriction base="xsd:token">
      <xsd:enumeration value="Person"/>
      <xsd:enumeration value="Oval"/>
      <xsd:enumeration value="Rectangle"/>
      <xsd:enumeration value="RoundedRectangle"/>
      <xsd:enumeration value="Star"/>
      <xsd:enumeration value="LeftTriangle"/>
      <xsd:enumeration value="RightTriangle"/>
      <xsd:enumeration value="UpTriangle"/>
      <xsd:enumeration value="DownTriangle"/>
      <xsd:enumeration value="Note"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="LineStyleType">
    <xsd:restriction base="xsd:token">
      <xsd:enumeration value="dotted"/>
      <xsd:enumeration value="dashed"/>
      <xsd:enumeration value="solid"/>
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>
