Today I learned a bit about Microsoft's early attempt at a markup language for vector graphics: VML. I was surprised to find out that IE 5 and 6 both support it, yet (as far as I know) no one uses it on the web. At the very least it is a great solution to the rounded corners problem that's been mentioned on the IEBlog and here. Incidentally, the IEBlog post above has a VML example that turned me onto it in the first place.

VML has support for shapes, paths, gradients, text and can be styled using CSS. Though animation and scripting are mentioned in the design requirements, I can't see anything in the spec that indicates VML support them. But based on my simple little test, VML does integrate nicely with HTML, better than any SVG implementation out there that I know of. (Note that I said HTML, not XHTML). It's a shame that VML didn't get a chance to undergo the (lengthy) peer review process that SVG did...

At least for primitive uses like rounded corners, scalable icons/backgrounds, why doesn't someone write a server-side script that can transform XHTML+SVG into HTML+VML for Internet Explorer users? Of course there are lots of caveats with this such that it may not be worth it, but VML seems to be virtually a subset of SVG with slightly different syntax. So for someone's personal site that has specific requirements that do not stray beyond VML capabilities, it seems like it would be feasible and it would provide users with an "almost-SVG" experience on IE without the use of a plugin.

[Trivia I learned later: I subsequently learned that all the graphics in the Microsoft Office products are done via VML.]

§122 · July 12, 2005 · Software, SVG, Technology, Web, XML · · [Print]

5 Comments to “XHTML+SVG => HTML+VML”

  1. I know for a fact that VML is used on the web in a production environment. To see it in action, check out our website http://www.dirkzwager.com and go to links->Ships of interest. The elements (vessels, markers and shades) on the map are rendered using VML, generated from JavaScript.
    Since VML is not (yet?) supported by Firefox, the demo works in Internet Explorer only.

  2. Jeff says:

    Marwik,

    You’re right. Another friend pointed out that Google Maps actually uses VML to draw the routes on IE. They use transparent PNGs when it’s not IE. See http://brevity.org/toys/google/draw.html

  3. webdev says:

    VML became SVG. VML was designed by Microsoft, submitted to the W3C, several other companies (Apple + Adobe + others) ratified it, it became a W3C standard, and the result is SVG.

  4. @webdev: My understanding was that VML was one proposal (by Microsoft) while another was SVG (by Adobe). The W3C chose to go with SVG.

  5. Wikipedia says that VML (Microsoft, Macromedia) and PGML (Adobe, Sun) were separately submitted and then joined by the W3C into SVG. Interesting history tidbit there.