edouard@3235: include yslt_noindent.yml2 edouard@3235: edouard@3241: in xsl decl widget_desc(%name, match="widget[@type='%name']", mode="widget_desc") alias template { edouard@3241: type > «@type» edouard@3241: content; edouard@3241: }; edouard@3241: edouard@3241: decl nothing alias - ; edouard@3241: decl widget_class(%name) alias - {nothing}; edouard@3241: decl widget_defs(%name) alias - {nothing}; edouard@3241: decl widget_page(%name) alias - {nothing}; edouard@3241: decl gen_index_xhtml alias - {nothing}; edouard@3241: decl emit(*name) alias - {nothing}; edouard@3241: edouard@3235: istylesheet edouard@3235: /* From Inkscape */ edouard@3235: xmlns:svg="http://www.w3.org/2000/svg" edouard@3235: xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" edouard@3235: edouard@3235: extension-element-prefixes="ns func exsl regexp str dyn" edouard@3235: exclude-result-prefixes="ns func exsl regexp str dyn svg inkscape" { edouard@3235: edouard@3235: const "indexed_hmitree", "/.."; // compatibility with parse_labels.ysl2 edouard@3235: include parse_labels.ysl2 edouard@3235: edouard@3235: const "hmi_elements", "//svg:*[starts-with(@inkscape:label, 'HMI:')]"; edouard@3235: edouard@3241: include widget_*.ysl2 edouard@3241: edouard@3241: template "@* | node()", mode="document" { edouard@3241: xsl:copy apply "@* | node()", mode="document"; edouard@3241: } edouard@3241: edouard@3241: template "widget", mode="document" { edouard@3241: xsl:copy { edouard@3241: apply "@* | node()", mode="document"; edouard@3241: defs apply ".", mode="widget_desc"; edouard@3241: } edouard@3241: } edouard@3241: edouard@3241: template "/" { edouard@3241: const "widgets" edouard@3235: apply "$hmi_elements", mode="parselabel"; edouard@3241: const "widget_ns", "exsl:node-set($widgets)"; edouard@3241: widgets edouard@3241: apply "$widget_ns", mode="document"; edouard@3241: } edouard@3235: edouard@3235: }