--- a/svghmi/analyse_widget.xslt Fri Aug 12 13:35:59 2022 +0200
+++ b/svghmi/analyse_widget.xslt Fri Aug 12 16:52:15 2022 +0200
@@ -3,8 +3,37 @@
<xsl:output method="xml"/>
<xsl:variable name="indexed_hmitree" select="/.."/>
<xsl:variable name="pathregex" select="'^([^\[,]+)(\[[^\]]+\])?([-.\d,]*)$'"/>
+ <xsl:variable name="newline"> + <xsl:variable name="twonewlines" select="concat($newline,$newline)"/> <xsl:template mode="parselabel" match="*">
- <xsl:variable name="label" select="@inkscape:label"/>
+ <xsl:variable name="part" select="@inkscape:label"/> + <xsl:variable name="desc" select="svg:desc"/> + <xsl:variable name="len" select="string-length($part)"/> + <xsl:variable name="has_continuation" select="substring($part,$len,1)='\'"/> + <xsl:variable name="label"> + <xsl:when test="$has_continuation"> + <xsl:variable name="_continuation" select="substring-before($desc, $twonewlines)"/> + <xsl:variable name="continuation"> + <xsl:when test="$_continuation"> + <xsl:value-of select="$_continuation"/> + <xsl:value-of select="$desc"/> + <xsl:value-of select="concat(substring($part,1,$len - 1),translate($continuation,$newline,''))"/> + <xsl:value-of select="$part"/> <xsl:variable name="id" select="@id"/>
<xsl:variable name="description" select="substring-after($label,'HMI:')"/>
<xsl:variable name="_args" select="substring-before($description,'@')"/>
@@ -148,11 +177,23 @@
- <xsl:if test="svg:desc">
- <xsl:value-of select="svg:desc/text()"/>
+ <xsl:when test="$has_continuation"> + <xsl:variable name="_continuation" select="substring-after($desc, $twonewlines)"/> + <xsl:if test="$_continuation"> + <xsl:value-of select="$_continuation"/> + <xsl:value-of select="$desc/text()"/> --- a/svghmi/gen_dnd_widget_svg.xslt Fri Aug 12 13:35:59 2022 +0200
+++ b/svghmi/gen_dnd_widget_svg.xslt Fri Aug 12 16:52:15 2022 +0200
@@ -5,8 +5,37 @@
<xsl:variable name="widgetparams" select="ns:GetWidgetParams()"/>
<xsl:variable name="indexed_hmitree" select="/.."/>
<xsl:variable name="pathregex" select="'^([^\[,]+)(\[[^\]]+\])?([-.\d,]*)$'"/>
+ <xsl:variable name="newline"> + <xsl:variable name="twonewlines" select="concat($newline,$newline)"/> <xsl:template mode="parselabel" match="*">
- <xsl:variable name="label" select="@inkscape:label"/>
+ <xsl:variable name="part" select="@inkscape:label"/> + <xsl:variable name="desc" select="svg:desc"/> + <xsl:variable name="len" select="string-length($part)"/> + <xsl:variable name="has_continuation" select="substring($part,$len,1)='\'"/> + <xsl:variable name="label"> + <xsl:when test="$has_continuation"> + <xsl:variable name="_continuation" select="substring-before($desc, $twonewlines)"/> + <xsl:variable name="continuation"> + <xsl:when test="$_continuation"> + <xsl:value-of select="$_continuation"/> + <xsl:value-of select="$desc"/> + <xsl:value-of select="concat(substring($part,1,$len - 1),translate($continuation,$newline,''))"/> + <xsl:value-of select="$part"/> <xsl:variable name="id" select="@id"/>
<xsl:variable name="description" select="substring-after($label,'HMI:')"/>
<xsl:variable name="_args" select="substring-before($description,'@')"/>
@@ -150,11 +179,23 @@
- <xsl:if test="svg:desc">
- <xsl:value-of select="svg:desc/text()"/>
+ <xsl:when test="$has_continuation"> + <xsl:variable name="_continuation" select="substring-after($desc, $twonewlines)"/> + <xsl:if test="$_continuation"> + <xsl:value-of select="$_continuation"/> + <xsl:value-of select="$desc/text()"/> --- a/svghmi/gen_index_xhtml.xslt Fri Aug 12 13:35:59 2022 +0200
+++ b/svghmi/gen_index_xhtml.xslt Fri Aug 12 16:52:15 2022 +0200
@@ -160,8 +160,37 @@
<xsl:variable name="pathregex" select="'^([^\[,]+)(\[[^\]]+\])?([-.\d,]*)$'"/>
+ <xsl:variable name="newline"> + <xsl:variable name="twonewlines" select="concat($newline,$newline)"/> <xsl:template mode="parselabel" match="*">
- <xsl:variable name="label" select="@inkscape:label"/>
+ <xsl:variable name="part" select="@inkscape:label"/> + <xsl:variable name="desc" select="svg:desc"/> + <xsl:variable name="len" select="string-length($part)"/> + <xsl:variable name="has_continuation" select="substring($part,$len,1)='\'"/> + <xsl:variable name="label"> + <xsl:when test="$has_continuation"> + <xsl:variable name="_continuation" select="substring-before($desc, $twonewlines)"/> + <xsl:variable name="continuation"> + <xsl:when test="$_continuation"> + <xsl:value-of select="$_continuation"/> + <xsl:value-of select="$desc"/> + <xsl:value-of select="concat(substring($part,1,$len - 1),translate($continuation,$newline,''))"/> + <xsl:value-of select="$part"/> <xsl:variable name="id" select="@id"/>
<xsl:variable name="description" select="substring-after($label,'HMI:')"/>
<xsl:variable name="_args" select="substring-before($description,'@')"/>
@@ -305,11 +334,23 @@
- <xsl:if test="svg:desc">
- <xsl:value-of select="svg:desc/text()"/>
+ <xsl:when test="$has_continuation"> + <xsl:variable name="_continuation" select="substring-after($desc, $twonewlines)"/> + <xsl:if test="$_continuation"> + <xsl:value-of select="$_continuation"/> + <xsl:value-of select="$desc/text()"/> @@ -371,6 +412,11 @@
+ <xsl:value-of select="text()"/> <xsl:apply-templates mode="testtree" select="*">
<xsl:with-param name="indent">
<xsl:value-of select="concat($indent,'>')"/>
@@ -5600,6 +5646,12 @@
<xsl:text> this.disabled = !Number(value);
+ <xsl:text> // TODO : use RequestAnimate and animate() <xsl:text> this.update_state();
@@ -6347,6 +6399,8 @@
+ <xsl:text> // TODO : use RequestAnimate and animate()