diff -r 034b6ce4f885 -r ef13a4007538 svghmi/hmi_tree.ysl2 --- a/svghmi/hmi_tree.ysl2 Sun Apr 19 10:48:34 2020 +0200 +++ b/svghmi/hmi_tree.ysl2 Sun Apr 19 22:01:12 2020 +0200 @@ -14,6 +14,20 @@ const "_indexed_hmitree" apply "$hmitree", mode="index"; const "indexed_hmitree", "exsl:node-set($_indexed_hmitree)"; +emit "preamble:hmi-tree" { + | var hmi_hash = [«$hmitree/@hash»]; + | + | var heartbeat_index = «$indexed_hmitree/*[@hmipath = '/HEARTBEAT']/@index»; + | + | var hmitree_types = [ + + foreach "$indexed_hmitree/*" + | /* «@index» «@hmipath» */ "«substring(local-name(), 5)»"`if "position()!=last()" > ,` + + | ] + | +} + template "*", mode="index" { param "index", "0"; param "parentpath", "''"; @@ -110,7 +124,6 @@ result "$parsed_widgets/widget[@id = $id]"; } - def "func:is_descendant_path" { param "descend"; param "ancest"; @@ -136,6 +149,7 @@ with "indent" value "concat($indent,'>')" }; } + emit "debug:hmi-tree" { | Raw HMI tree apply "$hmitree", mode="testtree";