svghmi/gen_dnd_widget_svg.ysl2
branchsvghmi
changeset 3221 3d307ad803ea
child 3222 6adeeb16ac3e
equal deleted inserted replaced
3220:ec365ef396b1 3221:3d307ad803ea
       
     1 include yslt_noindent.yml2
       
     2 
       
     3 in xsl decl svgtmpl(match, xmlns="http://www.w3.org/2000/svg") alias template;
       
     4 
       
     5 istylesheet
       
     6             /* From Inkscape */
       
     7             xmlns:dc="http://purl.org/dc/elements/1.1/"
       
     8             xmlns:cc="http://creativecommons.org/ns#"
       
     9             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       
    10             xmlns:svg="http://www.w3.org/2000/svg"
       
    11             xmlns:xlink="http://www.w3.org/1999/xlink"
       
    12             xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
       
    13             xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
       
    14             xmlns:xhtml="http://www.w3.org/1999/xhtml"
       
    15 
       
    16             /* Namespace to invoke python code */
       
    17             xmlns:ns="beremiz"
       
    18 
       
    19             extension-element-prefixes="ns func exsl regexp str dyn"
       
    20             exclude-result-prefixes="ns func exsl regexp str dyn" {
       
    21 
       
    22     const "svg", "/svg:svg";
       
    23     const "hmi_elements", "//svg:*[starts-with(@inkscape:label, 'HMI:')]";
       
    24 
       
    25     include parse_labels.ysl2
       
    26 
       
    27     svgtmpl "@*", mode="inline_svg" xsl:copy;
       
    28 
       
    29     template "node()", mode="inline_svg" {
       
    30       xsl:copy apply "@* | node()", mode="inline_svg";
       
    31     }
       
    32 
       
    33     template "/" {
       
    34         comment > Widget dropped in Inkscape from Beremiz
       
    35 
       
    36         apply "/", mode="inline_svg";
       
    37     }
       
    38 }