svghmi/gen_index_xhtml.ysl2
branchsvghmi
changeset 2943 304e88bae115
parent 2941 ef13a4007538
child 2947 25f593573579
equal deleted inserted replaced
2942:b07ad97e6019 2943:304e88bae115
    23             xmlns:xhtml="http://www.w3.org/1999/xhtml"
    23             xmlns:xhtml="http://www.w3.org/1999/xhtml"
    24 
    24 
    25             /* Internal namespaces to allow emit code/content from anywhere */
    25             /* Internal namespaces to allow emit code/content from anywhere */
    26             xmlns:debug="debug"
    26             xmlns:debug="debug"
    27             xmlns:preamble="preamble"
    27             xmlns:preamble="preamble"
       
    28             xmlns:declarations="declarations"
       
    29             xmlns:definitions="definitions"
    28             xmlns:epilogue="epilogue"
    30             xmlns:epilogue="epilogue"
    29 
    31 
    30             /* Namespace to invoke python code */
    32             /* Namespace to invoke python code */
    31             xmlns:ns="beremiz"
    33             xmlns:ns="beremiz"
    32 
    34 
    33             extension-element-prefixes="ns func exsl regexp str dyn"
    35             extension-element-prefixes="ns func exsl regexp str dyn"
    34             exclude-result-prefixes="ns func exsl regexp str dyn debug preamble epilogue" {
    36             exclude-result-prefixes="ns func exsl regexp str dyn debug preamble epilogue declarations definitions" {
    35 
    37 
    36     const "svg", "/svg:svg";
    38     const "svg", "/svg:svg";
    37     const "hmi_elements", "//svg:*[starts-with(@inkscape:label, 'HMI:')]";
    39     const "hmi_elements", "//svg:*[starts-with(@inkscape:label, 'HMI:')]";
    38 
    40 
    39 
    41 
    67             head;
    69             head;
    68             body style="margin:0;overflow:hidden;" {
    70             body style="margin:0;overflow:hidden;" {
    69                 // Inline SVG
    71                 // Inline SVG
    70                 copy "$result_svg";
    72                 copy "$result_svg";
    71                 script{
    73                 script{
       
    74                     | \n//\n//\n// Early independent declarations \n//\n//
    72                     apply "document('')/*/preamble:*";
    75                     apply "document('')/*/preamble:*";
    73 
    76 
       
    77                     | \n//\n//\n// Declarations depending on preamble \n//\n//
       
    78                     apply "document('')/*/declarations:*";
       
    79 
       
    80                     | \n//\n//\n// Order independent declaration and code \n//\n//
       
    81                     apply "document('')/*/definitions:*";
       
    82 
       
    83                     | \n//\n//\n// Statements that needs to be at the end \n//\n//
    74                     apply "document('')/*/epilogue:*";
    84                     apply "document('')/*/epilogue:*";
    75 
    85 
    76                     include text svghmi.js
    86                     include text svghmi.js
    77 
    87 
    78                 }
    88                 }