--- a/svghmi/detachable_pages.ysl2 Sat Apr 18 13:14:45 2020 +0200
+++ b/svghmi/detachable_pages.ysl2 Sat Apr 18 14:06:41 2020 +0200
@@ -157,9 +157,9 @@
template "*", mode="per_page_widget_template";
-reflect:detachable_pages;
-template "reflect:detachable-pages", mode="debug" {
+template "debug:detachable-pages", mode="debug" { foreach "$detachable_elements"{
--- a/svghmi/gen_index_xhtml.xslt Sat Apr 18 13:14:45 2020 +0200
+++ b/svghmi/gen_index_xhtml.xslt Sat Apr 18 14:06:41 2020 +0200
@@ -1,5 +1,5 @@
-<xsl:stylesheet xmlns:func="http://exslt.org/functions" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:str="http://exslt.org/strings" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:exsl="http://exslt.org/common" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:reflect="reflect" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ns="beremiz" xmlns:cc="http://creativecommons.org/ns#" xmlns:regexp="http://exslt.org/regular-expressions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" extension-element-prefixes="ns func exsl regexp str dyn" version="1.0" exclude-result-prefixes="ns str regexp exsl func dyn reflect">
+<xsl:stylesheet xmlns:func="http://exslt.org/functions" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:str="http://exslt.org/strings" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:exsl="http://exslt.org/common" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ns="beremiz" xmlns:cc="http://creativecommons.org/ns#" xmlns:regexp="http://exslt.org/regular-expressions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:debug="debug" xmlns:dc="http://purl.org/dc/elements/1.1/" extension-element-prefixes="ns func exsl regexp str dyn" version="1.0" exclude-result-prefixes="ns str regexp exsl func dyn debug"> <xsl:output method="xml" cdata-section-elements="xhtml:script"/>
<xsl:variable name="hmi_elements" select="//svg:*[starts-with(@inkscape:label, 'HMI:')]"/>
<xsl:variable name="hmitree" select="ns:GetHMITree()"/>
@@ -157,7 +157,7 @@
<xsl:variable name="class_b" select="$indexed_hmitree/*[@hmipath = $b]/@class"/>
<func:result select="$class_a and $class_b and $class_a = $class_b"/>
<xsl:template mode="testtree" match="*">
<xsl:param name="indent" select="''"/>
<xsl:value-of select="$indent"/>
@@ -178,7 +178,7 @@
- <xsl:template mode="debug" match="reflect:hmi-tree">
+ <xsl:template mode="debug" match="debug:hmi-tree"> <xsl:apply-templates mode="testtree" select="$hmitree"/>
@@ -195,8 +195,8 @@
<xsl:apply-templates mode="testtree" select="$parsed_widgets"/>
<xsl:variable name="geometry" select="ns:GetSVGGeometry()"/>
- <xsl:template mode="debug" match="reflect:geometry">
+ <xsl:template mode="debug" match="debug:geometry"> <xsl:for-each select="$geometry">
@@ -460,8 +460,8 @@
<xsl:template mode="per_page_widget_template" match="*"/>
- <reflect:detachable-pages/>
- <xsl:template mode="debug" match="reflect:detachable-pages">
+ <debug:detachable-pages/> + <xsl:template mode="debug" match="debug:detachable-pages"> <xsl:for-each select="$detachable_elements">
@@ -590,8 +590,8 @@
<xsl:apply-templates mode="inline_svg" select="/"/>
<xsl:variable name="result_svg_ns" select="exsl:node-set($result_svg)"/>
- <xsl:template mode="debug" match="reflect:inline-svg">
+ <xsl:template mode="debug" match="debug:inline-svg"> <xsl:for-each select="$to_unlink">
@@ -2079,6 +2079,7 @@
+ <xsl:apply-templates select="document('')/*/jspreamble"/> <xsl:text>var hmi_hash = [</xsl:text>
<xsl:value-of select="$hmitree/@hash"/>
@@ -3222,7 +3223,7 @@
- <xsl:template mode="debug_as_comment" match="*[namespace-uri()='reflect']">
+ <xsl:template mode="debug_as_comment" match="*[namespace-uri()='debug']"> <xsl:value-of select="local-name()"/>
@@ -3234,6 +3235,7 @@
<xsl:text>Made with SVGHMI. https://beremiz.org</xsl:text>
+ <xsl:apply-templates mode="debug_as_comment" select="document('')/*/debug:*"/> <html xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml">
<body style="margin:0;overflow:hidden;">
--- a/svghmi/gen_index_xhtml.ysl2 Sat Apr 18 13:14:45 2020 +0200
+++ b/svghmi/gen_index_xhtml.ysl2 Sat Apr 18 14:06:41 2020 +0200
@@ -13,12 +13,12 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xmlns:reflect="reflect"
/* Our namespace to invoke python code */
extension-element-prefixes="ns func exsl regexp str dyn"
- exclude-result-prefixes="ns str regexp exsl func dyn reflect" {
+ exclude-result-prefixes="ns str regexp exsl func dyn debug" { const "hmi_elements", "//svg:*[starts-with(@inkscape:label, 'HMI:')]";
@@ -37,7 +37,7 @@
- template "*[namespace-uri()='reflect']", mode="debug_as_comment" {
+ template "*[namespace-uri()='debug']", mode="debug_as_comment" { @@ -48,7 +48,7 @@
comment > Made with SVGHMI. https://beremiz.org
// all debug output from included definitions, as comments
- // apply "document('')/*/reflect:*", mode="debug_as_comment";
+ // apply "document('')/*/debug:*", mode="debug_as_comment"; html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg"
--- a/svghmi/geometry.ysl2 Sat Apr 18 13:14:45 2020 +0200
+++ b/svghmi/geometry.ysl2 Sat Apr 18 14:06:41 2020 +0200
@@ -7,10 +7,10 @@
// <bbox x="0" y="0" w="42" h="42">
const "geometry", "ns:GetSVGGeometry()";
-template "reflect:geometry", mode="debug" {
+template "debug:geometry", mode="debug" { | «@Id» «@x» «@y» «@w» «@h»
--- a/svghmi/hmi_tree.ysl2 Sat Apr 18 13:14:45 2020 +0200
+++ b/svghmi/hmi_tree.ysl2 Sat Apr 18 14:06:41 2020 +0200
@@ -126,7 +126,7 @@
result "$class_a and $class_b and $class_a = $class_b";
template "*", mode="testtree"{
@@ -138,7 +138,7 @@
with "indent" value "concat($indent,'>')"
-template "reflect:hmi-tree", mode="debug" {
+template "debug:hmi-tree", mode="debug" { apply "$hmitree", mode="testtree";
--- a/svghmi/inline_svg.ysl2 Sat Apr 18 13:14:45 2020 +0200
+++ b/svghmi/inline_svg.ysl2 Sat Apr 18 14:06:41 2020 +0200
@@ -115,8 +115,8 @@
const "result_svg" apply "/", mode="inline_svg";
const "result_svg_ns", "exsl:node-set($result_svg)";
-template "reflect:inline-svg", mode="debug" {
+template "debug:inline-svg", mode="debug" {