graph

http://graphml.graphdrawing.org/
Description: Describes one graph in this document.
Occurence: <graphml>, <node>, <edge>, <hyperedge>.

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
edgedefault graph.edgedefault.type required
http://graphml.graphdrawing.org/
describes whether edges of this graph are considered
as directed or undirected per default (unless 
specified by the attribute directed of <edge>).
id xs:NMTOKEN optional
http://graphml.graphdrawing.org/
identifies this graph .
parse.edgeids graph.edgeids.type optional
parse.edges graph.edges.type optional
parse.maxindegree graph.maxindegree.type optional
parse.maxoutdegree graph.maxoutdegree.type optional
parse.nodeids graph.nodeids.type optional
parse.nodes graph.nodes.type optional
parse.order graph.order.type optional

Used By

Source

<xs:element name="graph" type="graph.type" block="#all">
  <xs:annotation>
    <xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">Description: Describes one graph in this document. Occurence: <graphml>, <node>, <edge>, <hyperedge>.</xs:documentation>
  </xs:annotation>
  <xs:unique name="graph_data_key_unique">
    <xs:annotation>
      <xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">Ensures: uniqueness of the key attributes of <data> children of this <graph> element.</xs:documentation>
    </xs:annotation>
    <xs:selector xpath="./g:data"/>
    <xs:field xpath="@key"/>
    <xs:field xpath="@time"/>
  </xs:unique>
  <xs:key name="node_id_key">
    <xs:annotation>
      <xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">Ensures: existence and uniqueness of the id attributes of each <node> element in this graph.</xs:documentation>
    </xs:annotation>
    <xs:selector xpath=".//g:node"/>
    <xs:field xpath="@id"/>
  </xs:key>
  <xs:unique name="edge_id_unique">
    <xs:annotation>
      <xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">Ensures: uniqueness of the id attributes of each <edge> element in this graph.</xs:documentation>
    </xs:annotation>
    <xs:selector xpath=".//g:edge"/>
    <xs:field xpath="@id"/>
  </xs:unique>
  <xs:unique name="hyperedge_id_unique">
    <xs:annotation>
      <xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">Ensures: uniqueness of the id attributes of each <hyperedge> element in this graph.</xs:documentation>
    </xs:annotation>
    <xs:selector xpath=".//g:hyperedge"/>
    <xs:field xpath="@id"/>
  </xs:unique>
  <xs:unique name="endpoint_id_unique">
    <xs:annotation>
      <xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">Ensures: uniqueness of the id attributes of each <endpoint> element in this graph.</xs:documentation>
    </xs:annotation>
    <xs:selector xpath=".//g:endpoint"/>
    <xs:field xpath="@id"/>
  </xs:unique>
  <xs:keyref name="edge_source_ref" refer="node_id_key">
    <xs:annotation>
      <xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">Ensures: for the source attribute of each <edge> in this graph, the existence of an id attribute of <node> which matches the value of it.</xs:documentation>
    </xs:annotation>
    <xs:selector xpath=".//g:edge"/>
    <xs:field xpath="@source"/>
  </xs:keyref>
  <xs:keyref name="edge_target_ref" refer="node_id_key">
    <xs:annotation>
      <xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">Ensures: for the target attribute of each <edge> in this graph, the existence of an id attribute of <node> which matches the value of it.</xs:documentation>
    </xs:annotation>
    <xs:selector xpath=".//g:edge"/>
    <xs:field xpath="@target"/>
  </xs:keyref>
  <xs:keyref name="endpoint_node_ref" refer="node_id_key">
    <xs:annotation>
      <xs:documentation source="http://graphml.graphdrawing.org/" xml:lang="en">Ensures: for the node attribute of each <endpoint> in this graph, the existence of an id attribute of <node> which matches the value of it.</xs:documentation>
    </xs:annotation>
    <xs:selector xpath=".//g:endpoint"/>
    <xs:field xpath="@node"/>
  </xs:keyref>
</xs:element>

Sample

< graph xmlns = "http://graphml.graphdrawing.org/xmlns/1.0rc" edgedefault = "directed" >

< node id = "n0" >

< data key = "k0" >

A

</ data>

< data key = "k1" >

62.6202

</ data>

< data key = "k2" >

410.914

</ data>

</ node>

< node id = "n1" >

< data key = "k0" >

B

</ data>

< data key = "k1" >

49.4147

</ data>

< data key = "k2" >

102.043

</ data>