1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!--======================================================================-->
3 <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
4 <!--= Institute of Technology, Institut National de Recherche en =-->
5 <!--= Informatique et en Automatique, Keio University). All Rights =-->
6 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
7 <!--======================================================================-->
8 <!-- =====================================================================-->
10 <!-- struct-cond-03-t.svg -->
12 <!-- Author : Vincent Hardy, 16-Oct-2003 --><!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
14 <svg xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink" version=
"1.1" baseProfile=
"tiny" id=
"svg-root" width=
"100%" height=
"100%" viewBox=
"0 0 480 360">
15 <SVGTestCase xmlns:
testcase=
"http://www.w3.org/2000/02/svg/testsuite/description/" xmlns=
"http://www.w3.org/2000/02/svg/testsuite/description/" owner=
"VH" reviewer=
"CN" desc=
"Tests the switch element with requiredFeature" status=
"accepted" version=
"$Revision: 1.9 $" testname=
"$RCSfile: struct-cond-03-t.svg,v $">
18 Tests the
<switch
> element with requiredFeature.
21 Because SVG Tiny does not support DOM, an SVG Tiny implementation
22 which does not support other SVG Profiles should show a green
23 rectangle. If the application supports the DOM, meaning that
24 it does more than just SVG Tiny, it should show a red rectangle.
27 On the bottom half of the test, there is another switch.
28 The first child has a requiredFeature set to
29 http://www.w3.org/TR/SVG11/feature#BasicText which all
30 SVG Tiny implementations should support. If the application
31 does, another green rectangle is displayed. Otherwise,
32 a red rectangle shows.
36 <title id=
"test-title">struct-cond-
03-t.svg
</title>
37 <desc id=
"test-desc">Tests proper handling of
<switch
> element
38 with requiredFeature attribute.
</desc>
40 <!--======================================================================-->
41 <!--Content of Test Case follows... =====================-->
42 <!--======================================================================-->
43 <g id=
"test-body-content">
45 <g requiredFeatures=
"http://www.w3.org/TR/SVG11/feature#SVGDOM">
46 <rect x=
"30" y=
"20" width=
"420" height=
"130" fill=
"#F00"/>
47 <text x=
"240" y=
"100" font-size=
"20" text-anchor=
"middle">This viewer does more than SVG Tiny
</text>
50 <rect x=
"30" y=
"20" width=
"420" height=
"130" fill=
"#0F0"/>
54 <switch transform=
"translate(0, 140)">
55 <g requiredFeatures=
"http://www.w3.org/TR/SVG11/feature#BasicText">
56 <rect x=
"30" y=
"20" width=
"420" height=
"130" fill=
"#0F0"/>
59 <rect x=
"30" y=
"20" width=
"420" height=
"130" fill=
"#F00"/>
60 <text x=
"240" y=
"100" font-size=
"20" text-anchor=
"middle">This is not an SVG Tiny Viewer
</text>
65 <text id=
"revision" x=
"10" y=
"340" font-size=
"40" stroke=
"none" fill=
"black">$Revision:
1.9 $
</text>
66 <rect id=
"test-frame" x=
"1" y=
"1" width=
"478" height=
"358" fill=
"none" stroke=
"#000000"/>