473,654 Members | 3,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="ht tp://www.w3.org/1999/xlink">
<g>
<rect width="100" height="50" x="330" y="180" fill="pink"/>
<a xlink:href="tes t.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 1623

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

Similar topics

5
2352
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" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xl="http://www.w3.org/1999/xlink">
4
1783
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 page). I've tried implementing XLink, but I seem to be failing. If I use it properly, would the link show up on an XML file (the one I am viewing through XSLT) as a hyperlink to another site (like any <a href>?). This seems to be my major barrier....
1
4031
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 to use any of these, or can any XML-aware software (parser/validator or xsl- enginge) use any of these?
0
1392
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 blah</content> </newspage> How can I use XLink to make an HTML hyperlink out of the "click here" text?
2
2727
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
1960
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" href="BSI%20Test.css"?> <document xmlns:xlink="http://www.w3.org/1999/xlink"
5
5482
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 and then text, which I'm doing with a span element. I think i need it that way to handle text positioning of the text. So there's an anchor block, and inside4 that i'm putting an image and a span block.
1
1653
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. Please help! Do I have to declare the namespace in the XSL doc also as shown below or should I take it out? No matter what I do, nothing appears for the link tag in the browser. a piece of my xml DOC (using google for now as an easy example but...
0
2592
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 that it doesn't work properly. My XML file is : <searchresult xmlns:xlink="http://www.w3.org/1999/xlink"> <account> <accountpoid xlink:type="simple" xlink:show="replace" xlink:href="http:/localhost/cgi-bin/sample12_copy.pl">16213</accountpoid>...
0
8290
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8708
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8489
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8594
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2716
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.