Debian Codegraph @

samples/tests/spec/styling/styleElement.svg

raw
1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//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 <!-- ====================================================================== -->
25 <!-- Test of the style element -->
26 <!-- -->
27 <!-- @author [email protected] -->
28 <!-- @version $Id$ -->
29 <!-- ====================================================================== -->
30
31 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
32
33 <svg id="body" width="450" height="500" viewBox="0 0 450 500"
34 xmlns="http://www.w3.org/2000/svg"
35 xmlns:xlink="http://www.w3.org/1999/xlink">
36
37 <style type="text/css">
38 rect { stroke="black" }
39 </style>
40
41 <!-- The '.blue' will be applied as the comment characters will be ignored.
42 the '.green' rule will not be as the parser will abort on the invalid
43 'TEST' content because the CDATA block hides the XML comments from
44 the XML parser. -->
45
46 <style type="text/css"><![CDATA[
47 <!-- .blue { fill: blue } -->
48 <!-- TEST -->
49 .green { fill: green }
50 /*end of css */
51 ]]></style>
52
53 <!-- Only .yellow will be applied .purple will be stripped by the
54 XML parser (Note no CDATA block). -->
55
56 <style type="text/css">
57 <!-- .purple { fill: purple } -->
58 <!-- TEST -->
59 .yellow { fill: yellow }
60 /* end of css */
61 </style>
62
63 <title>Test of XML comments in &lt;style&gt; elements</title>
64 <text x="50%" y="50" class="title"
65 >Test of XML comments in &lt;style&gt; elements</text>
66 <g id="test-content" >
67 <rect class="blue" x="10" y="100" width="100" height="50"/>
68 <text x="150" y="125">class="blue"</text>
69
70 <rect class="green" x="10" y="175" width="100" height="50"/>
71 <text x="150" y="200">class="green"</text>
72
73 <rect class="purple" x="10" y="250" width="100" height="50"/>
74 <text x="150" y="275">class="purple"</text>
75
76 <rect class="yellow" x="10" y="325" width="100" height="50"/>
77 <text x="150" y="350">class="yellow"</text>
78 </g>
79 </svg>
80