473,770 Members | 4,055 Online
Bytes | Software Development & Data Engineering Community
+ 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 1788


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.faqt s.com/">JavaScript.FA QTs</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.faqt s.com/">JavaScript.FA QTs</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="ht tp://www.w3.org/1999/xlink"
xlink:type="sim ple"
xlink:show="rep lace"
xlink:href="htt p://javascript.faqt s.com/">JavaScript.FA QTs</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="test20031 207.css"?>
<para>
This is text followed by a simple XLink
<mylink xmlns:xlink="ht tp://www.w3.org/1999/xlink"
xlink:type="sim ple"
xlink:show="rep lace"
xlink:href="htt p://javascript.faqt s.com/">JavaScript.FA QTs</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
2356
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">
1
4038
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?
4
4002
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") Works in other browsers... except Safari, where it always returns null Any ideas?
1
1659
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
9592
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10058
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
10004
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
8886
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6678
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
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
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.