svghmi/gen_dnd_widget_svg.xslt
author Edouard Tisserant <edouard.tisserant@gmail.com>
Tue, 01 Aug 2023 21:04:00 +0200
changeset 3840 c2b6354f036f
parent 3630 921f620577e8
permissions -rw-r--r--
Tests: Add minimal SVGHMI test
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     1
<?xml version="1.0"?>
3234
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
     2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:regexp="http://exslt.org/regular-expressions" xmlns:str="http://exslt.org/strings" xmlns:func="http://exslt.org/functions" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:ns="beremiz" version="1.0" extension-element-prefixes="ns func exsl regexp str dyn" exclude-result-prefixes="ns func exsl regexp str dyn">
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     3
  <xsl:output method="xml"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     4
  <xsl:variable name="hmi_elements" select="//svg:*[starts-with(@inkscape:label, 'HMI:')]"/>
3264
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
     5
  <xsl:variable name="widgetparams" select="ns:GetWidgetParams()"/>
3222
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
     6
  <xsl:variable name="indexed_hmitree" select="/.."/>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
     7
  <xsl:variable name="pathregex" select="'^(\w+=)?([^,=]+)([-.\d,]*)$'"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
     8
  <xsl:variable name="newline">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
     9
    <xsl:text>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    10
</xsl:text>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    11
  </xsl:variable>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    12
  <xsl:variable name="twonewlines" select="concat($newline,$newline)"/>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    13
  <xsl:template mode="parselabel" match="*">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    14
    <xsl:variable name="label" select="@inkscape:label"/>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    15
    <xsl:variable name="desc" select="svg:desc"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    16
    <xsl:variable name="len" select="string-length($label)"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    17
    <xsl:variable name="has_continuation" select="substring($label,$len,1)='\'"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    18
    <xsl:variable name="full_decl">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    19
      <xsl:choose>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    20
        <xsl:when test="$has_continuation">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    21
          <xsl:variable name="_continuation" select="substring-before($desc, $twonewlines)"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    22
          <xsl:variable name="continuation">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    23
            <xsl:choose>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    24
              <xsl:when test="$_continuation">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    25
                <xsl:value-of select="$_continuation"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    26
              </xsl:when>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    27
              <xsl:otherwise>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    28
                <xsl:value-of select="$desc"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    29
              </xsl:otherwise>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    30
            </xsl:choose>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    31
          </xsl:variable>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    32
          <xsl:value-of select="concat(substring($label,1,$len - 1),translate($continuation,$newline,''))"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    33
        </xsl:when>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    34
        <xsl:otherwise>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    35
          <xsl:value-of select="$label"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    36
        </xsl:otherwise>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    37
      </xsl:choose>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    38
    </xsl:variable>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    39
    <xsl:variable name="id" select="@id"/>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    40
    <xsl:variable name="declaration" select="substring-after($full_decl,'HMI:')"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    41
    <xsl:variable name="_args" select="substring-before($declaration,'@')"/>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    42
    <xsl:variable name="args">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    43
      <xsl:choose>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    44
        <xsl:when test="$_args">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    45
          <xsl:value-of select="$_args"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    46
        </xsl:when>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    47
        <xsl:otherwise>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    48
          <xsl:value-of select="$declaration"/>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    49
        </xsl:otherwise>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    50
      </xsl:choose>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    51
    </xsl:variable>
3410
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    52
    <xsl:variable name="_typefreq" select="substring-before($args,':')"/>
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    53
    <xsl:variable name="typefreq">
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    54
      <xsl:choose>
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    55
        <xsl:when test="$_typefreq">
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    56
          <xsl:value-of select="$_typefreq"/>
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    57
        </xsl:when>
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    58
        <xsl:otherwise>
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    59
          <xsl:value-of select="$args"/>
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    60
        </xsl:otherwise>
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    61
      </xsl:choose>
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    62
    </xsl:variable>
