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

XLink within XHTML

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a


Erik Jšlevik wrote:
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.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

P: n/a
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:3f********@olaf.komtel.net...

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
Jul 20 '05 #3

P: n/a
Nope, even from the web server, "Link test" just shows up as normal text.

Erik
Jul 20 '05 #4

P: n/a


Erik Jšlevik wrote:
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.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #5

P: n/a
Thanks a lot! That works.

Erik
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.