<graph>

<graph> encodes a graph, which is a collection of nodes, and arcs which connect the nodes. [19.1 Graphs and Digraphs]
組件nets — 19 Graphs, Networks, and Trees
屬性att.global (@xml:id, @n, @xml:lang, @rend, @rendition, @xml:base, @xml:space) (att.global.linking (@corresp, @synch, @sameAs, @copyOf, @next, @prev, @exclude, @select)) (att.global.analytic (@ana)) (att.global.facs (@facs)) (att.global.change (@change))
typedescribes the type of graph.
狀態 推薦的
資料類型

<rng:ref name="data.enumerated"/>
data.enumerated
被推薦的值包含:
undirected
undirected graph
directed
directed graph
transitionNetwork
a directed graph with distinguished initial and final nodes
transducer
a transition network with up to two labels on each arc
orderstates the order of the graph, i.e., the number of its nodes.
狀態 非必備的
資料類型

<rng:ref name="data.count"/>
data.count
A positive integer.
sizestates the size of the graph, i.e., the number of its arcs.
狀態 非必備的
資料類型

<rng:ref name="data.count"/>
data.count
A non-negative integer.
屬於
可包含在於
可包含
宣告

<rng:element name="graph">
 <rng:ref name="att.global.attributes"/>
 <rng:ref name="att.global.linking.attributes"/>
 <rng:ref name="att.global.analytic.attributes"/>
 <rng:ref name="att.global.facs.attributes"/>
 <rng:ref name="att.global.change.attributes"/>
 <rng:optional>
  <rng:attribute name="type">
   <rng:choice>
    <rng:value>undirected</rng:value>
    <rng:value>directed</rng:value>
    <rng:value>transitionNetwork</rng:value>
    <rng:value>transducer</rng:value>
    <rng:data type="Name"/>
   </rng:choice>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="order">
   <rng:ref name="data.count"/>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="size">
   <rng:ref name="data.count"/>
  </rng:attribute>
 </rng:optional>
 <rng:group>
  <rng:optional>
   <rng:ref name="label"/>
   <rng:zeroOrMore>
    <rng:ref name="model.global"/>
   </rng:zeroOrMore>
  </rng:optional>
  <rng:choice>
   <rng:group>
    <rng:oneOrMore>
     <rng:ref name="node"/>
     <rng:zeroOrMore>
      <rng:ref name="model.global"/>
     </rng:zeroOrMore>
    </rng:oneOrMore>
    <rng:zeroOrMore>
     <rng:ref name="arc"/>
     <rng:zeroOrMore>
      <rng:ref name="model.global"/>
     </rng:zeroOrMore>
    </rng:zeroOrMore>
   </rng:group>
   <rng:group>
    <rng:oneOrMore>
     <rng:ref name="arc"/>
     <rng:zeroOrMore>
      <rng:ref name="model.global"/>
     </rng:zeroOrMore>
    </rng:oneOrMore>
    <rng:oneOrMore>
     <rng:ref name="node"/>
     <rng:zeroOrMore>
      <rng:ref name="model.global"/>
     </rng:zeroOrMore>
    </rng:oneOrMore>
   </rng:group>
  </rng:choice>
 </rng:group>
</rng:element>
element graph
{
   att.global.attributes,
   att.global.linking.attributes,
   att.global.analytic.attributes,
   att.global.facs.attributes,
   att.global.change.attributes,
   attribute type
   {
      "undirected" | "directed" | "transitionNetwork" | "transducer" | xsd:Name
   }?,
   attribute order { data.count }?,
   attribute size { data.count }?,
   (
      ( label, model.global* )?,
      (
         ( ( node, model.global* )+, ( arc, model.global* )* )
       | ( ( arc, model.global* )+, ( node, model.global* )+ )
      )
   )
}
例子
<graph
  xml:id="cug1"
  type="undirected"
  order="5"
  size="4"
  rend="LABEL-PLACE bottom center NODE-FRAME none ARC solid line">

 <label>Airline Connections in Southwestern USA</label>
 <node xml:id="lax" degree="2">
  <label>LAX</label>
 </node>
 <node xml:id="lvg" degree="2">
  <label>LVG</label>
 </node>
 <node xml:id="phx" degree="3">
  <label>PHX</label>
 </node>
 <node xml:id="tus" degree="1">
  <label>TUS</label>
 </node>
 <node xml:id="cib" degree="0">
  <label>CIB</label>
 </node>
 <arc from="#lax" to="#lvg"/>
 <arc from="#lax" to="#phx"/>
 <arc from="#lvg" to="#phx"/>
 <arc from="#phx" to="#tus"/>
</graph>