--- a/svghmi/inline_svg.ysl2 Tue Jul 14 22:05:47 2020 +0200
+++ b/svghmi/inline_svg.ysl2 Fri Jul 17 12:19:53 2020 +0200
@@ -47,12 +47,17 @@
// For now, clone unlinkink applies to descendants of all widget except HMI:Page
// TODO: narrow application of clone unlinking to active elements,
// while keeping static decoration cloned
-const "to_unlink", "$hmi_elements[not(@id = $hmi_pages)]/descendant-or-self::svg:use";
+const "hmi_lists_descs", "$parsed_widgets/widget[@type = 'List']"; +const "hmi_lists", "$hmi_elements[@id = $hmi_lists_descs/@id]"; +const "targets_not_to_unlink", "$hmi_elements[@id = $hmi_lists/@id]/descendant::svg:*"; +const "to_unlink", "$hmi_elements[not(@id = $hmi_pages/@id)]/descendant-or-self::svg:use"; svgtmpl "svg:use", mode="inline_svg"
+ const "targetid","substring-after(@xlink:href,'#')"; - when "@id = $to_unlink/@id"
+ when "@id = $to_unlink/@id and not($targetid = $targets_not_to_unlink/@id)" { + call "unlink_clone" with "targetid", "$targetid"; xsl:copy apply "@* | node()", mode="inline_svg";
@@ -76,7 +81,7 @@
const "merge_use_attrs","exsl:node-set($_merge_use_attrs)";
- const "targetid","substring-after(@xlink:href,'#')";
const "target", "//svg:*[@id = $targetid]";
@@ -158,4 +163,8 @@
+ foreach "$targets_not_to_unlink"{