SVG content in Eliom
Hi, recently I have couple issues with SVG content (maybe they are just result of my misunderstanding of the problem):
a) Adding svg element into HTML content (using functional interface) : svg element is different type then html element. I used F.tot (Svg.F.toelt my_svg_elt), but not sure if this is right, because then I had some problems as described in next item.
b) By default eliom pages are served with content type application/xhml+xml. But with this type browser (FF, Chome) ignores my svg element. If I chaged content type to text/html then everything worked as expected. Playing bit around I've found that svg elem in xhml page should have namespace defined ( xmlns="http://www.w3.org/2000/svg"), do not know how to get it there.
This leads me to couple of question:
Is there some global option to force all content to be text/html?
How to correctly include svg element into page?
How to ensure that svg element will have correct namespace in serialized xhtml?
Thanks Ivan
a) Use F.svg (and the elements from Svg.F inside).
b) The namespace issue should be fixed in last tyxml.
Thanks,
works like charm now. Somehow did not realize that svg element is also in Html5.F
I.
On 25.12.2014 18:19, Gabriel Radanne wrote:
a) Use F.svg (and the elements from Svg.F inside).
b) The namespace issue should be fixed in last eliom.
— Reply to this email directly or view it on GitHub https://github.com/ocsigen/eliom/issues/165#issuecomment-68108578.
Nice. :)
I'm letting this open as a reminder to add a HOWTO.
Anything new on this? I’m beginning with Ocsigen and struggling with the same issue (SVG in HTML).
What's your issue ? The original issue is solved.
I’m talking about the HOWTO; I’d be great to have an example of code in the documentation that deals with SVG in HTML.