By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,918 Members | 1,816 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,918 IT Pros & Developers. It's quick & easy.

xlink from SVG to HTML anchor in containing page

P: n/a
Hello all.
I hope this is the right group to ask my question.

I have an HTML page that contains an SVG file in an object.
Inside an SVG file I want to add a link to link to some anchor on
the including HTML page. I tried to do it, but it doesn't seem to
Here is my example:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
<svg width="700" height="400" xmlns=""
<rect width="100" height="50" x="330" y="180" fill="pink"/>
<a xlink:href="test.html#end">
<text x="358" y="205">
<tspan>page </tspan>
<tspan x="358" dy="15"> title</tspan>
<!-- Show outline of canvas using 'rect' element -->
<rect x="0" y="0" width="700" height="400" fill="none" stroke="blue"

<title>test svg</title>
<p>test svg</p>
<object type="image/svg+xml" data="test.svg" width="500"
<p>test end</p>
<a name="end"></a>

When I click on the link in embedded SVG, just nothing happens.
If I use a full URL of some site as the value of xlink:href, it works,
but I want to use a local anchor.
What is the right syntax to do this?

Thank you very much for help
Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.