equal
deleted
inserted
replaced
1 include yslt_noindent.yml2 |
1 include yslt_noindent.yml2 |
|
2 |
|
3 in xsl decl widget_desc(%name, match="widget[@type='%name']", mode="widget_desc") alias template { |
|
4 type > «@type» |
|
5 content; |
|
6 }; |
|
7 |
|
8 decl nothing alias - ; |
|
9 decl widget_class(%name) alias - {nothing}; |
|
10 decl widget_defs(%name) alias - {nothing}; |
|
11 decl widget_page(%name) alias - {nothing}; |
|
12 decl gen_index_xhtml alias - {nothing}; |
|
13 decl emit(*name) alias - {nothing}; |
2 |
14 |
3 istylesheet |
15 istylesheet |
4 /* From Inkscape */ |
16 /* From Inkscape */ |
5 xmlns:svg="http://www.w3.org/2000/svg" |
17 xmlns:svg="http://www.w3.org/2000/svg" |
6 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
18 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
11 const "indexed_hmitree", "/.."; // compatibility with parse_labels.ysl2 |
23 const "indexed_hmitree", "/.."; // compatibility with parse_labels.ysl2 |
12 include parse_labels.ysl2 |
24 include parse_labels.ysl2 |
13 |
25 |
14 const "hmi_elements", "//svg:*[starts-with(@inkscape:label, 'HMI:')]"; |
26 const "hmi_elements", "//svg:*[starts-with(@inkscape:label, 'HMI:')]"; |
15 |
27 |
16 template "/" |
28 include widget_*.ysl2 |
17 widgets |
29 |
|
30 template "@* | node()", mode="document" { |
|
31 xsl:copy apply "@* | node()", mode="document"; |
|
32 } |
|
33 |
|
34 template "widget", mode="document" { |
|
35 xsl:copy { |
|
36 apply "@* | node()", mode="document"; |
|
37 defs apply ".", mode="widget_desc"; |
|
38 } |
|
39 } |
|
40 |
|
41 template "/" { |
|
42 const "widgets" |
18 apply "$hmi_elements", mode="parselabel"; |
43 apply "$hmi_elements", mode="parselabel"; |
|
44 const "widget_ns", "exsl:node-set($widgets)"; |
|
45 widgets |
|
46 apply "$widget_ns", mode="document"; |
|
47 } |
19 |
48 |
20 } |
49 } |