svghmi/analyse_widget.ysl2
author Edouard Tisserant <edouard.tisserant@gmail.com>
Mon, 03 May 2021 00:04:08 +0200
branchsvghmi
changeset 3235 b2b6bf45aa2d
child 3241 fe945f1f48b7
permissions -rw-r--r--
SVGHMI: Add analyse_widget stylesheet and python code to execute it, in order to obtain widget signature independently of DnD SVG file generation.
include yslt_noindent.yml2

istylesheet
            /* From Inkscape */
            xmlns:svg="http://www.w3.org/2000/svg"
            xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"

            extension-element-prefixes="ns func exsl regexp str dyn"
            exclude-result-prefixes="ns func exsl regexp str dyn svg inkscape" {

    const "indexed_hmitree", "/.."; // compatibility with parse_labels.ysl2
    include parse_labels.ysl2

    const "hmi_elements", "//svg:*[starts-with(@inkscape:label, 'HMI:')]";

    template "/"  
        widgets
            apply "$hmi_elements", mode="parselabel";

}