XLink within XHTML

Erik Jälevik

Usenet Archive
Joined
Nov 5, 2003
Messages
6
Reaction score
0
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"> <body> <p xl:type='simple' xl:href='http://www.google.com' xl:show='replace' xl:actuate='onRequest'> Link test </p> </body> </html>

Am I getting something wrong here? The linking works from a pure xml document.

Btw, the only reason I'm not using <a href>s is that it's for a university assignment and we're specifically forbidden to use HTML links...

Thanks,
Erik
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
Erik said:
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"> <body> <p xl:type='simple' xl:href='http://www.google.com' xl:show='replace' xl:actuate='onRequest'> Link test </p> </body> </html>

Am I getting something wrong here? The linking works from a pure xml document.

How do you serve the document to Mozilla? I guess it can't work if you serve it as text/html but if you serve it as text/xml then it could work.
 

Erik Jälevik

Usenet Archive
Joined
Nov 5, 2003
Messages
6
Reaction score
0
Martin Honnen said:
How do you serve the document to Mozilla? I guess it can't work if you serve it as text/html but if you serve it as text/xml then it could work.

Hmm, I'm just trying it out locally at the moment. The file has extension xml so Mozilla should assume it's being "served" as text/xml. I'll try and upload it to the web server though to see if the link works.

Thanks,
Erik
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
Erik said:
Nope, even from the web server, "Link test" just shows up as normal text.

The following XLink works for me with Netscape 7.1:

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:myElements="http://whatever"
xmlns:xlink="http://www.w3.org/1999/xlink">
<head>
<title>simple XLinks</title>
</head>
<body>
<p>
<myElements:myLink xlink:type="simple"
xlink:href="http://www.kibo.com/"
xlink:show="replace"
xlink:actuate="user">Visit GOD</myElements:myLink>
</p>
</body>
</html>

I am not sure applying xlink attributes to standard XHTML elements is supposed to work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top