Vector Markup Language
<templatestyles src="Module:Hatnote/styles.css"></templatestyles>
Filename extension | .htm or .html |
---|---|
Internet media type | application/vnd.openxmlformats-officedocument.vmlDrawing |
Developed by | Microsoft |
Type of format | Vector image format |
Extended from | XML |
Standard | Part of ECMA-376 and ISO/IEC 29500:2008 |
Website | ECMA-376, ISO/IEC 29500-4:2012 |
Vector Markup Language (VML) is an XML-based file format for two-dimensional vector graphics.
VML is specified in Part 4 of the Office Open XML standards ISO/IEC 29500 and ECMA-376. According to the specification, VML should be considered a deprecated format included in Office Open XML for legacy reasons only.[1][2]
VML is pervasively used in MS Office 2007 (and later version) documents (i.e. Word, Excel and PowerPoint documents).[1][3][4]
As of 2012, with the release of Internet Explorer 10, VML became obsolete and was no longer deemed supported by Internet Explorer standard mode.[5] VML, now considered a legacy feature remains available in Internet Explorer 10 only when the browser is set to run in modes to emulate the functionality of previous versions of Internet Explorer 6, 7, 8, and 9.
Contents
History
VML was submitted to the W3C in 1998 by Autodesk, Hewlett-Packard, Macromedia, Microsoft, and Vision.[6] Around the same time other competing W3C submissions were received in the area of web vector graphics, such as PGML from Adobe Systems, Sun Microsystems, and others.[7] As a result of these submissions, a new W3C working group was created, which produced Scalable Vector Graphics (SVG). SVG became a W3C Recommendation in 2001 as a language for describing two-dimensional vector and mixed vector/raster graphics in XML.[8] VML has been largely deprecated in favor of other formats, such as SVG.[9] SVG is not compatible with VML.[10]
Development of the format ceased in 1998.[11] VML is implemented in Internet Explorer from version 5 to version 9 and in Microsoft Office 2000. VML is no longer available in Internet Explorer 10.[12] Microsoft expects web sites to transition to SVG.[13] Version 2 of the Google Maps JavaScript API used to use VML for vector paths on Internet Explorer 5.5+,[14] but has been officially deprecated in favour of version 3, which does not.[15]
Syntax
Below is a VML instance as produced by Microsoft Excel 2010:
<xml xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel">
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout><v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202"
path="m,l,21600r21600,l21600,xe">
<v:stroke joinstyle="miter"/>
<v:path gradientshapeok="t" o:connecttype="rect"/>
</v:shapetype><v:shape id="_x0000_s1025" type="#_x0000_t202" style='position:absolute;
margin-left:203.25pt;margin-top:82.5pt;width:108pt;height:59.25pt;z-index:1;
visibility:hidden' fillcolor="#ffffe1" o:insetmode="auto">
<v:fill color2="#ffffe1"/>
<v:shadow on="t" color="black" obscured="t"/>
<v:path o:connecttype="none"/>
<v:textbox style='mso-direction-alt:auto'>
<div style='text-align:left'></div>
</v:textbox>
<x:ClientData ObjectType="Note">
<x:MoveWithCells/>
<x:SizeWithCells/>
<x:Anchor>
4, 15, 5, 10, 6, 31, 9, 9</x:Anchor>
<x:AutoFill>False</x:AutoFill>
<x:Row>6</x:Row>
<x:Column>3</x:Column>
</x:ClientData>
</v:shape>
</xml>
Note that, by specifying a root element named "xml", VML contravenes the XML Recommendation of the W3C, which states that names beginning 'x' 'm' 'l' are "reserved for standardization in this or future versions of this specification".[16]

