xref: /aosp_15_r20/external/libxml2/result/SVG/mathswitch.xml (revision 7c5688314b92172186c154356a6374bf7684c3ca)
1*7c568831SAndroid Build Coastguard Worker<?xml version="1.0" standalone="yes"?>
2*7c568831SAndroid Build Coastguard Worker<svg xmlns="http://www.w3.org/Graphics/SVG/svg-19990412.dtd" width="4in" height="3in">
3*7c568831SAndroid Build Coastguard Worker  <desc>This example uses the switch element to provide a
4*7c568831SAndroid Build Coastguard Worker  fallback graphical representation of an equation, if
5*7c568831SAndroid Build Coastguard Worker  MathML is not supported.
6*7c568831SAndroid Build Coastguard Worker  </desc>
7*7c568831SAndroid Build Coastguard Worker  <!-- The <switch> element will process the first child element
8*7c568831SAndroid Build Coastguard Worker       whose testing attributes evaluate to true.-->
9*7c568831SAndroid Build Coastguard Worker  <switch>
10*7c568831SAndroid Build Coastguard Worker
11*7c568831SAndroid Build Coastguard Worker    <!-- Process the MathML if the system-required attribute
12*7c568831SAndroid Build Coastguard Worker         evaluates to true (i.e., the user agent supports MathML
13*7c568831SAndroid Build Coastguard Worker         embedded within SVG). -->
14*7c568831SAndroid Build Coastguard Worker    <foreignobject system-required="http://www.w3.org/TR/REC-MathML-19980407" width="100" height="50">
15*7c568831SAndroid Build Coastguard Worker      <!-- MathML content goes here -->
16*7c568831SAndroid Build Coastguard Worker    </foreignobject>
17*7c568831SAndroid Build Coastguard Worker
18*7c568831SAndroid Build Coastguard Worker    <!-- Else, process the following alternate SVG.
19*7c568831SAndroid Build Coastguard Worker         Note that there are no testing attributes on the <g> element.
20*7c568831SAndroid Build Coastguard Worker         If no testing attributes are provided, it is as if there
21*7c568831SAndroid Build Coastguard Worker         were testing attributes and they evaluated to true.-->
22*7c568831SAndroid Build Coastguard Worker    <g>
23*7c568831SAndroid Build Coastguard Worker      <!-- Draw a red rectangle with a text string on top. -->
24*7c568831SAndroid Build Coastguard Worker      <rect style="fill: red"/>
25*7c568831SAndroid Build Coastguard Worker      <text>Formula goes here</text>
26*7c568831SAndroid Build Coastguard Worker    </g>
27*7c568831SAndroid Build Coastguard Worker
28*7c568831SAndroid Build Coastguard Worker  </switch>
29*7c568831SAndroid Build Coastguard Worker</svg>
30