--- a/svghmi/gen_index_xhtml.ysl2 Fri Mar 13 10:36:13 2020 +0100
+++ b/svghmi/gen_index_xhtml.ysl2 Fri Mar 13 21:42:40 2020 +0100
@@ -306,9 +306,9 @@
def "func:is_descendant_path" {
+ param "descend";
param "ancest";
- param "descend";
- result "starts-with($descend,$ancest)";
+ result "string-length($ancest) > 0 and starts-with($descend,$ancest)";
}
//////////////// Inline SVG
@@ -603,7 +603,7 @@
const "all_page_widgets","$hmi_elements[@id = $page_all_elements/@id and @id != $page/@id]";
const "page_relative_widgets",
- "$all_page_widgets[func:is_descendant_path($desc/path/@value, path/@value)]";
+ "$all_page_widgets[func:is_descendant_path(func:parselabel(@inkscape:label)/widget/path/@value, $desc/path/@value)]";
// Take closest ancestor in detachable_elements
// since nested detachable elements are filtered out