ocsigen / tyxml

Build valid HTML and SVG documents
https://ocsigen.org/tyxml/
Other
163 stars 57 forks source link

This should fix #326. #328

Open Mbodin opened 7 months ago

Mbodin commented 7 months ago

I followed the specification at https://drafts.csswg.org/css-transforms/#svg-translate as much as I could. As such, I replaced white spaces by the more general [ \t\r\f].

I tried to add some tests. I might not have placed them in the right place (I just noticed the message This file is here to torture the ppx. Tests that are directly related to html or svg should go to the other files. at the beginning of the file). Maybe some reordering should take place in the test file because of that :-\

What do you think?

Mbodin commented 7 months ago

I'm hitting another wall there: according to the spec, it seems that skewY expects a number (degrees are assumed here I think), but according to TyXML, it expects an angle: https://github.com/ocsigen/tyxml/blob/master/lib/svg_types.mli#L302 Maybe this changed between SVG 1.1 and SVG 2 ?

Mbodin commented 7 months ago

I suggest to remove skew from the test and move it to another issue.

Mbodin commented 7 months ago

Is it an issue not to support OCaml version 4.05 or before?

Drup commented 7 months ago

This looks good! Everytime we hit similar issues, I wonder if we shouldn't have a better handling of whitespace in general, but it's pretty tricky in HTML/SVG ...

Is it an issue not to support OCaml version 4.05 or before?

No. Actually, next version will probably drop everything prior to 4.14.