1 // widgets_common.ysl2 |
1 // widgets_common.ysl2 |
2 |
2 |
3 in xsl decl labels(*ptr, name="defs_by_labels") alias call-template { |
3 in xsl decl labels(*ptr, name="defs_by_labels") alias call-template { |
4 with "hmi_element", "$hmi_element"; |
4 with "hmi_element", "$hmi_element"; |
5 with "labels"{text *ptr}; |
5 with "labels"{text *ptr}; |
|
6 content; |
6 }; |
7 }; |
7 |
8 |
8 in xsl decl optional_labels(*ptr, name="defs_by_labels") alias call-template { |
9 decl optional_labels(*ptr) alias - { |
9 with "hmi_element", "$hmi_element"; |
10 /* TODO add some per label xslt variable to check if exist */ |
10 with "labels"{text *ptr}; |
11 labels(*ptr){ |
11 with "mandatory","'no'"; |
12 with "mandatory","'no'"; |
|
13 content; |
|
14 } |
12 }; |
15 }; |
13 |
16 |
14 in xsl decl activable_labels(*ptr, name="defs_by_labels") alias call-template { |
17 decl activable_labels(*ptr) alias - { |
15 with "hmi_element", "$hmi_element"; |
18 optional_labels(*ptr) { |
16 with "labels"{text *ptr}; |
19 with "subelements","'active inactive'"; |
17 with "mandatory","'no'"; |
20 content; |
18 with "subelements","'active inactive'"; |
21 } |
19 }; |
22 }; |
20 |
23 |
21 template "svg:*", mode="hmi_elements" { |
24 template "svg:*", mode="hmi_elements" { |
22 const "widget", "func:widget(@id)"; |
25 const "widget", "func:widget(@id)"; |
23 const "eltid","@id"; |
26 const "eltid","@id"; |