<tree>

<tree> (tree) codifica un albero, che è costituito da radice, nodi interni, foglie, e archi che collegano radice e foglie [19.2 Trees]
Modulo nets — Graphs, Networks, and Trees
Attributi
arity⚓︎ stabilisce il numero massimo di figli della radice e dei nodi interni dell'albero
Stato Opzionale
Tipo di dati teidata.count
ord⚓︎ (ordinato) indica se l'albero è ordinato o parzialmente ordinato
Stato Richiesto
Tipo di dati teidata.enumerated
I valori legali sono:
true
indica che tutti i nodi ramo dell'albero sono ordinati
partial
indica che alcuni dei nodi ramo dell'albero sono ordinati e che altri non lo sono
false
indica che tutti i nodi ramo dell'albero non sono ordinati
order⚓︎ indica l'ordine dell'albero, cioè il numero dei suoi nodi
Stato Opzionale
Tipo di dati teidata.count
Membro del
Contenuto in
Può contenere
core: label
Nota

A root, and zero or more internal nodes and leaves, but if there is an internal node, there must also be at least one leaf.

Esempio
<tree n="ex2arity="2ord="partial"
 order="13">

 <root xml:id="G-div1"
  children="#G-plu1 #G-exp1ord="true">

  <label>/</label>
 </root>
 <iNode xml:id="G-plu1"
  children="#G-exp2 #G-exp3parent="#G-div1ord="false">

  <label>+</label>
 </iNode>
 <iNode xml:id="G-exp1"
  children="#G-plu2 #G-num2.3parent="#G-div1ord="true">

  <label>**</label>
 </iNode>
 <iNode xml:id="G-exp2"
  children="#G-vara1 #G-num2.1parent="#G-plu1ord="true">

  <label>**</label>
 </iNode>
 <iNode xml:id="G-exp3"
  children="#G-varb1 #G-num2.2parent="#G-plu1ord="true">

  <label>**</label>
 </iNode>
 <iNode xml:id="G-plu2"
  children="#G-vara2 #G-varb2parent="#G-exp1ord="false">

  <label>+</label>
 </iNode>
 <leaf xml:id="G-vara1parent="#G-exp2">
  <label>a</label>
 </leaf>
 <leaf xml:id="G-num2.1parent="#G-exp2">
  <label>2</label>
 </leaf>
 <leaf xml:id="G-varb1parent="#G-exp3">
  <label>b</label>
 </leaf>
 <leaf xml:id="G-num2.2parent="#G-exp3">
  <label>2</label>
 </leaf>
 <leaf xml:id="G-vara2parent="#G-plu2">
  <label>a</label>
 </leaf>
 <leaf xml:id="G-varb2parent="#G-plu2">
  <label>b</label>
 </leaf>
 <leaf xml:id="G-num2.3parent="#G-exp1">
  <label>2</label>
 </leaf>
</tree>
Content model
<content>
 <sequence>
  <elementRef key="labelminOccurs="0"/>
  <sequence>
   <alternate minOccurs="0"
    maxOccurs="unbounded">

    <elementRef key="leaf"/>
    <elementRef key="iNode"/>
   </alternate>
   <elementRef key="root"/>
   <alternate minOccurs="0"
    maxOccurs="unbounded">

    <elementRef key="leaf"/>
    <elementRef key="iNode"/>
   </alternate>
  </sequence>
 </sequence>
</content>
Dichiarazione
<rng:element name="tree">
 <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:optional>
  <rng:attribute name="arity">
   <rng:ref name="teidata.count"/>
  </rng:attribute>
 </rng:optional>
 <rng:attribute name="ord">
  <rng:choice>
   <rng:value>true</rng:value>
   <rng:value>partial</rng:value>
   <rng:value>false</rng:value>
  </rng:choice>
 </rng:attribute>
 <rng:optional>
  <rng:attribute name="order">
   <rng:ref name="teidata.count"/>
  </rng:attribute>
 </rng:optional>
 <rng:group>
  <rng:optional>
   <rng:ref name="label"/>
  </rng:optional>
  <rng:group>
   <rng:zeroOrMore>
    <rng:choice>
     <rng:ref name="leaf"/>
     <rng:ref name="iNode"/>
    </rng:choice>
   </rng:zeroOrMore>
   <rng:ref name="root"/>
   <rng:zeroOrMore>
    <rng:choice>
     <rng:ref name="leaf"/>
     <rng:ref name="iNode"/>
    </rng:choice>
   </rng:zeroOrMore>
  </rng:group>
 </rng:group>
</rng:element>
element tree
{
   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,
   attribute arity { teidata.count }?,
   attribute ord { "true" | "partial" | "false" },
   attribute order { teidata.count }?,
   ( label?, ( ( leaf | iNode )*, root, ( leaf | iNode )* ) )
}