zme1 / toscana

A repository to house research and web development for the Lega Toscana project, led by professor Lina Insana (Spring 2018) and professor Lorraine Denman (Fall 2018), and with consultation from members of the DH Advanced Praxis group at the University of Pittsburgh at Greensburg.
http://toscana.newtfire.org
3 stars 1 forks source link

Embedded SVG #20

Closed djbpitt closed 6 years ago

djbpitt commented 6 years ago

The invisible bars in the bar graph happened because HTML5 with HTML syntax (served as mimetype text/HTML) doesn’t understand namespace prefixes. See https://stackoverflow.com/questions/22806022/how-to-use-svg-namespace-in-xhtml-documents. The fix is either to declare the namespace in place without using a prefix (which is what I did) or change the filename extension to .xhtml, which will change the mimetype.

ebeshero commented 6 years ago

@djbpitt Is this something I can address on my newtFire server by controlling the mimetype for .html files? I've been developing xhtml an with the .html extension and usually without an xml line at the top, trying to have my proverbial cake and eating it too. That said, I think there's no reason you can't serve .xhtml extensions on my server; it's just inconsistent with the usual practice over here.

djbpitt commented 6 years ago

@ebeshero You can change the mimetype for .html files, but if you’d like to be able to serve as both text/html and application/xhtml+xml, you can set .html for the former and .xhtml for the latter, which is what I’ve done on Obdurodon. The configuration file to map mimetypes to filename extensions on my system is /etc/mime.types, but I’m running a different Linux distro than you, so yours may be located elsewhere. You can read more about the effect of the mimetype at https://www.w3.org/International/articles/serving-xhtml/.