130 } |
130 } |
131 /* ensure that coordinate in CSV file generated by inkscape match svg default unit */ |
131 /* ensure that coordinate in CSV file generated by inkscape match svg default unit */ |
132 template "sodipodi:namedview[@units!='px' or @inkscape:document-units!='px']", mode="inline_svg" { |
132 template "sodipodi:namedview[@units!='px' or @inkscape:document-units!='px']", mode="inline_svg" { |
133 error > All units must be set to "px" in Inkscape's document properties |
133 error > All units must be set to "px" in Inkscape's document properties |
134 } |
134 } |
|
135 |
|
136 /* clone unlinkink until widget for better perf with webkit */ |
|
137 svgtmpl "svg:use", mode="inline_svg" |
|
138 { |
|
139 g{ |
|
140 attrib "style" > «@style» |
|
141 attrib "transform" > «@transform» |
|
142 /* keep same id and label in case it is a widget */ |
|
143 //attrib "inkscape:label","@inkscape:label"; |
|
144 attrib "id" > «@id» |
|
145 const "targetid","substring-after(@xlink:href,'#')"; |
|
146 apply "//svg:*[@id = $targetid]", mode="unlink_clone"; |
|
147 } |
|
148 } |
|
149 svgtmpl "@*", mode="unlink_clone" xsl:copy; |
|
150 svgtmpl "svg:*", mode="unlink_clone" { |
|
151 choose { |
|
152 when "@id = $hmi_elements/@id" { |
|
153 use{ |
|
154 attrib "xlink:href" > «concat('#',@id)» |
|
155 } |
|
156 } |
|
157 otherwise { |
|
158 xsl:copy apply "@* | node()", mode="unlink_clone"; |
|
159 } |
|
160 } |
|
161 } |
|
162 |
|
163 // template "svg:use/@style", mode="inline_svg"{ |
|
164 // attrib "style" > all:initial; |
|
165 // //«.» |
|
166 // } |
|
167 |
|
168 // template "svg:*[concat('#',@id) = //svg:use/@xlink:href]/@style", mode="inline_svg"{ |
|
169 // attrib "style" > all:unset; |
|
170 // //«.» |
|
171 // } |
135 |
172 |
136 /*const "mark" > =HMI=\n*/ |
173 /*const "mark" > =HMI=\n*/ |
137 |
174 |
138 /* copy root node and add geometry as comment for a test */ |
175 /* copy root node and add geometry as comment for a test */ |
139 template "/" { |
176 template "/" { |