--- a/svghmi/inline_svg.ysl2 Thu Aug 13 11:37:39 2020 +0200
+++ b/svghmi/inline_svg.ysl2 Sat Aug 15 18:46:35 2020 +0200
@@ -49,14 +49,18 @@
// while keeping static decoration cloned
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 "targets_not_to_unlink", "$hmi_lists/descendant-or-self::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 and not($targetid = $targets_not_to_unlink/@id)" {
- call "unlink_clone" with "targetid", "$targetid";
+ with "targetid", "$targetid"; xsl:copy apply "@* | node()", mode="inline_svg";
@@ -71,6 +75,7 @@
const "excluded_use_attrs","exsl:node-set($_excluded_use_attrs)";
@@ -82,8 +87,11 @@
const "target", "//svg:*[@id = $targetid]";
+ const "seeded_id","concat($seed, @id)"; + attrib "id" value "$seeded_id"; when "$target[self::svg:g]" {
foreach "@*[not(local-name() = $excluded_use_attrs/name | $merge_use_attrs)]"
@@ -104,7 +112,7 @@
apply "$target/*", mode="unlink_clone"{
+ with "seed","concat($seed, @id)"; @@ -113,7 +121,7 @@
apply "$target", mode="unlink_clone"{
+ with "seed","concat($seed, @id)"; @@ -129,6 +137,11 @@
svgtmpl "@*", mode="unlink_clone" xsl:copy;
+svgtmpl "svg:use", mode="unlink_clone" { + apply "." mode="inline_svg" with "seed","concat($seed, '_')"; // copying widgets would have unwanted effect
// instead widget is refered through a svg:use.
svgtmpl "svg:*", mode="unlink_clone" {