--- a/svghmi/detachable_pages.ysl2 Sun May 10 17:01:09 2020 +0200
+++ b/svghmi/detachable_pages.ysl2 Sun May 10 23:40:43 2020 +0200
@@ -131,7 +131,7 @@
ancestor-or-self::*[@id = $detachable_elements/@id]""";
| "«$desc/arg[1]/@value»": {
- | widget: hmi_widgets["«@id»"],
+ //| widget: hmi_widgets["«@id»"], | bbox: [«$p/@x», «$p/@y», «$p/@w», «$p/@h»],
if "count($desc/path/@index)=0"
--- a/svghmi/gen_index_xhtml.xslt Sun May 10 17:01:09 2020 +0200
+++ b/svghmi/gen_index_xhtml.xslt Sun May 10 23:40:43 2020 +0200
@@ -472,10 +472,6 @@
<xsl:value-of select="$desc/arg[1]/@value"/>
- <xsl:text> widget: hmi_widgets["</xsl:text>
- <xsl:value-of select="@id"/>
<xsl:text> bbox: [</xsl:text>
<xsl:value-of select="$p/@x"/>
@@ -781,7 +777,7 @@
- <xsl:template mode="hmi_elements" match="svg:*">
+ <xsl:template mode="hmi_widgets" match="svg:*"> <xsl:variable name="widget" select="func:widget(@id)"/>
<xsl:variable name="eltid" select="@id"/>
<xsl:variable name="args">
@@ -974,6 +970,8 @@
+ <xsl:variable name="excluded_types" select="str:split('Page Lang List')"/> + <xsl:variable name="excluded_ids" select="$parsed_widgets/widget[not(@type = $excluded_types)]/@id"/> <xsl:template match="preamble:hmi-elements">
@@ -986,7 +984,7 @@
<xsl:text>var hmi_widgets = {
- <xsl:apply-templates mode="hmi_elements" select="$hmi_elements"/>
+ <xsl:apply-templates mode="hmi_widgets" select="$hmi_elements[@id = $excluded_ids]"/> --- a/svghmi/widgets_common.ysl2 Sun May 10 17:01:09 2020 +0200
+++ b/svghmi/widgets_common.ysl2 Sun May 10 23:40:43 2020 +0200
@@ -21,7 +21,7 @@
-template "svg:*", mode="hmi_elements" {
+template "svg:*", mode="hmi_widgets" { const "widget", "func:widget(@id)";
const "args" foreach "$widget/arg" > "«@value»"`if "position()!=last()" > ,`
@@ -117,9 +117,12 @@
+const "excluded_types", "str:split('Page Lang List')"; +const "excluded_ids","$parsed_widgets/widget[not(@type = $excluded_types)]/@id"; emit "preamble:hmi-elements" {
- apply "$hmi_elements", mode="hmi_elements";
+ apply "$hmi_elements[@id = $excluded_ids]", mode="hmi_widgets";