3414
0ff608310312 SVGHMI: update generated xslt, and svghmi test project files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3410
diff changeset
    63
    <xsl:variable name="freq" select="substring-after($typefreq,'|')"/>
3410
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    64
    <xsl:variable name="_type" select="substring-before($typefreq,'|')"/>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    65
    <xsl:variable name="type">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    66
      <xsl:choose>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    67
        <xsl:when test="$_type">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    68
          <xsl:value-of select="$_type"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    69
        </xsl:when>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    70
        <xsl:otherwise>
3410
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    71
          <xsl:value-of select="$typefreq"/>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    72
        </xsl:otherwise>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    73
      </xsl:choose>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    74
    </xsl:variable>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    75
    <xsl:if test="$type">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    76
      <widget>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    77
        <xsl:attribute name="id">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    78
          <xsl:value-of select="$id"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    79
        </xsl:attribute>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    80
        <xsl:attribute name="type">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    81
          <xsl:value-of select="$type"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    82
        </xsl:attribute>
3414
0ff608310312 SVGHMI: update generated xslt, and svghmi test project files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3410
diff changeset
    83
        <xsl:if test="$freq">
3478
c04c6db09eff SVGHMI: fix active/inactive being swapped in ToggleButton
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3414
diff changeset
    84
          <xsl:if test="not(regexp:test($freq,'^[0-9]*(\.[0-9]+)?[smh]?'))">
c04c6db09eff SVGHMI: fix active/inactive being swapped in ToggleButton
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3414
diff changeset
    85
            <xsl:message terminate="yes">
c04c6db09eff SVGHMI: fix active/inactive being swapped in ToggleButton
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3414
diff changeset
    86
              <xsl:text>Widget id:</xsl:text>
c04c6db09eff SVGHMI: fix active/inactive being swapped in ToggleButton
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3414
diff changeset
    87
              <xsl:value-of select="$id"/>
c04c6db09eff SVGHMI: fix active/inactive being swapped in ToggleButton
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3414
diff changeset
    88
              <xsl:text> label:</xsl:text>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    89
              <xsl:value-of select="$full_decl"/>
3478
c04c6db09eff SVGHMI: fix active/inactive being swapped in ToggleButton
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3414
diff changeset
    90
              <xsl:text> has wrong syntax of frequency forcing </xsl:text>
c04c6db09eff SVGHMI: fix active/inactive being swapped in ToggleButton
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3414
diff changeset
    91
              <xsl:value-of select="$freq"/>
c04c6db09eff SVGHMI: fix active/inactive being swapped in ToggleButton
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3414
diff changeset
    92
            </xsl:message>
c04c6db09eff SVGHMI: fix active/inactive being swapped in ToggleButton
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3414
diff changeset
    93
          </xsl:if>
3414
0ff608310312 SVGHMI: update generated xslt, and svghmi test project files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3410
diff changeset
    94
          <xsl:attribute name="freq">
3410
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    95
            <xsl:value-of select="$freq"/>
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    96
          </xsl:attribute>
eac5832a1489 SVGHMI: update generated xslt
Edouard Tisserant
parents: 3264
diff changeset
    97
        </xsl:if>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    98
        <xsl:variable name="tail" select="substring-after($declaration,'@')"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
    99
        <xsl:variable name="taillen" select="string-length($tail)"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   100
        <xsl:variable name="has_enable" select="contains($tail, '#')"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   101
        <xsl:variable name="paths">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   102
          <xsl:choose>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   103
            <xsl:when test="$has_enable">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   104
              <xsl:value-of select="substring-before($tail,'#')"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   105
            </xsl:when>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   106
            <xsl:otherwise>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   107
              <xsl:value-of select="$tail"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   108
            </xsl:otherwise>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   109
          </xsl:choose>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   110
        </xsl:variable>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   111
        <xsl:if test="$has_enable">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   112
          <xsl:variable name="enable_expr" select="substring-after($tail,'#')"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   113
          <xsl:attribute name="enable_expr">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   114
            <xsl:value-of select="$enable_expr"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   115
          </xsl:attribute>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   116
        </xsl:if>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   117
        <xsl:for-each select="str:split(substring-after($args, ':'), ':')">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   118
          <arg>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   119
            <xsl:attribute name="value">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   120
              <xsl:value-of select="."/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   121
            </xsl:attribute>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   122
          </arg>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   123
        </xsl:for-each>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   124
        <xsl:for-each select="str:split($paths, '@')">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   125
          <xsl:if test="string-length(.) &gt; 0">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   126
            <path>
