blob: 7f1b926cd826adc93ec5e2fc150442a47faed8b7 [file] [log] [blame]
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- ====================================================================== -->
<!-- Test of the style element -->
<!-- -->
<!-- @author tkormann@ilog.fr -->
<!-- @version $Id$ -->
<!-- ====================================================================== -->
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
<svg id="body" width="450" height="500" viewBox="0 0 450 500"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<style type="text/css">
rect { stroke="black" }
</style>
<!-- The '.blue' will be applied as the comment characters will be ignored.
the '.green' rule will not be as the parser will abort on the invalid
'TEST' content because the CDATA block hides the XML comments from
the XML parser. -->
<style type="text/css"><![CDATA[
<!-- .blue { fill: blue } -->
<!-- TEST -->
.green { fill: green }
/*end of css */
]]></style>
<!-- Only .yellow will be applied .purple will be stripped by the
XML parser (Note no CDATA block). -->
<style type="text/css">
<!-- .purple { fill: purple } -->
<!-- TEST -->
.yellow { fill: yellow }
/* end of css */
</style>
<title>Test of XML comments in &lt;style&gt; elements</title>
<text x="50%" y="50" class="title"
>Test of XML comments in &lt;style&gt; elements</text>
<g id="test-content" >
<rect class="blue" x="10" y="100" width="100" height="50"/>
<text x="150" y="125">class="blue"</text>
<rect class="green" x="10" y="175" width="100" height="50"/>
<text x="150" y="200">class="green"</text>
<rect class="purple" x="10" y="250" width="100" height="50"/>
<text x="150" y="275">class="purple"</text>
<rect class="yellow" x="10" y="325" width="100" height="50"/>
<text x="150" y="350">class="yellow"</text>
</g>
</svg>