--- a/svghmi/gen_index_xhtml.xslt Tue Mar 17 07:39:50 2020 +0100
+++ b/svghmi/gen_index_xhtml.xslt Tue Mar 17 08:00:33 2020 +0100
@@ -215,6 +215,36 @@
+ <xsl:template mode="testtree" match="*"> + <xsl:param name="indent" select="''"/> + <xsl:value-of select="$indent"/> + <xsl:value-of select="local-name()"/> + <xsl:for-each select="@*"> + <xsl:value-of select="local-name()"/> + <xsl:text>="</xsl:text> + <xsl:value-of select="."/> + <xsl:text>" </xsl:text> + <xsl:apply-templates mode="testtree" select="*"> + <xsl:with-param name="indent"> + <xsl:value-of select="concat($indent,'>')"/> + <xsl:template name="debug_hmitree"> + <xsl:apply-templates mode="testtree" select="$hmitree"/> + <xsl:text>Indexed HMI tree + <xsl:apply-templates mode="testtree" select="$indexed_hmitree"/> <func:function name="func:is_descendant_path">
<xsl:param name="descend"/>
<xsl:param name="ancest"/>
@@ -345,10 +375,13 @@
- <xsl:apply-templates mode="testtree" select="$hmitree"/>
- <xsl:apply-templates mode="testtree" select="$indexed_hmitree"/>
+ <xsl:text>debug_hmitree: + <xsl:call-template name="debug_hmitree"/> @@ -1468,26 +1501,6 @@
- <xsl:template mode="testtree" match="*">
- <xsl:param name="indent" select="''"/>
- <xsl:value-of select="$indent"/>
- <xsl:value-of select="local-name()"/>
- <xsl:for-each select="@*">
- <xsl:value-of select="local-name()"/>
- <xsl:text>="</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>" </xsl:text>
- <xsl:apply-templates mode="testtree" select="*">
- <xsl:with-param name="indent">
- <xsl:value-of select="concat($indent,'>')"/>
<xsl:template name="defs_by_labels">
<xsl:param name="labels" select="''"/>
<xsl:param name="mandatory" select="'yes'"/>
--- a/svghmi/gen_index_xhtml.ysl2 Tue Mar 17 07:39:50 2020 +0100
+++ b/svghmi/gen_index_xhtml.ysl2 Tue Mar 17 08:00:33 2020 +0100
@@ -264,16 +264,9 @@
comment > Made with SVGHMI. https://beremiz.org
// use python to call all debug output from included definitions
- // '&bug' is a workaround for old pyPEG that choke on empty python results
- !"&bug "+"\n".join(["comment {|\n| %s:\n call \"%s\";\n| \n}"%(n,n) for n in debug_output_calls])!
+ // '&bug' is a workaround for pyPEG that choke on yml2 python results not parsing to a single call + !"&bug {"+"\n".join(["comment {\n| \n| %s:\n call \"%s\";\n| \n}"%(n,n) for n in debug_output_calls]) +"}"!
- apply "$hmitree", mode="testtree";
- apply "$indexed_hmitree", mode="testtree";
foreach "$detachable_elements"{
@@ -514,17 +507,6 @@
- template "*", mode="testtree"{
- > «$indent» «local-name()»
- foreach "@*" > «local-name()»="«.»"
- apply "*", mode="testtree" {
- with "indent" value "concat($indent,'>')"
function "defs_by_labels" {
--- a/svghmi/hmi_tree.ysl2 Tue Mar 17 07:39:50 2020 +0100
+++ b/svghmi/hmi_tree.ysl2 Tue Mar 17 08:00:33 2020 +0100
@@ -45,3 +45,22 @@
with "parentpath" > «$parentpath»
+template "*", mode="testtree"{ + > «$indent» «local-name()» + foreach "@*" > «local-name()»="«.»" + apply "*", mode="testtree" { + with "indent" value "concat($indent,'>')" +function "debug_hmitree" { + apply "$hmitree", mode="testtree"; + apply "$indexed_hmitree", mode="testtree"; +!debug_output_calls.append("debug_hmitree")