svghmi/gen_dnd_widget_svg.ysl2
author Edouard Tisserant <edouard.tisserant@gmail.com>
Tue, 13 Apr 2021 21:04:46 +0200
branchsvghmi
changeset 3229 c5be4fd425e7
parent 3225 cfa5690c8c15
child 3234 f2bfb047d0e6
permissions -rw-r--r--
SVGHMI: still quite naive path substitution whn prepearing widget for DnD, but now uses label generation.

Multiple widget DnD and mutiple variable still make no sense because all path are replaced with same path, but atleast min/max value are preserved...
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
include yslt_noindent.yml2
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
     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
     3
in xsl decl svgtmpl(match, xmlns="http://www.w3.org/2000/svg") alias 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
     4
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
     5
istylesheet
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
     6
            /* From Inkscape */
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
     7
            xmlns:dc="http://purl.org/dc/elements/1.1/"
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
     8
            xmlns:cc="http://creativecommons.org/ns#"
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
     9
            xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
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
    10
            xmlns:svg="http://www.w3.org/2000/svg"
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
    11
            xmlns:xlink="http://www.w3.org/1999/xlink"
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
    12
            xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
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
            xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
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
            xmlns:xhtml="http://www.w3.org/1999/xhtml"
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
    15
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
    16
            /* Namespace to invoke python code */
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
    17
            xmlns:ns="beremiz"
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
    18
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
    19
            extension-element-prefixes="ns func exsl regexp str dyn"
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
    20
            exclude-result-prefixes="ns func exsl regexp str dyn" {
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
    21
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
    22
    param "hmi_path";
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
    23
    const "svg", "/svg:svg";
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
    24
    const "hmi_elements", "//svg:*[starts-with(@inkscape:label, 'HMI:')]";
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
    25
    const "subhmitree", "ns:GetSubHMITree()";
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
    26
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
    27
    const "indexed_hmitree", "/.."; // compatibility with parse_labels.ysl2
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
    28
    include parse_labels.ysl2
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
    29
    const "_parsed_widgets" apply "$hmi_elements", mode="parselabel";
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
    30
    const "parsed_widgets","exsl:node-set($_parsed_widgets)";
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
    31
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
    32
    const "selected_node_type","local-name($subhmitree)";
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
    33
    const "svg_widget", "$parsed_widgets/widget[1]"; // TODO take all 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
    34
    const "svg_widget_type", "$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
    35
    const "svg_widget_path", "$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
    36
    const "svg_widget_count", "count($parsed_widgets/widget)";
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
    37
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
    38
    // Templates to change label paths(s)
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
    39
    template "@* | node()", mode="replace_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
    40
        xsl:copy apply "@* | node()", mode="replace_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
    41
    }
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
    42
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
    43
    template "path/@value", mode="replace_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
    44
        attrib "value" > «$hmi_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
    45
    }
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
    46
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
    47
    // all attribs are usually copied
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
    48
    svgtmpl "@*", mode="inline_svg" 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
    49
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
    50
    // except labels, ignored
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
    51
    svgtmpl "@inkscape:label[starts-with(., 'HMI:')]", mode="inline_svg";
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
    52
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
    53
    template "node()", mode="inline_svg" 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
    54
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
    55
      // in case this node widget's main element inject 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
    56
      if "@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
    57
          const "substituted_widget" apply "$svg_widget", mode="replace_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
    58
          const "substituted_widget_ns", "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
    59
          const "new_label" apply "$substituted_widget_ns", mode="genlabel";
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
    60
          attrib "inkscape:label" > «$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
    61
      }
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
    62
      // all nodes are copied as well
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
    63
      apply "@* | node()", mode="inline_svg";
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
    64
    }
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
    65
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
    66
    const "NODES_TYPES","str:split('HMI_ROOT HMI_NODE')";
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
    67
    const "HMI_NODES_COMPAT","str:split('Page Jump Foreach')";
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
    68
    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
    69
        comment > Widget dropped in Inkscape from Beremiz
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
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
    71
        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
    72
            when "$svg_widget_count < 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
    73
                error > No widget detected on selected SVG
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
    74
            when "$svg_widget_count > 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
    75
                error > Multiple widget DnD not yet supported
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
    76
            when """$selected_node_type = $NODES_TYPES and \
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
    77
                    not($svg_widget_type = $HMI_NODES_COMPAT)"""
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
    78
                error > Widget incompatible with selected HMI tree node
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
    79
        }
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
    80
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
    81
        const "testmsg" {
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
    82
            msg value "$hmi_path";
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
    83
            msg value "$selected_node_type";
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
    84
            msg value "$svg_widget_type";
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
    85
        }
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
    86
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
    87
        value "ns:GiveDetails($testmsg)";
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
    88
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
    89
        apply "/", mode="inline_svg";
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
    90
    }
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
    91
}