<tree>

<tree> 標記一個樹狀結構,包含根節點、內部節點、葉節點、以及從根到葉的連線。 [19.2 Trees]
組件nets — 19 Graphs, Networks, and Trees
屬性att.global (@xml:id, @n, @xml:lang, @rend, @style, @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))
arity根節點所擁有的子節點數以及樹狀結構的內部節點數的最大值。
狀態 非必備的
資料類型

<rng:ref name="data.count"/>
data.count
A nonnegative integer.
ord (ordered) 說明樹狀結構是否整齊排列,或是部分整齊排列。
狀態 必備的
資料類型

<rng:ref name="data.enumerated"/>
data.enumerated
合法的值是:
true
樹狀結構的所有分支節點皆整齊排列。 [預設值]
partial
有些分支節點整齊排列,有些則否。
false
樹狀結構的所有分支節點皆未整齊排列。
order提供樹狀結構的次序,例如節點數目。
狀態 非必備的
資料類型

<rng:ref name="data.count"/>
data.count
A nonnegative integer.
屬於
可包含在於
可包含
core: label
宣告

<rng:element name="tree">
 <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="arity">
   <rng:ref name="data.count"/>
  </rng:attribute>
 </rng:optional>
 <rng:attribute name="ord" a:defaultValue="true">
  <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="data.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.linking.attributes,
   att.global.analytic.attributes,
   att.global.facs.attributes,
   att.global.change.attributes,
   attribute arity { data.count }?,
   attribute ord { "true" | "partial" | "false" },
   attribute order { data.count }?,
   ( label?, ( ( leaf | iNode )*, root, ( leaf | iNode )* ) )
}
例子
<tree
  n="ex2"
  arity="2"
  ord="partial"
  order="13">

 <root xml:id="G-div1" children="#G-plu1 #G-exp1" ord="true">
  <label>/</label>
 </root>
 <iNode
   xml:id="G-plu1"
   children="#G-exp2 #G-exp3"
   parent="#G-div1"
   ord="false">

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

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

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

  <label>**</label>
 </iNode>
 <iNode
   xml:id="G-plu2"
   children="#G-vara2 #G-varb2"
   parent="#G-exp1"
   ord="false">

  <label>+</label>
 </iNode>
 <leaf xml:id="G-vara1" parent="#G-exp2">
  <label>a</label>
 </leaf>
 <leaf xml:id="G-num2.1" parent="#G-exp2">
  <label>2</label>
 </leaf>
 <leaf xml:id="G-varb1" parent="#G-exp3">
  <label>b</label>
 </leaf>
 <leaf xml:id="G-num2.2" parent="#G-exp3">
  <label>2</label>
 </leaf>
 <leaf xml:id="G-vara2" parent="#G-plu2">
  <label>a</label>
 </leaf>
 <leaf xml:id="G-varb2" parent="#G-plu2">
  <label>b</label>
 </leaf>
 <leaf xml:id="G-num2.3" parent="#G-exp1">
  <label>2</label>
 </leaf>
</tree>