Debian Codegraph @

samples/tests/spec/text/xmlSpace.svg

raw
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">
4
5 <!--
6
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
13
14 http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21
22 -->
23 <!-- ====================================================================== -->
24 <!-- Tests "proper" handling of xml:space -->
25 <!-- -->
26 <!-- @author [email protected] -->
27 <!-- @version $Id$ -->
28 <!-- ====================================================================== -->
29
30 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
31
32 <svg width="450" height="500" viewBox="0 0 450 500"
33 xmlns="http://www.w3.org/2000/svg"
34 xmlns:xlink="http://www.w3.org/1999/xlink"
35 xmlns:foo="http://graphics.apache.org/batik/foo">
36
37 <text class="title" x="50%" y="40">Test of xml:space handling</text>
38
39 <font horiz-adv-x="600" id="stroke">
40 <font-face
41 font-family="BlockSpace"
42 font-weight="normal"
43 units-per-em="1000"
44 ascent="1000"
45 descent="250"
46 alphabetic="0"/>
47
48 <missing-glyph horiz-adv-x="600" d="M0 0 V800 H500 V0 z"/>
49
50 <glyph unicode=" " glyph-name=" " horiz-adv-x="600"
51 d="M20 0 V800 H520 V0 z M 50 30 H490 V770 H50 z"/>
52 </font>
53 <style type="text/css"><![CDATA[
54 .cap { font: normal normal 8 monospaced;
55 stroke: none; stroke-width: 0;
56 fill: black } ]]>
57 </style>
58
59 <g font="20 BlockSpace">
60 <text x="10" y=" 75"> X X </text>
61 <text class="cap" x="120" y="75">no xml:space attr</text>
62
63 <text x="10" y="100" xml:space="default"> X X </text>
64 <text class="cap" x="120" y="100">xml:space="default"</text>
65
66 <text x="10" y="150" xml:space="preserve"> X X <tspan fill="red" xml:space="default"/></text>
67 <text class="cap" x="120" y="140">Empty tspan at end
68 <tspan x="120" dy="1.2em">xml:space="default"</tspan></text>
69
70 <text x="10" y="175" xml:space="preserve"> X X<tspan fill="red" xml:space="default"> </tspan></text>
71 <text class="cap" x="120" y="165">tspan end 2spc
72 <tspan x="120" dy="1.2em">xml:space="default"</tspan></text>
73
74 <text x="10" y="200" xml:space="preserve"> X X <tspan fill="red" xml:space="default"> </tspan></text>
75 <text class="cap" x="120" y="190">tspan end
76 <tspan x="120" dy="1.2em">xml:space="default"</tspan></text>
77
78 <text x="10" y="225" xml:space="preserve"><tspan fill="red" xml:space="default"> </tspan> X X </text>
79 <text class="cap" x="120" y="215">tspan start
80 <tspan x="120" dy="1.2em">xml:space="default"</tspan></text>
81
82 <text x="10" y="250" xml:space="preserve"> <tspan fill="red" xml:space="default"> </tspan>X X </text>
83 <text class="cap" x="120" y="240">tspan near start
84 <tspan x="120" dy="1.2em">xml:space="default"</tspan></text>
85
86 <text x="10" y="275" xml:space="preserve"> X<tspan fill="red" xml:space="default"> </tspan> X </text>
87 <text class="cap" x="120" y="265">tspan middle front
88 <tspan x="120" dy="1.2em">xml:space="default"</tspan></text>
89
90 <text x="10" y="300" xml:space="preserve"> X <tspan fill="red" xml:space="default"> </tspan>X </text>
91 <text class="cap" x="120" y="290">tspan middle end
92 <tspan x="120" dy="1.2em">xml:space="default"</tspan></text>
93
94 <text x="10" y="325" xml:space="preserve"> <foo:xxx/> X X </text>
95 <text class="cap" x="120" y="315">unknown element
96 <tspan x="120" dy="1.2em">start</tspan></text>
97
98 <text x="10" y="350" xml:space="preserve"> X <foo:xxx/> X </text>
99 <text class="cap" x="120" y="340">unknown element
100 <tspan x="120" dy="1.2em">middle</tspan></text>
101
102 <text x="10" y="375" xml:space="preserve"> X X <foo:xxx/> </text>
103 <text class="cap" x="120" y="365">unknown element
104 <tspan x="120" dy="1.2em">end</tspan></text>
105
106 <!-- -->
107
108
109 <text x="235" y="100" xml:space="preserve"> X X </text>
110 <text class="cap" x="345" y="100">xml:space="preserve"</text>
111
112 <text x="235" y="150" xml:space="default"> X X <tspan fill="red" xml:space="preserve"/></text>
113 <text class="cap" x="345" y="140">Empty tspan at end
114 <tspan x="345" dy="1.2em">xml:space="preserve"</tspan></text>
115
116 <text x="235" y="175" xml:space="default"> X X<tspan fill="red" xml:space="preserve"> </tspan></text>
117 <text class="cap" x="345" y="165">tspan end 2spc
118 <tspan x="345" dy="1.2em">xml:space="preserve"</tspan></text>
119
120 <text x="235" y="200" xml:space="default"> X X <tspan fill="red" xml:space="preserve"> </tspan></text>
121 <text class="cap" x="345" y="190">tspan end
122 <tspan x="345" dy="1.2em">xml:space="preserve"</tspan></text>
123
124 <text x="235" y="225" xml:space="default"><tspan fill="red" xml:space="preserve"> </tspan> X X </text>
125 <text class="cap" x="345" y="215">tspan start
126 <tspan x="345" dy="1.2em">xml:space="preserve"</tspan></text>
127
128 <text x="235" y="250" xml:space="default"> <tspan fill="red" xml:space="preserve"> </tspan>X X </text>
129 <text class="cap" x="345" y="240">tspan near start
130 <tspan x="345" dy="1.2em">xml:space="preserve"</tspan></text>
131
132 <text x="235" y="275" xml:space="default"> X<tspan fill="red" xml:space="preserve"> </tspan> X </text>
133 <text class="cap" x="345" y="265">tspan middle front
134 <tspan x="345" dy="1.2em">xml:space="preserve"</tspan></text>
135
136 <text x="235" y="300" xml:space="default"> X <tspan fill="red" xml:space="preserve"> </tspan>X </text>
137 <text class="cap" x="345" y="290">tspan middle end
138 <tspan x="345" dy="1.2em">xml:space="preserve"</tspan></text>
139
140 <text x="235" y="325" xml:space="default"> <foo:xxx/> X X </text>
141 <text class="cap" x="345" y="315">unknown element
142 <tspan x="345" dy="1.2em">start</tspan></text>
143
144 <text x="235" y="350" xml:space="default"> X <foo:xxx/> X </text>
145 <text class="cap" x="345" y="340">unknown element
146 <tspan x="345" dy="1.2em">middle</tspan></text>
147
148 <text x="236" y="375" xml:space="default"> X X <foo:xxx/> </text>
149 <text class="cap" x="345" y="365">unknown element
150 <tspan x="345" dy="1.2em">end</tspan></text>
151
152 </g>
153 </svg>