diff -r dabad70db1bf -r 15e2df3e5610 svghmi/hmi_tree.ysl2 --- a/svghmi/hmi_tree.ysl2 Thu Aug 06 15:01:01 2020 +0200 +++ b/svghmi/hmi_tree.ysl2 Sat Aug 08 15:53:28 2020 +0200 @@ -107,9 +107,21 @@ attrib "value" > «.» const "path", "."; const "item", "$indexed_hmitree/*[@hmipath = $path]"; - if "count($item) = 1" { - attrib "index" > «$item/@index» - attrib "type" > «local-name($item)» + choose { + when "count($item) = 1" { + attrib "index" > «$item/@index» + attrib "type" > «local-name($item)» + } + otherwise { + choose { + when "regexp:test($path,'^\.[a-zA-Z0-9_]+')" { + attrib "type" > PAGE_LOCAL + } + when "regexp:test($path,'^[a-zA-Z0-9_]+')" { + attrib "type" > HMI_LOCAL + } + } + } } } }