<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!-- ===================================================================== -->
<!-- -->
<!-- text-whiteSpace-BE-06.svg -->
<!-- renamed for 1.1 suite to text-ws-01-t.svg -->
<!-- -->
<!-- Test that viewer correctly handles whitespace -->
<!-- and the "space" attribute. -->
<!-- -->
<!-- Author : Lofton Henderson, 10-Apr-2000 -->
<!-- 1.1 revision by Vincent Hardy -->
<!-- -->
<!-- History: -->
<!-- 10-Apr-2000, LH: Serial#1 created. -->
<!-- 02-Jun-2000, LH=" rmv 1 extra SPACE before "indented", test 3" ser#2. -->
<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . -->
<!-- 12-Dec-2000, JF: test case 2 lost its linebreaks. restored. -->
<!-- -->
<!-- ===================================================================== -->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" >
<!--nav data here-->
<OperatorScript version="$Revision: 1.6 $" testname="text-ws-01-f.svg">
<Paragraph>
Test for viewer correct handling of whitespace and the 'xml:space' attribute.
There are two sub-tests, for xml:space value "default".
In each test, the content of the 'text' element is written on
multiple lines. The first test of each pair has indented text with leading
space characters, tabs, etc. The second has no indentation, but a line break
before the content and after it. There are no space (or other whitespace)
characters at the ends of the lines.
</Paragraph>
<Paragraph>
The two test cases are self-descriptive. From the top;
first, "default" value applied to 3 lines of content with indents, space characters, tabs, etc;
second, "default" applied to two lines content with no indent;
</Paragraph>
<Paragraph>
In each test, the test string is in blue and the reference
image is in black.
The rendered picture should approximately match the reference image,
however there is some question in the reference image concerning the
exact amount of space in the long-space areas. The third test uses the nbsp unicode character
to force the reference white spaces display, which provides an accurate match if the font in use
has the same metrics for that character and the default white space.
Also, variations are possible in the text fonts and layout (per CSS2 rules).
</Paragraph>
<Paragraph>
The test also uses the 'rect' element,
as well as basic fill (solid primary colors),
stroke (black 1-pixel lines), font-family (Arial)
and font-size properties.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">text-ws-01-t</title>
<desc id="test-desc">Test that viewer correctly handle whitespace and the "space" attribute.</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content">
<text x="15" y="35" font-size="32" font-family="Verdana" fill="black">Basic: xml:space attribute</text>
<text x="35" y="60" font-size="32" font-family="Verdana" fill="black">& whitespace handling.</text>
<!-- Test 1: indented, spaces, tabs, and space='default' -->
<!-- Features=" line break and spaces before 1st line" tabs before 2nd line; -->
<!-- spaces before 3rd line; no space at ends of any lines. -->
<text x="15" y="105" fill="blue" font-size="40" font-family="Arial" xml:space="default">WS with indented lines.</text>
<text x="15" y="140" fill="black" font-size="40" font-family="Arial" >WS with indented lines.</text>
<rect x="25" y="145" width="350" height="36" fill="none" stroke="black" />
<text x="28" y="175" fill="black" font-size="40" font-family="Arial" >xml:space='default'</text>
<!-- Test 2: non-indented,and space='default' -->
<!-- Features=" line break before 1st line" no space either at beginning -->
<!-- or end of any lines. -->
<text x="15" y="225" fill="blue" font-size="40" font-family="Arial" xml:space="default">
WS
non-indented lines.
</text>
<text x="15" y="260" fill="black" font-size="40" font-family="Arial" >WS non-indented lines.</text>
<rect x="25" y="265" width="350" height="36" fill="none" stroke="black" />
<text x="28" y="295" fill="black" font-size="40" font-family="Arial" >xml:space='default'</text>
</g>
<text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.6 $</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
</svg>