Alternate-Content Examples
The following examples illustrate the usage of alternate-content elements.
example:
In this example, luminance is expressed as an attribute of a <Circle>
element for markup consumers supporting the Version 3 namespace, identified by the v3 namespace prefix, and as an attribute of a <LuminanceFilter>
element for other markup consumers.
<Circles xmlns="http://schemas.openxmlformats.org/Circles/v1" xmlns:mc=http://schemas.openxmlformats.org/markup- compatibility/2006 xmlns:v2=http://schemas.openxmlformats.org/Circles/v2 xmlns:v3=http://schemas.openxmlformats.org/Circles/v3 mc:Ignorable="v2 v3"> <mc:AlternateContent> <mc:Choice Requires="v3"> <v3:Circle Center="0,0" Radius="20" Color="Blue" Opacity="0.5" Luminance="13" /> <v3:Circle Center="25,0" Radius="20" Color="Black" Opacity="0.5" Luminance="13" /> <v3:Circle Center="50,0" Radius="20" Color="Red" Opacity="0.5" Luminance="13" /> <v3:Circle Center="13,0" Radius="20" Color="Yellow" Opacity="0.5" Luminance="13" /> <v3:Circle Center="38,0" Radius="20" Color="Green" Opacity="0.5" Luminance="13" /> </mc:Choice> <mc:Fallback> <LuminanceFilter Luminance="13"> <Circle Center="0,0" Radius="20" Color="Blue" v2:Opacity="0.5" /> <Circle Center="25,0" Radius="20" Color="Black" v2:Opacity="0.5" /> <Circle Center="50,0" Radius="20" Color="Red" v2:Opacity="0.5" /> <Circle Center="13,0" Radius="20" Color="Yellow" v2:Opacity="0.5" /> <Circle Center="38,0" Radius="20" Color="Green" v2:Opacity="0.5" /> </LuminanceFilter> </mc:Fallback> </mc:AlternateContent> </Circles>
example:
In this example, if the markup consumer understands the metallic-finishes namespace, the contents of the <mc:Choice>
block are used. If it does not, the contents of <mc:Fallback>
are used instead.
<Circles xmlns="http://schemas.openxmlformats.org/Circles/v1" xmlns:mc="http://schemas.openxmlformats.org/markup- compatibility/2006" > <mc:AlternateContent xmlns:m="http://schemas.openxmlformats.org/metallic- finishes/v1"> <mc:Choice Requires="m"> <Circle m:Finish="GoldLeaf" Center="100,100" Radius="50" /> </mc:Choice> <mc:Fallback> <Circle Fill="Gold" Center="100,100" Radius="50" /> </mc:Fallback> </mc:AlternateContent> </Circles>