Vector Markup Language

Revision as of 13:40, 14 May 2025 by imported>Lachsdachs (→‎Full width table cell background images: remove section that seems to have been pasted on accident)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description Template:Distinguish Template:Infobox file format

Vector Markup Language (VML) is an obsolete XML-based file format for two-dimensional vector graphics. It was specified in Part 4 of the Office Open XML standards ISO/IEC 29500 and ECMA-376. According to the specification, VML is a deprecated format included in Office Open XML for legacy reasons only.<ref name="vml-in-or-out">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

VML was used extensively in MS Office 2007 Word, Excel and PowerPoint documents.<ref name="vml-in-or-out" /><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> In 2012, with the release of Internet Explorer 10, VML became obsolete and is no longer supported by Internet Explorer standard mode.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> It is a legacy feature that is available in Internet Explorer 10 only when the browser is set to run in modes that emulate the functionality of previous versions of Internet Explorer 6, 7, 8, and 9.

HistoryEdit

VML was submitted to the World Wide Web Consortium (W3C) in 1998 by Autodesk, Hewlett-Packard, Macromedia, Microsoft, and Vision.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Around the same time other competing W3C submissions were received in the area of web vector graphics, such as Precision Graphics Markup Language (PGML) from Adobe Systems, Sun Microsystems, and others.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> VML has been largely deprecated in favor of other formats, such as SVG.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> SVG is not compatible with VML.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Development of the format ceased in 1998.<ref>Template:Cite book</ref> 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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Microsoft expects web sites to transition to SVG.<ref>Template:Citation</ref> Version 2 of the Google Maps JavaScript API used to use VML for vector paths on Internet Explorer 5.5+,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> but has been officially deprecated in favour of version 3, which does not.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

SyntaxEdit

Below is a VML instance as produced by Microsoft Excel 2010: <syntaxhighlight lang="xml"> <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'>
 </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> </syntaxhighlight>

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".<ref name="xml-w3c-rec">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

File:Ovale.gif
VML oval in Internet Explorer
File:VMLJoconde.jpg
CitationClass=web }}</ref>

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:

<syntaxhighlight lang="xml"> <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> </syntaxhighlight>

ImplementationsEdit

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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Support for "ink annotations" in Office Open XML files was added to LibreOffice during the 3.7 development cycle.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

VML is not natively supported by most web browsers. Web browsers such as Mozilla Firefox, Opera, Safari or Google Chrome support Scalable Vector Graphics (SVG) instead of VML.

Microsoft Outlook HTML email renderingEdit

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. However using VML for content rather than its intended purpose as an image format comes with a number of accessibility issues.<ref>https://a11y.email/email-accessibility-alert-vml-code-creates-accessibility-errors/ a</ref>

Full width table cell background imagesEdit

<syntaxhighlight lang="html"> <html xmlns:v="urn:schemas-microsoft-com:vml">

   <head>
       <style>
           v:* { behavior: url(#default#VML); display: inline-block; }
       </style>
   </head>
   <body>

</body> </html> </syntaxhighlight>

Specified width table cell background imagesEdit

<syntaxhighlight lang="html"> <html xmlns:v="urn:schemas-microsoft-com:vml">

   <head>
       <style>
           v:* { behavior: url(#default#VML); display: inline-block; }
       </style>
   </head>
   <body>
Text

</body> </html> </syntaxhighlight>

See alsoEdit

ReferencesEdit

Template:Reflist

External linksEdit

Template:Internet Explorer Template:Vector graphics markup languages Template:Graphics file formats