473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

xlink from SVG to HTML anchor in containing page

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
work.
Here is my example:
test.svg:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="700" height="400" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<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>
</text>
</a>
</g>
<!-- Show outline of canvas using 'rect' element -->
<rect x="0" y="0" width="700" height="400" fill="none" stroke="blue"
stroke-width=".02cm"/>
</svg>

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

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
0 1600

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Erik Jälevik | last post by:
Is it possible to use XLink within an XHTML document? I am trying the following in Mozilla Firebird 0.7 (which supposedly supports XLink) and I don't get a link: <?xml version="1.0"...
4
by: eagle0Nine | last post by:
I'm fairly new at using XML XSL and XLink, and I was wondering how I could use the three to create a menu link to another page (i.e. a menu button "Contact Us" would link to a seperate contact...
1
by: DV | last post by:
Hello, can anyone tell me or point me to somewhere what the exact differences (in terms of when would I use what) between XPath, XLink, XPointer and DOM are? Does it require special software...
0
by: Gene Ellis | last post by:
Very simple question. If I have the XML file below: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="newspage.xsl"?> <newspage> <content>Click here for blah...
2
by: Ingvill | last post by:
Hi! I have tried to make a link to a document in XML by using XLink. It doesn't work in Internet Explorer 6.0, only in Mozilla Firefox. Is it possible to make this work? Best regards, Ingvill
2
by: adMjb | last post by:
Hi Any help would be fantastic I have a simple problem but I cant work it out... DOHH...., this is my XML: <?xml version="1.0" encoding="UTF-8" ?> <?xml-stylesheet type="text/css"...
5
by: David Housman | last post by:
Hello, I'm trying to implement a navigation bar with a ul in css. The code is a template, but i'm customizing. I can handle just text in each block, but i want the first block to have an image...
1
by: kaye80 | last post by:
I have an XML and XSL document. I am trying to incorporate hyperlinks throughout the XML document. I have read many of the related posts on this and other forums but I can't seem to get it right. ...
0
by: osin | last post by:
Hello everyone, I need to generate an XML file whose element would be an active link (triggering a PERL script). The only tool I've found which is capable of doing it is Xlink. The problem is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.