3234
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   127
              <xsl:variable name="path_match" select="regexp:match(.,$pathregex)"/>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   128
              <xsl:variable name="pathassign" select="substring-before($path_match[2],'=')"/>
3234
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   129
              <xsl:variable name="pathminmax" select="str:split($path_match[4],',')"/>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   130
              <xsl:variable name="path" select="$path_match[3]"/>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   131
              <xsl:variable name="pathminmaxcount" select="count($pathminmax)"/>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   132
              <xsl:if test="not($path)">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   133
                <xsl:message terminate="yes">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   134
                  <xsl:text>Widget id:</xsl:text>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   135
                  <xsl:value-of select="$id"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   136
                  <xsl:text> label:</xsl:text>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   137
                  <xsl:value-of select="$full_decl"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   138
                  <xsl:text> has wrong syntax</xsl:text>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   139
                </xsl:message>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   140
              </xsl:if>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   141
              <xsl:attribute name="value">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   142
                <xsl:value-of select="$path"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   143
              </xsl:attribute>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   144
              <xsl:if test="$pathassign">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   145
                <xsl:attribute name="assign">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   146
                  <xsl:value-of select="$pathassign"/>
3234
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   147
                </xsl:attribute>
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   148
              </xsl:if>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   149
              <xsl:choose>
3234
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   150
                <xsl:when test="$pathminmaxcount = 2">
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   151
                  <xsl:attribute name="min">
3234
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   152
                    <xsl:value-of select="$pathminmax[1]"/>
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   153
                  </xsl:attribute>
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   154
                  <xsl:attribute name="max">
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   155
                    <xsl:value-of select="$pathminmax[2]"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   156
                  </xsl:attribute>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   157
                </xsl:when>
3234
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   158
                <xsl:when test="$pathminmaxcount = 1 or $pathminmaxcount &gt; 2">
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   159
                  <xsl:message terminate="yes">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   160
                    <xsl:text>Widget id:</xsl:text>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   161
                    <xsl:value-of select="$id"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   162
                    <xsl:text> label:</xsl:text>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   163
                    <xsl:value-of select="$full_decl"/>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   164
                    <xsl:text> has wrong syntax of path section </xsl:text>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   165
                    <xsl:value-of select="$pathminmax"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   166
                  </xsl:message>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   167
                </xsl:when>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   168
              </xsl:choose>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   169
              <xsl:if test="$indexed_hmitree">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   170
                <xsl:choose>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   171
                  <xsl:when test="regexp:test($path,'^\.[a-zA-Z0-9_]+$')">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   172
                    <xsl:attribute name="type">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   173
                      <xsl:text>PAGE_LOCAL</xsl:text>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   174
                    </xsl:attribute>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   175
                  </xsl:when>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   176
                  <xsl:when test="regexp:test($path,'^[a-zA-Z0-9_]+$')">
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   177
                    <xsl:attribute name="type">
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   178
                      <xsl:text>HMI_LOCAL</xsl:text>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   179
                    </xsl:attribute>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   180
                  </xsl:when>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   181
                  <xsl:otherwise>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   182
                    <xsl:variable name="item" select="$indexed_hmitree/*[@hmipath = $path]"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   183
                    <xsl:variable name="pathtype" select="local-name($item)"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   184
                    <xsl:if test="$pathminmaxcount = 3 and not($pathtype = 'HMI_INT' or $pathtype = 'HMI_REAL')">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   185
                      <xsl:message terminate="yes">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   186
                        <xsl:text>Widget id:</xsl:text>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   187
                        <xsl:value-of select="$id"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   188
                        <xsl:text> label:</xsl:text>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   189
                        <xsl:value-of select="$full_decl"/>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   190
                        <xsl:text> path section </xsl:text>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   191
                        <xsl:value-of select="$pathminmax"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   192
                        <xsl:text> use min and max on non mumeric value</xsl:text>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   193
                      </xsl:message>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   194
                    </xsl:if>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   195
                    <xsl:if test="count($item) = 1">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   196
                      <xsl:attribute name="index">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   197
                        <xsl:value-of select="$item/@index"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   198
                      </xsl:attribute>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   199
                      <xsl:attribute name="type">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   200
                        <xsl:value-of select="$pathtype"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   201
                      </xsl:attribute>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   202
                    </xsl:if>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   203
                  </xsl:otherwise>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   204
                </xsl:choose>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   205
              </xsl:if>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   206
            </path>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   207
          </xsl:if>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   208
        </xsl:for-each>
