svghmi/gen_dnd_widget_svg.xslt
author Edouard Tisserant <edouard.tisserant@gmail.com>
Fri, 12 Aug 2022 16:52:15 +0200
branchwxPython4
changeset 3582 7dcd0de97e6f
parent 3507 e87a2daace80
child 3615 5c983ead9db0
permissions -rw-r--r--
SVGHMI: update generated XSLT
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="/.."/>
3506
ca312be56929 SVGHMI: update generated xslt.
Edouard Tisserant
parents: 3414
diff changeset
     7
  <xsl:variable name="pathregex" select="'^([^\[,]+)(\[[^\]]+\])?([-.\d,]*)$'"/>
3582
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
     8
  <xsl:variable name="newline">
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
     9
    <xsl:text>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    10
</xsl:text>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    11
  </xsl:variable>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
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="*">
3582
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    14
    <xsl:variable name="part" select="@inkscape:label"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    15
    <xsl:variable name="desc" select="svg:desc"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    16
    <xsl:variable name="len" select="string-length($part)"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    17
    <xsl:variable name="has_continuation" select="substring($part,$len,1)='\'"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    18
    <xsl:variable name="label">
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    19
      <xsl:choose>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    20
        <xsl:when test="$has_continuation">
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    21
          <xsl:variable name="_continuation" select="substring-before($desc, $twonewlines)"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    22
          <xsl:variable name="continuation">
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    23
            <xsl:choose>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    24
              <xsl:when test="$_continuation">
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    25
                <xsl:value-of select="$_continuation"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    26
              </xsl:when>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    27
              <xsl:otherwise>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    28
                <xsl:value-of select="$desc"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    29
              </xsl:otherwise>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    30
            </xsl:choose>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    31
          </xsl:variable>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    32
          <xsl:value-of select="concat(substring($part,1,$len - 1),translate($continuation,$newline,''))"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    33
        </xsl:when>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    34
        <xsl:otherwise>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    35
          <xsl:value-of select="$part"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    36
        </xsl:otherwise>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
    37
      </xsl:choose>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
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"/>
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
    40
    <xsl:variable name="description" select="substring-after($label,'HMI:')"/>
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
    41
    <xsl:variable name="_args" select="substring-before($description,'@')"/>
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>
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
    48
          <xsl:value-of select="$description"/>
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>
c04c6db09eff SVGHMI: fix active/inactive being swapped in ToggleButton
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3414
diff changeset
    89
              <xsl:value-of select="$label"/>
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>
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
    98
        <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
    99
          <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
   100
            <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
   101
              <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
   102
            </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
   103
          </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
   104
        </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
   105
        <xsl:variable name="paths" select="substring-after($description,'@')"/>
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
   106
        <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
   107
          <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
   108
            <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
   109
              <xsl:variable name="path_match" select="regexp:match(.,$pathregex)"/>
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
   110
              <xsl:variable name="pathminmax" select="str:split($path_match[4],',')"/>
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
   111
              <xsl:variable name="path" select="$path_match[2]"/>
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
   112
              <xsl:variable name="path_accepts" 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
   113
              <xsl:variable name="pathminmaxcount" select="count($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
   114
              <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
   115
                <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
   116
              </xsl:attribute>
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
   117
              <xsl:if test="string-length($path_accepts)">
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
   118
                <xsl:attribute name="accepts">
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
   119
                  <xsl:value-of select="$path_accepts"/>
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
   120
                </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
   121
              </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
   122
              <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
   123
                <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
   124
                  <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
   125
                    <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
   126
                  </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
   127
                  <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
   128
                    <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
   129
                  </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
   130
                </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
   131
                <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
   132
                  <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
   133
                    <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
   134
                    <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
   135
                    <xsl:text> label:</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
   136
                    <xsl:value-of select="$label"/>
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
   137
                    <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
   138
                    <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
   139
                  </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
   140
                </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
   141
              </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
   142
              <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
   143
                <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
   144
                  <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
   145
                    <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
   146
                      <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
   147
                    </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
   148
                  </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
   149
                  <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
   150
                    <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
   151
                      <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
   152
                    </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
   153
                  </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
   154
                  <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
   155
                    <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
   156
                    <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
   157
                    <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
   158
                      <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
   159
                        <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
   160
                        <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
   161
                        <xsl:text> label:</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
   162
                        <xsl:value-of select="$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
   163
                        <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
   164
                        <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
   165
                        <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
   166
                      </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
   167
                    </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
   168
                    <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
   169
                      <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
   170
                        <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
   171
                      </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
   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: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
   174
                      </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
   175
                    </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
   176
                  </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
   177
                </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
   178
              </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
   179
            </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
   180
          </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
   181
        </xsl:for-each>
3582
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   182
        <xsl:choose>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   183
          <xsl:when test="$has_continuation">
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   184
            <xsl:variable name="_continuation" select="substring-after($desc, $twonewlines)"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   185
            <xsl:if test="$_continuation">
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   186
              <desc>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   187
                <xsl:value-of select="$_continuation"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   188
              </desc>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   189
            </xsl:if>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   190
          </xsl:when>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   191
          <xsl:otherwise>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   192
            <xsl:if test="$desc">
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   193
              <desc>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   194
                <xsl:value-of select="$desc/text()"/>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   195
              </desc>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   196
            </xsl:if>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   197
          </xsl:otherwise>
7dcd0de97e6f SVGHMI: update generated XSLT
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3507
diff changeset
   198
        </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
   199
      </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
   200
    </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
   201
  </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
   202
  <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
   203
    <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
   204
    <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
   205
  </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
   206
  <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
   207
    <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
   208
    <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
   209
    <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
   210
      <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
   211
      <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
   212
      <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
   213
      <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
   214
    </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
   215
  </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
   216
  <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
   217
    <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
   218
    <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
   219
    <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
   220
    <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
   221
  </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
   222
  <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
   223
    <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
   224
  </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
   225
  <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
   226
  <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
   227
  <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
   228
  <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
   229
  <xsl:variable name="svg_widget_count" select="count($parsed_widgets/widget)"/>
3264
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   230
  <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
   231
    <xsl:copy>
3264
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   232
      <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
   233
    </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
   234
  </xsl:template>
3264
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   235
  <xsl:template mode="replace_params" match="arg"/>
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   236
  <xsl:template mode="replace_params" match="path"/>
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   237
  <xsl:template mode="replace_params" match="widget">
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   238
    <xsl:copy>
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   239
      <xsl:apply-templates mode="replace_params" select="@* | node()"/>
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   240
      <xsl:copy-of select="$widgetparams/*"/>
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   241
    </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
   242
  </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
   243
  <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
   244
    <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
   245
  </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
   246
  <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
   247
  <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
   248
    <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
   249
      <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
   250
        <xsl:variable name="substituted_widget">
3264
51645afeded9 SVGHMI: update generated XSLT files
Edouard Tisserant
parents: 3234
diff changeset
   251
          <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
   252
        </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
   253
        <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
   254
        <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
   255
          <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
   256
        </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
   257
        <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
   258
          <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
   259
        </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
   260
      </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
   261
      <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
   262
    </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
   263
  </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
   264
  <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
   265
    <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
   266
      <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
   267
    </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
   268
    <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
   269
      <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
   270
        <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
   271
          <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
   272
        </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
   273
      </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
   274
      <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
   275
        <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
   276
          <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
   277
        </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
   278
      </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
   279
    </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
   280
    <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
   281
  </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
   282
</xsl:stylesheet>