| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| 3 |
|
| 4 |
<!--======================================================================--> |
| 5 |
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =--> |
| 6 |
<!--= Institute of Technology, Institut National de Recherche en =--> |
| 7 |
<!--= Informatique et en Automatique, Keio University). All Rights =--> |
| 8 |
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =--> |
| 9 |
<!--======================================================================--> |
| 10 |
<!-- ===================================================================== --> |
| 11 |
<!-- --> |
| 12 |
<!-- text-whiteSpace-BE-06.svg --> |
| 13 |
<!-- renamed for 1.1 suite to text-ws-01-f.svg --> |
| 14 |
<!-- --> |
| 15 |
<!-- Test that viewer correctly handles whitespace --> |
| 16 |
<!-- and the "space" attribute. --> |
| 17 |
<!-- --> |
| 18 |
<!-- Author : Lofton Henderson, 10-Apr-2000 --> |
| 19 |
<!-- 1.1 revision by Vincent Hardy --> |
| 20 |
<!-- --> |
| 21 |
<!-- History: --> |
| 22 |
<!-- 10-Apr-2000, LH: Serial#1 created. --> |
| 23 |
<!-- 02-Jun-2000, LH=" rmv 1 extra SPACE before "indented", test 3" ser#2. --> |
| 24 |
<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . --> |
| 25 |
<!-- 12-Dec-2000, JF: test case 2 lost its linebreaks. restored. --> |
| 26 |
<!-- --> |
| 27 |
<!-- ===================================================================== --> |
| 28 |
<!--======================================================================--> |
| 29 |
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =--> |
| 30 |
<!--= log messages, and therefore is no longer in the preceding preamble.=--> |
| 31 |
<!--======================================================================--> |
| 32 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360"> |
| 33 |
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" > |
| 34 |
<OperatorScript> |
| 35 |
<Paragraph> |
| 36 |
Test for viewer correct handling of whitespace and the 'xml:space' attribute. |
| 37 |
There are four sub-tests, two for xml:space value "default" and two for |
| 38 |
value "preserve". In each test, the content of the 'text' element is written on |
| 39 |
multiple lines. The first test of each pair has indented text with leading |
| 40 |
space characters, tabs, etc. The second has no indentation, but a line break |
| 41 |
before the content and after it. There are no space (or other whitespace) |
| 42 |
characters at the ends of the lines. |
| 43 |
</Paragraph> |
| 44 |
<Paragraph> |
| 45 |
The four test cases are self-descriptive. From the top; first, "default" value applied to |
| 46 |
3 lines of content with indents, space characters, tabs, etc; second, "default" applied to two lines content with no indent; third, "preserve" applied to essentially the same content as first; fourth, "preserve" applied to essentially the same content as second. |
| 47 |
</Paragraph> |
| 48 |
<Paragraph> |
| 49 |
In each test, the test string is in blue and the reference |
| 50 |
image is in black. |
| 51 |
The rendered picture should approximately match the reference image, |
| 52 |
however there is some question in the reference image concerning the |
| 53 |
exact amount of space in the long-space areas. The third test uses the nbsp unicode character |
| 54 |
to force the reference white spaces display, which provides an accurate match if the font in use |
| 55 |
has the same metrics for that character and the default white space. |
| 56 |
Also, variations are possible in the text fonts and layout (per CSS2 rules). |
| 57 |
</Paragraph> |
| 58 |
<Paragraph> |
| 59 |
The test also uses the 'rect' element, |
| 60 |
as well as basic fill (solid primary colors), |
| 61 |
stroke (black 1-pixel lines), font-family (Helvetica) |
| 62 |
and font-size properties. |
| 63 |
</Paragraph> |
| 64 |
</OperatorScript> |
| 65 |
</SVGTestCase> |
| 66 |
|
| 67 |
<title id="test-title">text-ws-01-f</title> |
| 68 |
<desc id="test-desc">Test that viewer correctly handle whitespace and the "space" attribute.</desc> |
| 69 |
<!--======================================================================--> |
| 70 |
<!--Content of Test Case follows... =====================--> |
| 71 |
<!--======================================================================--> |
| 72 |
<g id="test-body-content"> |
| 73 |
<text x="75" y="20" font-size="10" font-family="Verdana" fill="black">Basic test of xml:space attribute & whitespace handling.</text> |
| 74 |
<!-- Test 1: indented, spaces, tabs, and space='default' --> |
| 75 |
<!-- Features=" line break and spaces before 1st line" tabs before 2nd line; --> |
| 76 |
<!-- spaces before 3rd line; no space at ends of any lines. --> |
| 77 |
<text x="25" y="55" fill="blue" font-size="12" font-family="helvetica" xml:space="default">WS example with indented lines.</text> |
| 78 |
<text x="25" y="70" fill="black" font-size="12" font-family="helvetica" >WS example with indented lines.</text> |
| 79 |
<rect x="25" y="80" width="100" height="12" fill="none" stroke="black" /> |
| 80 |
<text x="28" y="90" fill="black" font-size="10" font-family="helvetica" >xml:space='default'</text> |
| 81 |
<!-- Test 2: non-indented,and space='default' --> |
| 82 |
<!-- Features=" line break before 1st line" no space either at beginning --> |
| 83 |
<!-- or end of any lines. --> |
| 84 |
<text x="25" y="115" fill="blue" font-size="12" font-family="helvetica" xml:space="default"> |
| 85 |
WS example |
| 86 |
non-indented lines. |
| 87 |
</text> |
| 88 |
<text x="25" y="130" fill="black" font-size="12" font-family="helvetica" >WS examplenon-indented lines.</text> |
| 89 |
<rect x="25" y="140" width="100" height="12" fill="none" stroke="black" /> |
| 90 |
<text x="28" y="150" fill="black" font-size="10" font-family="helvetica" >xml:space='default'</text> |
| 91 |
<!-- Test 3: indented, spaces, tabs, and space='preserve' --> |
| 92 |
<!-- Features=" line break and spaces before 1st line" tabs before 2nd line; --> |
| 93 |
<!-- spaces before 3rd line; no space at ends of any lines. --> |
| 94 |
<text x="25" y="175" fill="blue" font-size="12" font-family="helvetica" xml:space="preserve"> |
| 95 |
WS example |
| 96 |
with |
| 97 |
indented lines. |
| 98 |
</text> |
| 99 |
<!-- should match this, with blank replacing HT, LF, etc --> |
| 100 |
<text x="25" y="190" fill="black" font-size="12" font-family="helvetica" xml:space='preserve'>                  WS example    with                   indented lines.</text> |
| 101 |
|
| 102 |
<rect x="25" y="200" width="100" height="12" fill="none" stroke="black" /> |
| 103 |
<text x="28" y="210" fill="black" font-size="10" font-family="helvetica" >xml:space='preserve'</text> |
| 104 |
<!-- Test 4: non-indented, and space='preserve' --> |
| 105 |
<!-- Features=" no line break before 1st line" no space either at beginning --> |
| 106 |
<!-- or end of any lines. --> |
| 107 |
<text x="25" y="235" fill="blue" font-size="12" font-family="helvetica" xml:space="preserve">WS example |
| 108 |
non-indented lines. |
| 109 |
</text> |
| 110 |
<text x="25" y="250" fill="black" font-size="12" font-family="helvetica" >WS example non-indented lines.</text> |
| 111 |
<rect x="25" y="260" width="100" height="12" fill="none" stroke="black" /> |
| 112 |
<text x="28" y="270" fill="black" font-size="10" font-family="helvetica" >xml:space='preserve'</text> |
| 113 |
</g> |
| 114 |
|
| 115 |
<!--======================================================================--> |
| 116 |
<!--Legend and frame: Title, suite and SVG document serialization====--> |
| 117 |
<!--======================================================================--> |
| 118 |
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10" > |
| 119 |
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" /> |
| 120 |
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/> |
| 121 |
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text> |
| 122 |
<a xlink:href="copyright-documents-19990405.html"> |
| 123 |
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text> |
| 124 |
</a> |
| 125 |
<text font-size="12" x="35" y="330">text-ws-01-f</text> |
| 126 |
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text> |
| 127 |
<text font-size="10" x="210" y="345">Release 1.0</text> |
| 128 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" /> |
| 129 |
</g> |
| 130 |
</svg> |