<ASSEMBLY>
  <COUNT>{{child.base.amount}}</COUNT>
  <NN>{{child.base.NN}}</NN>
  <NB>{{child.base.NB}}</NB>
  <NT>{{child.base.NT}}</NT>
  <LINA>{{child.base.LINA}}</LINA>
  {% if addDimension%}
  <UNITBASE>{{child.dimension.unitName}}</UNITBASE>
  <DIMENSION>
    <X>{{child.dimension.x}}</X>
    <Y>{{child.dimension.y}}</Y>
    <Z>{{child.dimension.z}}</Z>
  </DIMENSION>
  {% endif %}
  {% if addTable %}
  <VARIABLES>
    {% for key, var in default(child.table.vars, {} ) %}
    <{{key}} unit="{{var.unit}}" desc="{{var.desc}}">{{var.value}}</{{key}}>
    {% endfor %}
  </VARIABLES>
  {% endif %}
  {% if not default(onlyMain, false) %}
  <SUBPARTS>
## for childSub in default(child.children, [])
    {% if (not childSub.base.isAssembly) and (childSub.base.isBom or default(allParts, false)) %}
      {% include "part" %}
      
    {% endif %}
## endfor
  </SUBPARTS>
  <SUBASSEMBLYS>
## for childSub in default(child.children, [])
    {% if (childSub.base.isAssembly) and (childSub.base.isBom or default(allParts, false)) %}
      {{ render("assembly", "child", childSub) }}      
    {% endif %}
## endfor
  </SUBASSEMBLYS>
  {% endif %}
</ASSEMBLY>