4

I don't know anything about VML except that Internet Explorer and other Microsoft products use it and that it is a vector graphics format.

Can one use XSLT to transform an SVG document to VML? Or are they too different from one another to make this possible?

I know that there exist XSLT documents to transform SVG to XAML.

kzh
  • 19,810
  • 13
  • 73
  • 97
  • please see: http://stackoverflow.com/questions/1473773/are-there-any-tools-to-convert-legacy-vml-to-svg – TMB Sep 13 '11 at 15:44
  • I am asking specifically for an XSL Transform from SVG to VML, they however want to do the opposite process: VML to SVG. For anybody else reading this, I have found [Raphaël](http://raphaeljs.com/) to be a fabulous JavaScript library for displaying cross-browser vector graphics. – kzh Sep 13 '11 at 16:11
  • The question is similar enough and before yours that it was worth a look. The accepted answers are the same. Raphaël does seem to be awesome. – TMB Sep 13 '11 at 16:20

3 Answers3

5

I haven't used it, but there's a sourceforge project Vector Converter that seems to do exactly that.

Don Roby
  • 40,677
  • 6
  • 91
  • 113
0

As a more general answer to this question, you can, VML as it looks is XML, you can transform any XML into any other XML with XSLT, XSLT unlike CSS is Turing Complete.

Any XML standard can be transformed into any other with it. Though not necessarily easily.

Zorf
  • 6,334
  • 2
  • 29
  • 24
  • 1
    I'm not sure how useful that is. Sure, you can convert any XML to any other XML, just as you can convert any sequence of bits to another sequence of bits. The question is whether it's possible to do usefully, given how well their concepts map. I can convert ChemicalML to MusicXML with XSLT but the concepts are so different it's probably not going to help me much! VML obviously maps to SVG better than that, but it's been over a decade since VML has been updated, so I bet there are many SVG concepts which simply don't exist in VML. – Ken May 15 '10 at 23:38
  • Well, XSLT was designed for that purpose and it's useful, 'transformation' can be see as a really abstract thing. For instance, transforming MusicXML to XHTML can just be limited to extracting the notes in that and displaying them in a table. XSLT is turing complete so we can do all we want with it really. We can translate mathematical formulae in Mathml to 'English mathematical talk' or to SVG again with some fancy TeX-like layout, seeing that XSLT is turing complete we can compute that. – Zorf May 18 '10 at 04:17
-1

VML was essentially obsoleted by SVG (source), so it might not be worth your while. If you still want/need to do this, then XSLT should be up to the task, but I haven't personally seen an example in the wild.

Hank Gay
  • 70,339
  • 36
  • 160
  • 222
  • 3
    All Internet Explorer browsers come with VML support. I am just concerned about a wider user base without requiring SVG or Silverlight plugins. – kzh May 15 '10 at 18:32