views:

255

answers:

3

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.

A: 

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
All Internet Explorer browsers come with VML support. I am just concerned about a wider user base without requiring SVG or Silverlight plugins.
kzh
+2  A: 

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

Don Roby
A: 

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.

Lajla
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
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.
Lajla