blob: 58e4a767395e74ef63c4a8dc08b11e5b4cf8c887 [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>maction</title>
</head>
<body>
<!-- This test verifies which child of the maction element is selected. -->
<!-- For the statusline action type, the first child should be visible and the selection attribute should be ignored. -->
<p>
<math>
<maction actiontype="statusline">
<mn>1</mn>
<mn>2</mn>
</maction>
</math>
<math>
<maction actiontype="statusline" selection="3">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
</p>
<!-- For the tooltip action type, the first child should be visible and the selection attribute should be ignored. -->
<p>
<math>
<maction actiontype="tooltip">
<mn>1</mn>
<mn>2</mn>
</maction>
</math>
<math>
<maction actiontype="tooltip" selection="3">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
</p>
<!-- For the toggle action type, we use the selection attribute to determine the selected child. -->
<p>
<math>
<maction actiontype="toggle">
<mn>1</mn>
<mn>2</mn>
</maction>
</math>
<math>
<maction actiontype="toggle" selection="3">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
</p>
<!-- For any unknown action type, we use the selection attribute to determine the selected child. -->
<p>
<math>
<maction actiontype="unknown">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
<math>
<maction actiontype="unknown" selection="3">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
</p>
<!-- actiontype is case-sensitive, TOOLTIP is treated as unknown -->
<p>
<math>
<maction actiontype="TOOLTIP" selection="2">
<mn>1</mn>
<mn>2</mn>
</maction>
</math>
</p>
<!-- Testing a couple of special values for the "selection" attribute -->
<p>
<!-- The selection attribute has data type xsd:positiveInteger
http://www.w3.org/TR/xmlschema-2/#positiveInteger -->
<math>
<maction actiontype="toggle" selection="+0003">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
<!-- The MathML spec discourages the use of leading and trailing
whitespace, but they are not strictly prohibited. -->
<math>
<maction actiontype="toggle" selection="&#x20;&#x9;&#xD;&#xA;4&#x20;&#x9;&#xD;&#xA;">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
<!-- The MathML spec suggests to rounded up or down to the closest value
within the allowed subset -->
<math>
<maction actiontype="toggle" selection="-5">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
<math>
<maction actiontype="toggle" selection="-1">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
<math>
<maction actiontype="toggle" selection="0">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
<math>
<maction actiontype="toggle" selection="2.25">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
<math>
<maction actiontype="toggle" selection="5">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
<math>
<maction actiontype="toggle" selection="8">
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
</maction>
</math>
<math>
<maction actiontype="toggle" selection="1">
</maction>
</math>
</p>
</body>
</html>