3621
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   209
        <xsl:choose>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   210
          <xsl:when test="$has_continuation">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   211
            <xsl:variable name="_continuation" select="substring-after($desc, $twonewlines)"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   212
            <xsl:if test="$_continuation">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   213
              <desc>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   214
                <xsl:value-of select="$_continuation"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   215
              </desc>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   216
            </xsl:if>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   217
          </xsl:when>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   218
          <xsl:otherwise>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   219
            <xsl:if test="$desc">
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   220
              <desc>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   221
                <xsl:value-of select="$desc/text()"/>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   222
              </desc>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   223
            </xsl:if>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   224
          </xsl:otherwise>
da020d88db0c SVGHMI: update generated XSLT
Edouard Tisserant
parents: 3507
diff changeset
   225
        </xsl:choose>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   226
      </widget>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   227
    </xsl:if>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   228
  </xsl:template>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   229
  <xsl:template mode="genlabel" match="arg">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   230
    <xsl:text>:</xsl:text>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   231
    <xsl:value-of select="@value"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   232
  </xsl:template>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   233
  <xsl:template mode="genlabel" match="path">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   234
    <xsl:text>@</xsl:text>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   235
    <xsl:value-of select="@value"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   236
    <xsl:if test="string-length(@min)&gt;0 or string-length(@max)&gt;0">
3234
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   237
      <xsl:text>,</xsl:text>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   238
      <xsl:value-of select="@min"/>
3234
f2bfb047d0e6 SVGHMI: drop useless code from gen_dnd_widget.yslt2, renamed python callback to pass messages
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3229
diff changeset
   239
      <xsl:text>,</xsl:text>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   240
      <xsl:value-of select="@max"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   241
    </xsl:if>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   242
  </xsl:template>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   243
  <xsl:template mode="genlabel" match="widget">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   244
    <xsl:text>HMI:</xsl:text>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   245
    <xsl:value-of select="@type"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   246
    <xsl:apply-templates mode="genlabel" select="arg"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   247
    <xsl:apply-templates mode="genlabel" select="path"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   248
  </xsl:template>
3222
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   249
  <xsl:variable name="_parsed_widgets">
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   250
    <xsl:apply-templates mode="parselabel" select="$hmi_elements"/>
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   251
  </xsl:variable>
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   252
  <xsl:variable name="parsed_widgets" select="exsl:node-set($_parsed_widgets)"/>
3223
061796d9855e SVGHMI: Widget transform before DnD now should have HMI path as a parameter, but this path isn't computed for some reason... WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3222
diff changeset
   253
  <xsl:variable name="svg_widget" select="$parsed_widgets/widget[1]"/>
061796d9855e SVGHMI: Widget transform before DnD now should have HMI path as a parameter, but this path isn't computed for some reason... WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3222
diff changeset
   254
  <xsl:variable name="svg_widget_type" select="$svg_widget/@type"/>
