473,490 Members | 2,635 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

XLink to other sites?

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. Any help is really appreciated.
Jul 20 '05 #1
4 1769


eagle0Nine wrote:
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. Any help is really appreciated.


If you use XSLT then you can transform to HTML and use HTML links, that is
<a href="whatever.html">link text</a>
elements.
I am not sure what you want to use XLink for, Mozilla 1.4 I think
supports simple XLinks but other browsers don't do that.
--

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

Jul 20 '05 #2
OK, that doesn't help. So... how would I place a link like <a
href="whatever.html"> in an XML document, as opposed to the XSL?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3


Chris Barajas wrote:
OK, that doesn't help. So... how would I place a link like <a
href="whatever.html"> in an XML document, as opposed to the XSL?


Well, there is XHTML, and XML allows elements with different namespaces
so you could have
<a xmlns="http://www.w3.org/1999/xhtml"
href="http://javascript.faqts.com/">JavaScript.FAQTs</a>
as an XHTML link in an XML document, for instance

<?xml version="1.0" encoding="UTF-8"?>
<para>
This is text followed by an XHTML link
<a xmlns="http://www.w3.org/1999/xhtml"
href="http://javascript.faqts.com/">JavaScript.FAQTs</a>
</para>

Save that .xml and browser like Opera 7 or Netscape 7 which have
XML/XHTML support will recognize the XHTML namespace on the <a> element
and render it as a clickable link, just like in an HTML document.
But IE5/6/Win doesn't support that.

Or make any element an XLink:

<mylink xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:show="replace"
xlink:href="http://javascript.faqts.com/">JavaScript.FAQTs</mylink>

but only Mozilla based browsers like Netscape 7 then make that element a
clickable link, and you also need to apply some CSS to have the normal
underline look and the normal link color:

para {
display: block;
margin: 0.2em;
}
mylink {
text-decoration: underline;
color: blue;
}
XML example:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="test20031207.css"?>
<para>
This is text followed by a simple XLink
<mylink xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:show="replace"
xlink:href="http://javascript.faqts.com/">JavaScript.FAQTs</mylink>
</para>
--

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

Jul 20 '05 #4
Thanks. I tried the XLink a couple of times, and went "huh?" when it
didn't work.

Now, I'm going to go scream at Microblow.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #5

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

Similar topics

5
2331
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"...
1
3999
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...
4
3983
by: Lance Dyas | last post by:
I have managed to get the xml to load using the xmlHTTPrequest... (inspite of premature readyState 4) the problem now arises in Safari alone... var thelink = node.getAttribute("xlink:href") ...
1
1648
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
7112
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
6974
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...
1
6852
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...
0
7356
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...
0
5448
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4573
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3084
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...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1389
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 ...

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.