diff -r 1a1caf71b1cc -r 211d6a185e31 svghmi/detachable_pages.ysl2 --- a/svghmi/detachable_pages.ysl2 Thu Apr 02 09:38:53 2020 +0200 +++ b/svghmi/detachable_pages.ysl2 Thu Apr 02 14:03:38 2020 +0200 @@ -7,6 +7,9 @@ const "hmi_pages_descs", "$parsed_widgets/widget[@type = 'Page']"; const "hmi_pages", "$hmi_elements[@id = $hmi_pages_descs/@id]"; +const "keypads_descs", "$parsed_widgets/widget[@type = 'Keypad']"; +const "keypads", "$hmi_elements[@id = $keypads_descs/@id]"; + const "default_page" choose { when "count($hmi_pages) > 1" { choose { @@ -58,7 +61,7 @@ const "required_elements", """//svg:defs/descendant-or-self::svg:* - | func:required_elements($hmi_pages)/ancestor-or-self::svg:*"""; + | func:required_elements($hmi_pages | $keypads)/ancestor-or-self::svg:*"""; const "discardable_elements", "//svg:*[not(@id = $required_elements/@id)]"; @@ -88,7 +91,7 @@ } // Avoid nested detachables -const "_detachable_elements", "func:detachable_elements($hmi_pages)"; +const "_detachable_elements", "func:detachable_elements($hmi_pages | $keypads)"; const "detachable_elements", "$_detachable_elements[not(ancestor::*/@id = $_detachable_elements/@id)]"; const "forEach_widgets_ids", "$parsed_widgets/widget[@type = 'ForEach']/@id";