061796d9855e SVGHMI: Widget transform before DnD now should have HMI path as a parameter, but this path isn't computed for some reason... WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3222
diff changeset
   255
  <xsl:variable name="svg_widget_path" select="$svg_widget/@path"/>
061796d9855e SVGHMI: Widget transform before DnD now should have HMI path as a parameter, but this path isn't computed for some reason... WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3222
diff changeset
   256
  <xsl:variable name="svg_widget_count" select="count($parsed_widgets/widget)"/>
3264
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   257
  <xsl:template mode="replace_params" match="@* | node()">
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   258
    <xsl:copy>
3264
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   259
      <xsl:apply-templates mode="replace_params" select="@* | node()"/>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   260
    </xsl:copy>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   261
  </xsl:template>
3264
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   262
  <xsl:template mode="replace_params" match="arg"/>
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   263
  <xsl:template mode="replace_params" match="path"/>
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   264
  <xsl:template mode="replace_params" match="widget">
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   265
    <xsl:copy>
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   266
      <xsl:apply-templates mode="replace_params" select="@* | node()"/>
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   267
      <xsl:copy-of select="$widgetparams/*"/>
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   268
    </xsl:copy>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   269
  </xsl:template>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   270
  <xsl:template xmlns="http://www.w3.org/2000/svg" mode="inline_svg" match="@*">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   271
    <xsl:copy/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   272
  </xsl:template>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   273
  <xsl:template xmlns="http://www.w3.org/2000/svg" mode="inline_svg" match="@inkscape:label[starts-with(., 'HMI:')]"/>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   274
  <xsl:template mode="inline_svg" match="node()">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   275
    <xsl:copy>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   276
      <xsl:if test="@id = $svg_widget/@id">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   277
        <xsl:variable name="substituted_widget">
3264
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   278
          <xsl:apply-templates mode="replace_params" select="$svg_widget"/>
3229
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   279
        </xsl:variable>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   280
        <xsl:variable name="substituted_widget_ns" select="exsl:node-set($substituted_widget)"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   281
        <xsl:variable name="new_label">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   282
          <xsl:apply-templates mode="genlabel" select="$substituted_widget_ns"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   283
        </xsl:variable>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   284
        <xsl:attribute name="inkscape:label">
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   285
          <xsl:value-of select="$new_label"/>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   286
        </xsl:attribute>
c5be4fd425e7 SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3225
diff changeset
   287
      </xsl:if>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   288
      <xsl:apply-templates mode="inline_svg" select="@* | node()"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   289
    </xsl:copy>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   290
  </xsl:template>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   291
  <xsl:template match="/">
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   292
    <xsl:comment>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   293
      <xsl:text>Widget dropped in Inkscape from Beremiz</xsl:text>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   294
    </xsl:comment>
3222
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   295
    <xsl:choose>
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   296
      <xsl:when test="$svg_widget_count &lt; 1">
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   297
        <xsl:message terminate="yes">
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   298
          <xsl:text>No widget detected on selected SVG</xsl:text>
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   299
        </xsl:message>
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   300
      </xsl:when>
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   301
      <xsl:when test="$svg_widget_count &gt; 1">
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   302
        <xsl:message terminate="yes">
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   303
          <xsl:text>Multiple widget DnD not yet supported</xsl:text>
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   304
        </xsl:message>
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   305
      </xsl:when>
6adeeb16ac3e SVGHMI: Widget DnD to Inkscape : Added source SVG widget label parsing and pass selecte HMI subtree to XSLT tranform, so that SVG containing multiple widgets can later be matched against hmi tree fragments, in order to DnD complex groups of widgets.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3221
diff changeset
   306
    </xsl:choose>
3221
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   307
    <xsl:apply-templates mode="inline_svg" select="/"/>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   308
  </xsl:template>
3d307ad803ea SVGHMI: Widget Library Picker now transforms SVG widget before allowing DnD. Transform is just identity forn now, but label parsing have already been included. To be continued.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   309
</xsl:stylesheet>