dotml:graph

The root element of a 'dot' graph.

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
bgcolor dotml:color optional
file-name xs:string required
fontcolor dotml:color optional
fontname xs:string optional
fontsize xs:decimal optional
label xs:string optional
margin dotml:point optional
nodesep xs:decimal optional
rankdir dotml:rankdir optional
ranksep xs:decimal optional
ratio dotml:ratio optional
size dotml:point optional

Source

<xs:element name="graph">
  <xs:annotation>
    <xs:documentation>The root element of a 'dot' graph.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:complexContent>
      <xs:extension base="dotml:cluster-or-graph">
        <xs:attribute name="file-name" type="xs:string" use="required"/>
        <xs:attribute name="margin" type="dotml:point"/>
        <xs:attribute name="nodesep" type="xs:decimal"/>
        <xs:attribute name="rankdir" type="dotml:rankdir"/>
        <xs:attribute name="ranksep" type="xs:decimal"/>
        <xs:attribute name="ratio" type="dotml:ratio"/>
        <xs:attribute name="size" type="dotml:point"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:key name="all-nodes-have-to-have-different-ids">
    <xs:selector xpath=".//dotml:node"/>
    <xs:field xpath="@id"/>
  </xs:key>
  <xs:key name="all-clusters-have-to-have-different-ids">
    <xs:selector xpath=".//dotml:cluster"/>
    <xs:field xpath="@id"/>
  </xs:key>
  <xs:keyref name="attribute-from-must-be-an-existing-node-id" refer="dotml:all-nodes-have-to-have-different-ids">
    <xs:selector xpath=".//dotml:edge"/>
    <xs:field xpath="@from"/>
  </xs:keyref>
  <xs:keyref name="attribute-to-must-be-an-existing-node-id" refer="dotml:all-nodes-have-to-have-different-ids">
    <xs:selector xpath=".//dotml:edge"/>
    <xs:field xpath="@to"/>
  </xs:keyref>
  <xs:keyref name="attribute-ltail-must-be-an-existing-cluster-id" refer="dotml:all-clusters-have-to-have-different-ids">
    <xs:selector xpath=".//dotml:edge"/>
    <xs:field xpath="@ltail"/>
  </xs:keyref>
  <xs:keyref name="attribute-lhead-must-be-an-existing-cluster-id" refer="dotml:all-clusters-have-to-have-different-ids">
    <xs:selector xpath=".//dotml:edge"/>
    <xs:field xpath="@lhead"/>
  </xs:keyref>
</xs:element>

Sample

< node label = "localize" fontname = "Arial" fontcolor = "#005A9C" fontsize = "11" style = "dashed" fillcolor = "#FFFFFF" id = "state_localize" shape = "Mcircle" />

< node label = "dont\nmove" fontcolor = "#005A9C" fontsize = "11" style = "filled" fillcolor = "#FFFFFF" fontname = "Arial" id = "state_dont_move" shape = "circle" />

< node label = "turn" fontcolor = "#005A9C" fontsize = "11" style = "filled" fillcolor = "#FFFFFF" fontname = "Arial" id = "state_turn" shape = "circle" />

< node label = "go" fontcolor = "#005A9C" fontsize = "11" style = "filled" fillcolor = "#FFFFFF" fontname = "Arial" id = "state_go" shape = "circle" />

< node id = "start" shape = "point" />

< node id = "start_0" label = "if" />

< node id = "start_1" label = "else if" />

< node id = "start_2" label = "else if" />

< node id = "start_3" label = "else if" />

< node id = "start_4" label = "else" />

< edge from = "start" to = "start_0" dir = "none" style = "solid" />

< node id = "start_0_" shape = "box" fontsize = "11" style = "solid" fontname = "Arial" label = "state\nrunning\nless than\n3 seconds" />

< edge from = "start_0" to = "start_0_" dir = "none" style = "solid" />

< edge from = "start_0_" minlen = "2" style = "solid" to = "state_localize" />

< node id = "start_1_" shape = "box" fontsize = "11" style = "solid" fontname = "Arial" label = "head switch\npressed\n(>100ms)" />

< edge from = "start_1" to = "start_1_" dir = "none" style = "solid" />

< edge from = "start_1_" minlen = "2" style = "solid" to = "state_dont_move" />

< node id = "start_2_" shape = "box" fontsize = "11" style = "solid" fontname = "Arial" label = "waited\ntoo long" />

< edge from = "start_2" to = "start_2_" dir = "none" style = "solid" />

< edge from = "start_2_" minlen = "2" style = "solid" to = "state_turn" />

< node id = "start_3_" shape = "box" fontsize = "11" style = "solid" fontname = "Arial" label = "not localized" />

< edge from = "start_3" to = "start_3_" dir = "none" style = "solid" />

< edge from = "start_3_" minlen = "2" style = "solid" to = "state_localize" />

< edge from = "start_4" minlen = "2" style = "solid" to = "state_go" />