SVG Redux
In a previous post, I announced support for inline SVG in posts and comments on the blogs I host here on Golem. Unfortunately, to be compatible with the built-in copy of the W3C Validator, the SVG had to adhere to the idiotic restrictions of the W3C profile for XHTML+MathML+SVG. Which was a problem, if you wanted to avail yourself of GUI tools, like Inkscape or to reuse much of the SVG that’s available on the 'net.
Sam Ruby suggested some code to convert Namespace well-formed XHTML+MathML+SVG into the format demanded by the W3C Validator. I added a couple of tweaks, and rolled the result into a MovableType plugin.
So, now, you don’t need to add completely superfluous svg:
prefixes to your SVG code. The plugin will handle the conversions necessary to keep the W3C Validator happy.
1 These restrictions are the result of letting the limitations of your conformance-checking tool dictate how your Specification gets written, rather than the other way around. As long as a compound document is Namespace well-formed, there shouldn’t be any further restrictions on how, precisely, the SVG, MathML and XHTML namespaces are declared.