I'd like to reference a 2nd SVG File into my file but with giving it a parameter. To do that I found this documentation:
http://www.w3.org/TR/2009/WD-SVGParamPrimer-20090616/
But I can't get any of those 2 solutions working.
The first one with the <Object> Tag doesn't work at all at current Firefox. And Firebug says the <param> Tag shouldn't be used anymore.
The GET-parameter solution isn't working here, too. Either the JavaScript isn't executed or it prints the location of the main file, so the GET-parameter is not visible. But the picture is included right with it.
So, my goal is to set a color of the 2nd file in the main file. Anybody got an idea how to do this or what's wrong with my solutions?
Main file:
Code: Select all
<!-- No Picture -->
<object type="image/svg+xml" data="a1.svg" x="80" y="80" width="80" height="80">
<param name="color" value="red" />
</object>
<!-- Wrong URL -->
<image x="80" y="80" width="80" height="80" cursor="pointer" xlink:href="car.svg" />
2nd File:
Code: Select all
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<svg width="84" version="1.2" xmlns="http://www.w3.org/2000/svg" height="42" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:atv="http://webmi.atvise.com/2007/svgext">
<defs/>
<metadata/>
<!-- Variable fill color... -->
<circle fill="#dbdbdb" cx="25.993" cy="33.119" stroke="#000000" r="4.237" id="x" stroke-width="1" />
<script type="text/ecmascript"><![CDATA[
alert(window.location);
]]></script>
</svg>
I'd very thankful for any help.