diff -r 6f5cd8d5dc11 -r 13c5cac55ac7 svghmi/parse_labels.ysl2 --- a/svghmi/parse_labels.ysl2 Sun Jan 16 16:59:40 2022 +0100 +++ b/svghmi/parse_labels.ysl2 Tue Jan 18 10:55:14 2022 +0100 @@ -2,7 +2,7 @@ // Parses: -// "HMI:WidgetType:param1:param2@path1,path1min,path1max@path2" +// "HMI:WidgetType|freq:param1:param2@path1,path1min,path1max@path2" // // Into: // widget type="WidgetType" id="blah456" { @@ -28,15 +28,23 @@ otherwise value "$description"; } - const "_type", "substring-before($args,':')"; - const "type" choose { - when "$_type" value "$_type"; + const "_typefreq", "substring-before($args,':')"; + const "typefreq" choose { + when "$_typefreq" value "$_typefreq"; otherwise value "$args"; } + const "freq", "substring-after($typefreq,':')"; + + const "_type", "substring-before($typefreq,'|')"; + const "type" choose { + when "$_type" value "$_type"; + otherwise value "$typefreq"; + } if "$type" widget { attrib "id" > «$id» attrib "type" > «$type» + if "freq" attrib "frequency" > «$freq» foreach "str:split(substring-after($args, ':'), ':')" { arg { attrib "value" > «.»