Revision control

Copy as Markdown

<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--======================================================================-->
reviewer="CN" owner="CL" desc="Tests the switch element with requiredFeature" status="accepted"
approved="yes"
version="$Revision: 1.7 $" testname="$RCSfile: struct-cond-03-t.svg,v $">
<p>
Tests the &lt;switch&gt; element with requiredFeature. If a red rectangle with white text 'FAIL' is
displayed, the test fails. Otherwise, if a green rectangle is displayed in the lower part with the text '',
the test is passed.
</p>
<p>
The red rectangle and the white text each require a non-existent feature; the test attribute will thus
evaluate to false and neither element will be rendered by a compliant implementation.
</p>
<p>
The upper subtest is informative; it distinguishes between a purely SVG Tiny 1.2
implementation and others which also implement more (eg SVG Full 1.1, or
some profile of SVG 1.2 greater than Tiny). The results of this subtest
does not affect the pass/fail criteria.
</p>
<p>
Because SVG Tiny does not support for SVG Full DOM, an SVG Tiny implementation which
does not support other SVG Profiles should show a rectangle
<span style="background: rgb( 95, 158, 160)">like this</span>.
If the application supports the DOM, meaning that it does more than just SVG Tiny, it
should show a rectangle <span style="background: rgb( 32, 178, 170)">like this</span>.
Either result is a pass.
</p>
<p>
The lower subtest,has another switch. The first child has a requiredFeature
set to http://www.w3.org/TR/SVG11/feature#BasicText which all SVG Tiny implementations
must support. If the application does, the lower rectangle is displayed in green
<span style="background:green; color: white">like this</span>. Otherwise, a red rectangle
indicates that the text has failed.
</p>
</d:OperatorScript>
</SVGTestCase>
<title xml:id="test-title">$RCSfile: struct-cond-03-t.svg,v $</title>
<defs>
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
</font-face-src>
</font-face>
</defs>
<g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<switch>
<rect x="30" y="20" width="420" height="130" fill="rgb( 32, 178, 170)" />
<text x="240" y="100" font-size="18" text-anchor="middle">This viewer does more than SVG Tiny 1.2</text>
</g>
<g>
<rect x="30" y="20" width="420" height="130" fill="rgb( 95, 158, 160)" />
<text x="240" y="100" font-size="18" text-anchor="middle">
This viewer
does not implement SVG Full DOM
</text>
</g>
</switch>
<switch transform="translate(0, 140)">
<rect x="30" y="20" width="420" height="130" fill="green" />
<text x="240" y="100" font-size="18" text-anchor="middle" fill="white">SVG Basic Text feature supported</text>
</g>
<g>
<rect x="30" y="20" width="420" height="130" fill="red" />
<text x="240" y="100" font-size="18" text-anchor="middle" fill="white">Fail: Basic Text feature not supported</text>
</g>
</switch>
<rect x="30" y="20" width="420" height="270" fill="red" requiredFeatures="http://example.org/NotAFeature"/>
<text x="240" y="180" fill="white" text-anchor="middle" font-size="36"
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text xml:id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.7 $</text>
</g>
<rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved -->
<!--<g xml:id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>