Edouard@2753: include yslt_noindent.yml2 Edouard@2779: Edouard@2779: // overrides yslt's output function to set CDATA Edouard@2798: decl output(method, cdata-section-elements="xhtml:script"); Edouard@2792: edouard@2940: // helper to emit some content to internal namespaces edouard@2940: decl emit(*name) alias - { edouard@2940: *name; edouard@2940: template *name { edouard@3165: // value "ns:ProgressStart(name())"; edouard@2947: | edouard@2947: | /* «local-name()» */ edouard@2947: | edouard@2940: content; edouard@2947: | edouard@3165: // value "ns:ProgressEnd(name())"; edouard@2940: } edouard@2940: }; edouard@2940: Edouard@2792: istylesheet Edouard@2753: /* From Inkscape */ Edouard@2753: xmlns:dc="http://purl.org/dc/elements/1.1/" Edouard@2753: xmlns:cc="http://creativecommons.org/ns#" Edouard@2753: xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" Edouard@2753: xmlns:svg="http://www.w3.org/2000/svg" Edouard@2838: xmlns:xlink="http://www.w3.org/1999/xlink" Edouard@2753: xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" Edouard@2753: xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" Edouard@2798: xmlns:xhtml="http://www.w3.org/1999/xhtml" edouard@2940: edouard@2940: /* Internal namespaces to allow emit code/content from anywhere */ edouard@2939: xmlns:debug="debug" edouard@2940: xmlns:preamble="preamble" edouard@2943: xmlns:declarations="declarations" edouard@2943: xmlns:definitions="definitions" edouard@2940: xmlns:epilogue="epilogue" Edouard@2753: edouard@2940: /* Namespace to invoke python code */ Edouard@2753: xmlns:ns="beremiz" edouard@2940: Edouard@2854: extension-element-prefixes="ns func exsl regexp str dyn" edouard@2943: exclude-result-prefixes="ns func exsl regexp str dyn debug preamble epilogue declarations definitions" { Edouard@2790: edouard@2941: const "svg", "/svg:svg"; Edouard@2879: const "hmi_elements", "//svg:*[starts-with(@inkscape:label, 'HMI:')]"; Edouard@2879: edouard@2941: Edouard@2877: include hmi_tree.ysl2 Edouard@2877: Edouard@2877: include geometry.ysl2 Edouard@2877: edouard@3320: include lists.ysl2 edouard@3320: Edouard@2877: include detachable_pages.ysl2 Edouard@2853: Edouard@2878: include inline_svg.ysl2 Edouard@2854: edouard@3108: include i18n.ysl2 edouard@3108: edouard@2883: include widgets_common.ysl2 edouard@2883: edouard@2883: include widget_*.ysl2 Edouard@2881: edouard@2938: Edouard@2853: template "/" { Edouard@2793: comment > Made with SVGHMI. https://beremiz.org edouard@2873: edouard@2904: // all debug output from included definitions, as comments Edouard@3212: // comment apply "document('')/*/debug:*"; edouard@2874: Edouard@2840: html xmlns="http://www.w3.org/1999/xhtml" Edouard@2840: xmlns:svg="http://www.w3.org/2000/svg" Edouard@2840: xmlns:xlink="http://www.w3.org/1999/xlink" { Edouard@3211: head { Edouard@3211: style type="text/css" media="screen" { Edouard@3211: value "ns:GetFonts()"; Edouard@3211: } Edouard@3211: } Edouard@3082: // prevents user selection by mouse click / touch and drag Edouard@3082: // prevents pinch zoom and other accidental panning panning with touch devices Edouard@3082: body style="margin:0;overflow:hidden;user-select:none;touch-action:none;" { edouard@2883: // Inline SVG Edouard@2854: copy "$result_svg"; Edouard@2792: script{ edouard@2943: | \n//\n//\n// Early independent declarations \n//\n// edouard@2941: apply "document('')/*/preamble:*"; edouard@2941: edouard@2943: | \n//\n//\n// Declarations depending on preamble \n//\n// edouard@2943: apply "document('')/*/declarations:*"; edouard@2943: edouard@2943: | \n//\n//\n// Order independent declaration and code \n//\n// edouard@2943: apply "document('')/*/definitions:*"; edouard@2943: edouard@2943: | \n//\n//\n// Statements that needs to be at the end \n//\n// edouard@2941: apply "document('')/*/epilogue:*"; edouard@2941: edouard@3331: include text sprintf.js edouard@3331: edouard@2941: include text svghmi.js edouard@2941: Edouard@2792: } Edouard@2792: } Edouard@2792: } Edouard@2792: } Edouard@2753: }