| 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 |
<!-- dynamic update for image --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ========================================================================= --> |
| 29 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 30 |
|
| 31 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 32 |
<title>update on <image></title> |
| 33 |
|
| 34 |
<style type="text/css"><![CDATA[ |
| 35 |
|
| 36 |
]]></style> |
| 37 |
<script type="text/ecmascript" > |
| 38 |
var xlinkNS = "http://www.w3.org/1999/xlink"; |
| 39 |
function setRef(evt,ref){ |
| 40 |
var e = evt.target; |
| 41 |
e.setAttributeNS(xlinkNS,"href",ref); |
| 42 |
} |
| 43 |
</script> |
| 44 |
|
| 45 |
<g id="content"> |
| 46 |
|
| 47 |
<text class="title" x="50%" y="40"><image> dynamic tests</text> |
| 48 |
|
| 49 |
<defs> |
| 50 |
<rect id="Rect1" x="40" y="-20" width="100" height="40" /> |
| 51 |
<rect id="Rect2" x="60" y="-60" width="40" height="100" /> |
| 52 |
</defs> |
| 53 |
|
| 54 |
<g transform="translate(70,150)"> |
| 55 |
<use xlink:href="#Rect1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 56 |
<image x="40" y="-20" width="100" height="40" preserveAspectRatio="none" xlink:href="../../resources/images/svg.svg" /> |
| 57 |
<text font-size="10" x="35" y="60">SVG image Reference</text> |
| 58 |
</g> |
| 59 |
|
| 60 |
|
| 61 |
<g transform="translate(230,150)"> |
| 62 |
<use xlink:href="#Rect1" style="fill:none; stroke:blue; stroke-width:2"/> |
| 63 |
<image x="40" y="-20" width="100" height="40" preserveAspectRatio="none" xlink:href="../../resources/images/svg.svg" |
| 64 |
onload="setRef(evt,'../../resources/images/svg3.svg')" onclick="alert('click supported')" /> |
| 65 |
<text font-size="10" x="35" y="60">SVG Image changed</text> |
| 66 |
</g> |
| 67 |
|
| 68 |
|
| 69 |
<g transform="translate(70,300)"> |
| 70 |
<use xlink:href="#Rect2" style="fill:none; stroke:blue; stroke-width:2"/> |
| 71 |
<image x="60" y="-60" width="40" height="100" preserveAspectRatio="none" xlink:href="../../resources/images/svg.png" /> |
| 72 |
<text font-size="10" x="35" y="60">PNG Image Reference</text> |
| 73 |
</g> |
| 74 |
|
| 75 |
|
| 76 |
<g transform="translate(230,300)"> |
| 77 |
<use xlink:href="#Rect2" style="fill:none; stroke:blue; stroke-width:2"/> |
| 78 |
<image x="60" y="-60" width="40" height="100" preserveAspectRatio="none" xlink:href="../../resources/images/svg.png" |
| 79 |
onload="setRef(evt,'../../resources/images/png.png')" onclick="alert('clisk supported')" /> |
| 80 |
<text font-size="10" x="35" y="60">PNG Image changed</text> |
| 81 |
</g> |
| 82 |
</g> |
| 83 |
|
| 84 |
<!-- ============================================================= --> |
| 85 |
<!-- Batik sample mark --> |
| 86 |
<!-- ============================================================= --> |
| 87 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 88 |
|
| 89 |
</svg> |
| 90 |
|