1 <?xml version=
"1.0" encoding=
"UTF-8" standalone=
"no"?>
2 <!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 20010904//EN"
3 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
7 Copyright 2004 The Apache Software Foundation
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
22 <!-- ====================================================================== -->
23 <!-- Tests "proper" handling of xml:space -->
25 <!-- @author deweese@apache.org -->
26 <!-- @version $Id: xmlSpace.svg,v 1.1 2005/01/03 10:48:05 deweese Exp $ -->
27 <!-- ====================================================================== -->
29 <?xml-stylesheet type=
"text/css" href=
"../resources/test.css" ?>
31 <svg width=
"450" height=
"500" viewBox=
"0 0 450 500"
32 xmlns=
"http://www.w3.org/2000/svg"
33 xmlns:
xlink=
"http://www.w3.org/1999/xlink"
34 xmlns:
foo=
"http://graphics.apache.org/batik/foo">
36 <text class=
"title" x=
"50%" y=
"40">Test of xml:space handling
</text>
38 <font horiz-adv-x=
"600" id=
"stroke">
40 font-family=
"BlockSpace"
47 <missing-glyph horiz-adv-x=
"600" d=
"M0 0 V800 H500 V0 z"/>
49 <glyph unicode=
" " glyph-name=
" " horiz-adv-x=
"600"
50 d=
"M20 0 V800 H520 V0 z M 50 30 H490 V770 H50 z"/>
52 <style type=
"text/css"><![CDATA[
53 .cap { font-size:
8px; font-family: monospace;
54 stroke: none; stroke-width:
0;
58 <g font-size=
"20" font-family=
"BlockSpace">
59 <text x=
"10" y=
"75"> X X
</text>
60 <text class=
"cap" x=
"120" y=
"75">no xml:space attr
</text>
62 <text x=
"10" y=
"100" xml:
space=
"default"> X X
</text>
63 <text class=
"cap" x=
"120" y=
"100">xml:
space=
"default"</text>
65 <text x=
"10" y=
"150" xml:
space=
"preserve"> X X
<tspan fill=
"red" xml:
space=
"default"/></text>
66 <text class=
"cap" x=
"120" y=
"140">Empty tspan at end
67 <tspan x=
"120" dy=
"1.2em">xml:
space=
"default"</tspan></text>
69 <text x=
"10" y=
"175" xml:
space=
"preserve"> X X
<tspan fill=
"red" xml:
space=
"default"> </tspan></text>
70 <text class=
"cap" x=
"120" y=
"165">tspan end
2spc
71 <tspan x=
"120" dy=
"1.2em">xml:
space=
"default"</tspan></text>
73 <text x=
"10" y=
"200" xml:
space=
"preserve"> X X
<tspan fill=
"red" xml:
space=
"default"> </tspan></text>
74 <text class=
"cap" x=
"120" y=
"190">tspan end
75 <tspan x=
"120" dy=
"1.2em">xml:
space=
"default"</tspan></text>
77 <text x=
"10" y=
"225" xml:
space=
"preserve"><tspan fill=
"red" xml:
space=
"default"> </tspan> X X
</text>
78 <text class=
"cap" x=
"120" y=
"215">tspan start
79 <tspan x=
"120" dy=
"1.2em">xml:
space=
"default"</tspan></text>
81 <text x=
"10" y=
"250" xml:
space=
"preserve"> <tspan fill=
"red" xml:
space=
"default"> </tspan>X X
</text>
82 <text class=
"cap" x=
"120" y=
"240">tspan near start
83 <tspan x=
"120" dy=
"1.2em">xml:
space=
"default"</tspan></text>
85 <text x=
"10" y=
"275" xml:
space=
"preserve"> X
<tspan fill=
"red" xml:
space=
"default"> </tspan> X
</text>
86 <text class=
"cap" x=
"120" y=
"265">tspan middle front
87 <tspan x=
"120" dy=
"1.2em">xml:
space=
"default"</tspan></text>
89 <text x=
"10" y=
"300" xml:
space=
"preserve"> X
<tspan fill=
"red" xml:
space=
"default"> </tspan>X
</text>
90 <text class=
"cap" x=
"120" y=
"290">tspan middle end
91 <tspan x=
"120" dy=
"1.2em">xml:
space=
"default"</tspan></text>
93 <text x=
"10" y=
"325" xml:
space=
"preserve"> <foo:xxx/> X X
</text>
94 <text class=
"cap" x=
"120" y=
"315">unknown element
95 <tspan x=
"120" dy=
"1.2em">start
</tspan></text>
97 <text x=
"10" y=
"350" xml:
space=
"preserve"> X
<foo:xxx/> X
</text>
98 <text class=
"cap" x=
"120" y=
"340">unknown element
99 <tspan x=
"120" dy=
"1.2em">middle
</tspan></text>
101 <text x=
"10" y=
"375" xml:
space=
"preserve"> X X
<foo:xxx/> </text>
102 <text class=
"cap" x=
"120" y=
"365">unknown element
103 <tspan x=
"120" dy=
"1.2em">end
</tspan></text>
108 <text x=
"235" y=
"100" xml:
space=
"preserve"> X X
</text>
109 <text class=
"cap" x=
"345" y=
"100">xml:
space=
"preserve"</text>
111 <text x=
"235" y=
"150" xml:
space=
"default"> X X
<tspan fill=
"red" xml:
space=
"preserve"/></text>
112 <text class=
"cap" x=
"345" y=
"140">Empty tspan at end
113 <tspan x=
"345" dy=
"1.2em">xml:
space=
"preserve"</tspan></text>
115 <text x=
"235" y=
"175" xml:
space=
"default"> X X
<tspan fill=
"red" xml:
space=
"preserve"> </tspan></text>
116 <text class=
"cap" x=
"345" y=
"165">tspan end
2spc
117 <tspan x=
"345" dy=
"1.2em">xml:
space=
"preserve"</tspan></text>
119 <text x=
"235" y=
"200" xml:
space=
"default"> X X
<tspan fill=
"red" xml:
space=
"preserve"> </tspan></text>
120 <text class=
"cap" x=
"345" y=
"190">tspan end
121 <tspan x=
"345" dy=
"1.2em">xml:
space=
"preserve"</tspan></text>
123 <text x=
"235" y=
"225" xml:
space=
"default"><tspan fill=
"red" xml:
space=
"preserve"> </tspan> X X
</text>
124 <text class=
"cap" x=
"345" y=
"215">tspan start
125 <tspan x=
"345" dy=
"1.2em">xml:
space=
"preserve"</tspan></text>
127 <text x=
"235" y=
"250" xml:
space=
"default"> <tspan fill=
"red" xml:
space=
"preserve"> </tspan>X X
</text>
128 <text class=
"cap" x=
"345" y=
"240">tspan near start
129 <tspan x=
"345" dy=
"1.2em">xml:
space=
"preserve"</tspan></text>
131 <text x=
"235" y=
"275" xml:
space=
"default"> X
<tspan fill=
"red" xml:
space=
"preserve"> </tspan> X
</text>
132 <text class=
"cap" x=
"345" y=
"265">tspan middle front
133 <tspan x=
"345" dy=
"1.2em">xml:
space=
"preserve"</tspan></text>
135 <text x=
"235" y=
"300" xml:
space=
"default"> X
<tspan fill=
"red" xml:
space=
"preserve"> </tspan>X
</text>
136 <text class=
"cap" x=
"345" y=
"290">tspan middle end
137 <tspan x=
"345" dy=
"1.2em">xml:
space=
"preserve"</tspan></text>
139 <text x=
"235" y=
"325" xml:
space=
"default"> <foo:xxx/> X X
</text>
140 <text class=
"cap" x=
"345" y=
"315">unknown element
141 <tspan x=
"345" dy=
"1.2em">start
</tspan></text>
143 <text x=
"235" y=
"350" xml:
space=
"default"> X
<foo:xxx/> X
</text>
144 <text class=
"cap" x=
"345" y=
"340">unknown element
145 <tspan x=
"345" dy=
"1.2em">middle
</tspan></text>
147 <text x=
"236" y=
"375" xml:
space=
"default"> X X
<foo:xxx/> </text>
148 <text class=
"cap" x=
"345" y=
"365">unknown element
149 <tspan x=
"345" dy=
"1.2em">end
</tspan></text>