| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" |
| 3 |
"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.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 |
<!-- Modification of a tref attributes --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 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 |
<title><tref> CSS properties on 'onload'</title> |
| 35 |
|
| 36 |
<text x="50%" y="45" class="title"><tref> CSS properties on 'onload'</text> |
| 37 |
|
| 38 |
<script type="text/ecmascript"><![CDATA[ |
| 39 |
function changeStyle(evt, newValue) { |
| 40 |
evt.target.setAttribute("style", newValue); |
| 41 |
} |
| 42 |
]]></script> |
| 43 |
|
| 44 |
<defs> |
| 45 |
<text id="text1">font-family:Arial</text> |
| 46 |
<text id="text2">font-size:32</text> |
| 47 |
<text id="text3">fill:crimson</text> |
| 48 |
<text id="text4">stroke:orange; font-size:18</text> |
| 49 |
<text id="text5">text-anchor:start</text> |
| 50 |
<text id="text6">text-anchor:middle</text> |
| 51 |
<text id="text7">text-anchor:end</text> |
| 52 |
<text id="text8">font-weight:bold</text> |
| 53 |
<text id="text9">font-style:italic</text> |
| 54 |
<text id="text10">letter-spacing:10</text> |
| 55 |
</defs> |
| 56 |
|
| 57 |
<g id="test-content" style="font-size:18"> |
| 58 |
|
| 59 |
<text x="100" y="100"><tref xlink:href="#text1" onload="changeStyle(evt, 'font-family:Impact')"/></text> |
| 60 |
<text x="100" y="140"><tref xlink:href="#text2" onload="changeStyle(evt, 'font-size:32')"/></text> |
| 61 |
<text x="100" y="180"><tref xlink:href="#text3" onload="changeStyle(evt, 'fill:crimson')"/></text> |
| 62 |
<text x="100" y="220"><tref xlink:href="#text4" onload="changeStyle(evt, 'stroke:orange;font-size:18')"/></text> |
| 63 |
|
| 64 |
<text x="50%" y="260"><tref xlink:href="#text5" onload="changeStyle(evt, 'text-anchor:start')"/></text> |
| 65 |
<text x="50%" y="300"><tref xlink:href="#text6" onload="changeStyle(evt, 'text-anchor:middle')"/></text> |
| 66 |
<text x="50%" y="340"><tref xlink:href="#text7" onload="changeStyle(evt, 'text-anchor:end')"/></text> |
| 67 |
<text x="100" y="380"><tref xlink:href="#text8" onload="changeStyle(evt, 'font-weight:bold')"/></text> |
| 68 |
<text x="100" y="420"><tref xlink:href="#text9" onload="changeStyle(evt, 'font-style:italic')"/></text> |
| 69 |
<text x="100" y="460"><tref xlink:href="#text10" onload="changeStyle(evt, 'letter-spacing:10')"/></text> |
| 70 |
|
| 71 |
</g> |
| 72 |
</svg> |