--- a/svghmi/gen_index_xhtml.ysl2 Thu Feb 13 09:43:35 2020 +0100
+++ b/svghmi/gen_index_xhtml.ysl2 Fri Feb 14 10:29:10 2020 +0100
@@ -121,6 +121,14 @@
attrib "width" > 100vw
apply "@* | node()", mode="inline_svg";
}
+ /* ensure that coordinate in CSV file generated by inkscape are in default reference frame */
+ template "svg:svg[@viewBox!=concat('0 0 ', @width, ' ', @height)]", mode="inline_svg" {
+ error > ViewBox settings other than X=0, Y=0 and Scale=1 are not supported
+ }
+ /* ensure that coordinate in CSV file generated by inkscape match svg default unit */
+ template "sodipodi:namedview[@units!='px' or @inkscape:document-units!='px']", mode="inline_svg" {
+ error > All units must be set to "px" in Inkscape's document properties
+ }
/*const "mark" > =HMI=\n*/