96 param "ancest"; |
96 param "ancest"; |
97 result "string-length($ancest) > 0 and starts-with($descend,$ancest)"; |
97 result "string-length($ancest) > 0 and starts-with($descend,$ancest)"; |
98 } |
98 } |
99 |
99 |
100 |
100 |
|
101 const "forEach_widgets_ids", "$parsed_widgets/widget[@type = 'ForEach']/@id"; |
|
102 const "forEach_widgets", "$hmi_elements[@id = $forEach_widgets_ids]"; |
|
103 const "in_forEach_widget_ids", "func:refered_elements($forEach_widgets)[not(@id = $forEach_widgets_ids)]/@id"; |
|
104 |
101 template "svg:*", mode="page_desc" { |
105 template "svg:*", mode="page_desc" { |
102 const "desc", "func:widget(@id)"; |
106 const "desc", "func:widget(@id)"; |
103 const "page", "."; |
107 const "page", "."; |
104 const "p", "$geometry[@Id = $page/@id]"; |
108 const "p", "$geometry[@Id = $page/@id]"; |
105 |
109 |
106 const "page_all_elements", "func:all_related_elements($page)"; |
110 const "page_all_elements", "func:all_related_elements($page)"; |
107 |
111 |
108 const "all_page_widgets","$hmi_elements[@id = $page_all_elements/@id and @id != $page/@id]"; |
112 const "all_page_widgets","$hmi_elements[@id = $page_all_elements/@id and @id != $page/@id and not(@id=$in_forEach_widget_ids)]"; |
109 |
|
110 const "page_relative_widgets", |
113 const "page_relative_widgets", |
111 "$all_page_widgets[func:is_descendant_path(func:widget(@id)/path/@value, $desc/path/@value)]"; |
114 "$all_page_widgets[func:is_descendant_path(func:widget(@id)/path/@value, $desc/path/@value)]"; |
112 |
115 |
113 // Take closest ancestor in detachable_elements |
116 // Take closest ancestor in detachable_elements |
114 // since nested detachable elements are filtered out |
117 // since nested detachable elements are filtered out |