// widget_list.ysl2 template "widget[@type='List']", mode="widget_defs" { param "hmi_element"; | items: { foreach "$hmi_element/*[@inkscape:label]" { | «@inkscape:label»: "«@id»", } | }, } template "widget[@type='TextStyleList']", mode="widget_defs" { param "hmi_element"; | styles: { foreach "$hmi_element/*[@inkscape:label]" { const "text", "func:refered_elements(.)[self::svg:text][1]"; const "tspan", "$text/svg:tspan[1]"; const "style" choose { when "$text/@style and $tspan/@style" > «$text/@style»;«$tspan/@style» otherwise > «$text/@style»«$tspan/@style» } | «@inkscape:label»: "«$style»", } | }, }