<graph>

<graph> (graph) codifica un grafo, cioè una raccolta di nodi e archi che collegano i nodi [20.1 Graphs and Digraphs]
Modulo nets — Graphs, Networks, and Trees
Attributi
type⚓︎ descrive il tipo di grafo
Derivato da att.typed
Stato Consigliato
Tipo di dati teidata.enumerated
I valori suggeriti includono:
undirected
grafo non orientato
directed
grafo orientato
transitionNetwork
grafo orientato con nodi finale e iniziale distinti.
transducer
rete di transizione con un massimo di due etichette per arco
order⚓︎ definisce l'ordine del grafo, cioè il numero dei suoi nodi
Stato Opzionale
Tipo di dati teidata.count
size⚓︎ definisce la dimensione del grafo, cioè il numero dei suoi archi
Stato Opzionale
Tipo di dati teidata.count
Membro del
Contenuto in
Può contenere
Nota

One or more nodes and zero or more arcs in any order.

Esempio
<graph xml:id="cug1type="undirected"
 order="5size="4"
 rend="LABEL-PLACE bottom center NODE-FRAME none ARC solid line">

 <label>Airline Connections in Southwestern USA</label>
 <node xml:id="laxdegree="2">
  <label>LAX</label>
 </node>
 <node xml:id="lvgdegree="2">
  <label>LVG</label>
 </node>
 <node xml:id="phxdegree="3">
  <label>PHX</label>
 </node>
 <node xml:id="tusdegree="1">
  <label>TUS</label>
 </node>
 <node xml:id="cibdegree="0">
  <label>CIB</label>
 </node>
 <arc from="#laxto="#lvg"/>
 <arc from="#laxto="#phx"/>
 <arc from="#lvgto="#phx"/>
 <arc from="#phxto="#tus"/>
</graph>
Content model
<content>
 <sequence>
  <sequence minOccurs="0">
   <elementRef key="label"/>
   <classRef key="model.global"
    minOccurs="0maxOccurs="unbounded"/>

  </sequence>
  <alternate>
   <sequence>
    <sequence minOccurs="1"
     maxOccurs="unbounded">

     <elementRef key="node"/>
     <classRef key="model.global"
      minOccurs="0maxOccurs="unbounded"/>

    </sequence>
    <sequence minOccurs="0"
     maxOccurs="unbounded">

     <elementRef key="arc"/>
     <classRef key="model.global"
      minOccurs="0maxOccurs="unbounded"/>

    </sequence>
   </sequence>
   <sequence>
    <sequence minOccurs="1"
     maxOccurs="unbounded">

     <elementRef key="arc"/>
     <classRef key="model.global"
      minOccurs="0maxOccurs="unbounded"/>

    </sequence>
    <sequence minOccurs="1"
     maxOccurs="unbounded">

     <elementRef key="node"/>
     <classRef key="model.global"
      minOccurs="0maxOccurs="unbounded"/>

    </sequence>
   </sequence>
  </alternate>
 </sequence>
</content>
Dichiarazione
<rng:element name="graph">
 <rng:ref name="att.global.attributes"/>
 <rng:ref name="att.global.rendition.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:ref name="att.global.responsibility.attributes"/>
 <rng:ref name="att.global.source.attributes"/>
 <rng:ref name="att.typed.attribute.subtype"/>
 <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:ref name="teidata.enumerated"/>
   </rng:choice>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="order">
   <rng:ref name="teidata.count"/>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="size">
   <rng:ref name="teidata.count"/>
  </rng:attribute>
 </rng:optional>
 <rng:group>
  <rng:group>
   <rng:optional>
    <rng:ref name="label"/>
    <rng:zeroOrMore>
     <rng:ref name="model.global"/>
    </rng:zeroOrMore>
   </rng:optional>
  </rng:group>
  <rng:choice>
   <rng:group>
    <rng:group>
     <rng:oneOrMore>
      <rng:ref name="node"/>
      <rng:zeroOrMore>
       <rng:ref name="model.global"/>
      </rng:zeroOrMore>
     </rng:oneOrMore>
    </rng:group>
    <rng:group>
     <rng:zeroOrMore>
      <rng:ref name="arc"/>
      <rng:zeroOrMore>
       <rng:ref name="model.global"/>
      </rng:zeroOrMore>
     </rng:zeroOrMore>
    </rng:group>
   </rng:group>
   <rng:group>
    <rng:group>
     <rng:oneOrMore>
      <rng:ref name="arc"/>
      <rng:zeroOrMore>
       <rng:ref name="model.global"/>
      </rng:zeroOrMore>
     </rng:oneOrMore>
    </rng:group>
    <rng:group>
     <rng:oneOrMore>
      <rng:ref name="node"/>
      <rng:zeroOrMore>
       <rng:ref name="model.global"/>
      </rng:zeroOrMore>
     </rng:oneOrMore>
    </rng:group>
   </rng:group>
  </rng:choice>
 </rng:group>
</rng:element>
element graph
{
   att.global.attributes,
   att.global.rendition.attributes,
   att.global.linking.attributes,
   att.global.analytic.attributes,
   att.global.facs.attributes,
   att.global.change.attributes,
   att.global.responsibility.attributes,
   att.global.source.attributes,
   att.typed.attribute.subtype,
   attribute type
   {
      "undirected"
    | "directed"
    | "transitionNetwork"
    | "transducer"
    | teidata.enumerated
   }?,
   attribute order { teidata.count }?,
   attribute size { teidata.count }?,
   (
      ( ( label, model.global* )? ),
      (
         ( ( ( node, model.global* )+ ), ( ( arc, model.global* )* ) )
       | ( ( ( arc, model.global* )+ ), ( ( node, model.global* )+ ) )
      )
   )
}