// HMI Tree computed from VARIABLES.CSV in svghmi.py
const "hmitree", "ns:GetHMITree()";
const "_indexed_hmitree" apply "$hmitree", mode="index";
const "indexed_hmitree", "exsl:node-set($_indexed_hmitree)";
template "*", mode="index" {
param "parentpath", "''";
when "local-name() = 'HMI_ROOT'" > «$parentpath»
otherwise > «$parentpath»/«@name»
when "not(local-name() = $categories/noindex)" {
attrib "index" > «$index»
attrib "hmipath" > «$path»
apply "*[1]", mode="index"{
with "index", "$index + 1";
with "parentpath" > «$path»
apply "*[1]", mode="index"{
with "parentpath" > «$path»
apply "following-sibling::*[1]", mode="index" {
with "index", "$index + count(exsl:node-set($content)/*)";
with "parentpath" > «$parentpath»
template "*", mode="testtree"{
> «$indent» «local-name()»
foreach "@*" > «local-name()»="«.»"
apply "*", mode="testtree" {
with "indent" value "concat($indent,'>')"
function "debug_hmitree" {
apply "$hmitree", mode="testtree";
apply "$indexed_hmitree", mode="testtree";
!debug_output_calls.append("debug_hmitree")