VML, when embedded within HTML markup, is read and processed by Microsoft Internet Explorer (but not other browsers); for example, the following example displays a solid blue oval:
<html xmlns:v>
<style>v\:*{behavior:url(#default#VML);position:absolute}</style>
<body>
<v:oval style="left:0;top:0;width:100;height:50" fillcolor="blue" stroked="f"/>
</body>
</html>
Implementations
VML is used by most Microsoft Office applications, such as Microsoft Word and Microsoft Visio, within HTML files created using the 'Save As HTML
' option (plain HTML or MHT). Such files retain complete vector information, and can be reopened for editing using other Microsoft applications, such as Microsoft PowerPoint. VML was natively supported by Microsoft's Internet Explorer up to version 9 inline within HTML, using an undefined version of SGML namespaces. Support for VML was dropped in Internet Explorer 10 and subsequent versions.[18]
Support for "ink annotations" in Office Open XML files was added to LibreOffice during the 3.7 development cycle.[19]
VML is not natively supported by most web browsers. Web browsers such as Mozilla Firefox, Opera, Safari or Google Chrome support SVG instead of VML.
Microsoft Outlook HTML email rendering[20]
Though VML is deprecated as a standard in Internet Explorer, it is most commonly used in relation to the development of HTML emails rendered in Microsoft Outlook 2007, 2010, and 2013. The use of background-images in email campaigns requires the use of VML to be displayed in Outlook because Outlook does not support the CSS or HTML attributes for background-images.
Full width table cell background images
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<style>
v:* { behavior: url(#default#VML); display: inline-block; }
</style>
</head>
<body>
<table width="100%" height="20">
<tr>
<td bgcolor="#dddddd" style="background-image:url('http://placekitten.com/g/500/300');background-repeat:no-repeat;background-position:center;" background="http://placekitten.com/g/500/300" width="100%" height="300">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:300px;">
<v:fill type="frame" src="http://placekitten.com/g/500/300" color="#ffffff" />
</v:rect>
<![endif]-->
</td>
</tr>
</table>
</body>
</html>
Tiled full width table cell background images
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<style>
v:* { behavior: url(#default#VML); display: inline-block; }
</style>
</head>
<body>
<table width="100%" height="20">
<tr>
<td bgcolor="#dddddd" style="background-image:url('http://placekitten.com/g/500/300');background-repeat:no-repeat;background-position:center;" background="http://placekitten.com/g/500/300" width="100%" height="300">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:300px;">
<v:fill type="tile" src="http://placekitten.com/g/500/300" color="#ffffff" />
</v:rect>
<![endif]-->
</td>
</tr>
</table>
</body>
</html>
Specified width table cell background images
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<style>
v:* { behavior: url(#default#VML); display: inline-block; }
</style>
</head>
<body>
<table width="600" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;">
<tr>
<td style="width: 300px; height: 80px; background-image: url('http://placekitten.com/g/300/80');">
<!--[if gte mso 9]>
<v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage" style='behavior: url(#default#VML); display: inline-block; position: absolute; width: 300px; height: 80px; top: 0; left: 0; border: 0; z-index: 1;' src="http://placekitten.com/g/300/80" />
<v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theText" style='behavior: url(#default#VML); display: inline-block; position: absolute; width: 300px; height: 80px; top: -5; left: -10; border: 0; z-index: 2;'>
<div>
<![endif]-->
<table width="300" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tr>
<td height="80" align="center" valign="top" style="color:#ffffff;font-size:20px;"><span>Text</span></td>
</tr>
</table>
<!--[if gte mso 9]>
</div>
</v:shape>
<![endif]-->
</td>
</tr>
</table>
</body>
</html>
See also
- Comparison of layout engines (Scalable Vector Graphics)
- List of vector graphics markup languages
- Office Open XML
- Scalable Vector Graphics
References
<templatestyles src="Reflist/styles.css" />
Cite error: Invalid <references>
tag; parameter "group" is allowed only.
<references />
, or <references group="..." />
External links
- W3C submission Initial draft 13 May 1998
- MSDN page about VML
- MSDN page about DocumentFormat.OpenXml.Vml namespace
- ↑ 1.0 1.1 Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Vector Mona Lisa
- ↑ http://www.tomshardware.com/news/microsoft-ie10-web-browser-dx-vml,14215.html
- ↑ http://www.derivativezero.com/blog/2012/09/importing-ooxml-ink-annotations-into-libreoffice/
- ↑ http://stackoverflow.com/a/23346010/1922144
- Pages with syntax highlighting errors
- Pages with reference errors
- Articles with hatnote templates targeting a nonexistent page
- Pages with broken file links
- User interface markup languages
- Markup languages
- XML-based standards
- ISO/IEC standards
- XML
- Office Open XML
- Graphics file formats
- Vector graphics
- Vector graphics markup languages