<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema 
  targetNamespace="http://graphml.graphdrawing.org/xmlns"
  xmlns="http://graphml.graphdrawing.org/xmlns"  

  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified"
  attributeFormDefault="unqualified"
>


<xsd:annotation>
  <xsd:documentation xml:lang="en">
    This XML-Schema extends the original graphml XML-Schema with serveral
    additions to the original complexTypes like graph, node, edge, ...
    Because the redefinition respectivly the extension adds the additional
    elements to the end of the original complexType and the original definition
    contains sequences, the additional elements must be inserted at the end of
    an complexType in a .graphml-File
  </xsd:documentation>
</xsd:annotation>

<xsd:redefine schemaLocation="graphml-biogranat-structure.xsd">

  <xsd:complexType name="graphml.type" >
     <xsd:complexContent>
      <xsd:extension base="graphml.type">
        <xsd:sequence>
          <xsd:element ref="biogranat_metaInf" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_text" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_name" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="graph.type" >
     <xsd:complexContent>
      <xsd:extension base="graph.type">
        <xsd:sequence>
          <xsd:element ref="biogranat_metaInf" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_text" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_name" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="node.type">
     <xsd:complexContent>
      <xsd:extension base="node.type">
        <xsd:sequence>
          <xsd:element ref="biogranat_metaInf" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_text" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_name" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
        <xsd:attributeGroup ref="biogranat_weight_att" />
        <xsd:attributeGroup ref="biogranat_position_att" />
        <xsd:attributeGroup ref="biogranat_color_att" />
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="port.type" >
    <xsd:complexContent>
      <xsd:extension base="port.type">
        <xsd:sequence>
          <xsd:element ref="biogranat_metaInf" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_text" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_name" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="edge.type">
     <xsd:complexContent>
      <xsd:extension base="edge.type">
        <xsd:sequence>
          <xsd:element ref="biogranat_metaInf" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_text" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_name" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
        <xsd:attributeGroup ref="biogranat_weight_att" />
        <xsd:attributeGroup ref="biogranat_color_att" />
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="hyperedge.type" >
     <xsd:complexContent>
      <xsd:extension base="hyperedge.type">
        <xsd:sequence>
          <xsd:element ref="biogranat_metaInf" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_text" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_name" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
        <xsd:attributeGroup ref="biogranat_weight_att" />
        <xsd:attributeGroup ref="biogranat_color_att" />
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="endpoint.type" >
     <xsd:complexContent>
      <xsd:extension base="endpoint.type">
        <xsd:sequence>
          <xsd:element ref="biogranat_metaInf" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_text" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="biogranat_name" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>

</xsd:redefine>


<!--========================================================================-->


<xsd:element name="biogranat_metaInf" type="xsd:string" >
  <xsd:annotation>
    <xsd:documentation xml:lang="en">
      contains metaInformation for Parsers
    </xsd:documentation>
  </xsd:annotation>
</xsd:element>

<xsd:element name="biogranat_text" type="xsd:string" >
  <xsd:annotation>
    <xsd:documentation xml:lang="en">
      can contain any text
    </xsd:documentation>
  </xsd:annotation>
</xsd:element>

<xsd:element name="biogranat_name" >
  <xsd:annotation>
    <xsd:documentation xml:lang="en">
      contains the name of an part of graphml
    </xsd:documentation>
  </xsd:annotation>
  <xsd:simpleType >
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="25" />
    </xsd:restriction>
  </xsd:simpleType>
</xsd:element>


<xsd:attributeGroup name="biogranat_weight_att" >
  <xsd:annotation>
    <xsd:documentation xml:lang="en">
      contains the weight of any kinds of edges and nodes
    </xsd:documentation>
  </xsd:annotation>
  <xsd:attribute name="biogranat_weight" type="xsd:double" use="optional" />
</xsd:attributeGroup>

<xsd:attributeGroup name="biogranat_position_att">
  <xsd:annotation>
    <xsd:documentation xml:lang="en">
      this attributegroup contains the X-, Y- and Z-Coordinates of a node
    </xsd:documentation>
  </xsd:annotation>
  <xsd:attribute name="biogranat_position" type="biogranat_position_type" use="optional" />
</xsd:attributeGroup>

<xsd:attributeGroup name="biogranat_color_att">
  <xsd:annotation>
    <xsd:documentation xml:lang="en">
      this attributegroup contains the R-, G- and B-Values of a color
    </xsd:documentation>
  </xsd:annotation>
  <xsd:attribute name="biogranat_color" type="biogranat_color_type" default="0;0;0" />
</xsd:attributeGroup>


<xsd:simpleType name="biogranat_position_type">
  <xsd:annotation>
    <xsd:documentation xml:lang="en">
      this simpleType defines the pattern how the position of a node is saved
    </xsd:documentation>
  </xsd:annotation>
  <xsd:restriction base="xsd:string">
    <xsd:pattern value="(-?)([0-9]*)(.?)([0-9]*);(-?)([0-9]*)(.?)([0-9]*);(-?)([0-9]*)(.?)([0-9]*)"/>
  </xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="biogranat_color_type">
  <xsd:annotation>
    <xsd:documentation xml:lang="en">
      this simpleType defines the pattern how the color of nodes and any kind of edges is saved
    </xsd:documentation>
  </xsd:annotation>
  <xsd:restriction base="xsd:string">
	<xsd:pattern value="(([0-1]?[0-9][0-9]?|2[0-4][0-9]|25[0-5]);([0-1]?[0-9][0-9]?|2[0-4][0-9]|25[0-5]);([0-1]?[0-9][0-9]?|2[0-4][0-9]|25[0-5]))"/>
  </xsd:restriction>
</xsd:simpleType>


</xsd:schema>


<!--============================================================-->
<!--    end of file: graphml-biogranat.xsd    -->
<!--============================================================-->
