| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" |
| "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.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. |
| |
| --> |
| <!-- ====================================================================== --> |
| <!-- Modification of a tref attributes --> |
| <!-- --> |
| <!-- @author tkormann@ilog.fr --> |
| <!-- @author nicolas.socheleau@bitflash.com --> |
| <!-- @version $Id$ --> |
| <!-- ====================================================================== --> |
| |
| <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| |
| <svg id="body" width="450" height="500" viewBox="0 0 450 500"> |
| <title><tref> CSS properties on 'onload'</title> |
| |
| <text x="50%" y="45" class="title"><tref> CSS properties on 'onload'</text> |
| |
| <script type="text/ecmascript"><![CDATA[ |
| function changeStyle(evt, newValue) { |
| evt.target.setAttribute("style", newValue); |
| } |
| ]]></script> |
| |
| <defs> |
| <text id="text1">font-family:Arial</text> |
| <text id="text2">font-size:32</text> |
| <text id="text3">fill:crimson</text> |
| <text id="text4">stroke:orange; font-size:18</text> |
| <text id="text5">text-anchor:start</text> |
| <text id="text6">text-anchor:middle</text> |
| <text id="text7">text-anchor:end</text> |
| <text id="text8">font-weight:bold</text> |
| <text id="text9">font-style:italic</text> |
| <text id="text10">letter-spacing:10</text> |
| </defs> |
| |
| <g id="test-content" style="font-size:18"> |
| |
| <text x="100" y="100"><tref xlink:href="#text1" onload="changeStyle(evt, 'font-family:Impact')"/></text> |
| <text x="100" y="140"><tref xlink:href="#text2" onload="changeStyle(evt, 'font-size:32')"/></text> |
| <text x="100" y="180"><tref xlink:href="#text3" onload="changeStyle(evt, 'fill:crimson')"/></text> |
| <text x="100" y="220"><tref xlink:href="#text4" onload="changeStyle(evt, 'stroke:orange;font-size:18')"/></text> |
| |
| <text x="50%" y="260"><tref xlink:href="#text5" onload="changeStyle(evt, 'text-anchor:start')"/></text> |
| <text x="50%" y="300"><tref xlink:href="#text6" onload="changeStyle(evt, 'text-anchor:middle')"/></text> |
| <text x="50%" y="340"><tref xlink:href="#text7" onload="changeStyle(evt, 'text-anchor:end')"/></text> |
| <text x="100" y="380"><tref xlink:href="#text8" onload="changeStyle(evt, 'font-weight:bold')"/></text> |
| <text x="100" y="420"><tref xlink:href="#text9" onload="changeStyle(evt, 'font-style:italic')"/></text> |
| <text x="100" y="460"><tref xlink:href="#text10" onload="changeStyle(evt, 'letter-spacing:10')"/></text> |
| |
| </g> |
| </svg> |