Home » Internet » Web Design

What is XLink?

Aug 26, 2007
My existence on this planet as a web designer was so easy when I first started developing websites back in 1996. Ah, those were the days. When someone wanted me to create their website, they would provide all the content and some simple design instructions, then I would transfer that content into a simple text file, use basic HTML to give it some formatting, throw in some graphics and a logo, upload the files and collect my money.

Since the turn of the century, the task of designing a website has become intensely complicated, and it continues to become more difficult everyday. When wireless internet access was introduced, every electronic device imaginable came equipped with access to the internet and email. People were surfing the web on their laptops, palm tops, cell phones, even on computer screens installed in automobiles which had previously only been used for navigation.

The birth of the wireless revolution changed the future of programming. These wireless devices often have web browsers that work very differently from the ones installed on an ordinary desktop PC. Many of these browsers are not fully compatible with many elements of the HTML programming language. As a result, people surfing the net on their wireless gadgets can not view many websites that are created using only basic HTML.

To fix the situation, languages and specifications that could be adapted across any platform were created. These new innovations included XML, XHTML, XSL, and several others. XML was a language that defined data without telling the web browser how to display it, as opposed to HTML, which displayed data a certain way. This enabled data to be viewed on virtually any system because an XML file was a simple text file that could be understood and displayed on any browser. XHTML and XSL are complex programming specifications that transformed XML into actual web pages that could be displayed effectively on all browsers.

Now that you have a basic understanding of how and why programming has changed, you are now ready for the main topic of this article, XLink. If you work as a web designer, you probably know how to create a hyperlink. Hyperlinks are created by putting some text in between link tags that delineate the URL that the text placed between the tags is to be linked to.

With XML, creating a hyperlink is more complicated because with XML, there are no predefined tags. With XML, you can create any tags you please and a web browser does not know what any of them mean, because XML merely defines data, it contains no instructions as to how to display the data.

So, to create a hyperlink in XML, you must declare what an XLink is at the top of the XML document using what is called an XML namespace, so that wherever an XLink appears within the document, the web browser will know that the XLink is a hyperlink and display it. The reason why we have to use a namespace is because XML tags are not predefined. By using the XLink namespace, the browser will know that when you apply the XLink marker within your XML document, you are intending to create a hyperlink. Go to the Word Wide Web Consortium (W3) web site to find out how the XLink namespace is created.

It is also possible to create a hyperlink in an XML document that links to another portion of that same XML document, much the same way anchor tags are used in HTML to create a link to another portion of the same web page. Links to different sections of the same web page are often seen on pages that contain Frequently Asked Questions (FAQ), so that the user can click on the question and immediately skip down to the answer which usually appears somewhere else on that same page. With XML, anchor tags are not used. Instead, XPointer Syntax is utilized. XPointer Syntax is very simple to create; like HTML, XPointer makes use of the number sign to indicate the text that is to be anchored to, but the syntax that is used to define the link is not indicated the same way as it is with HTML. To find out how to use XPointer, visit the World Wide Web Consortium (W3) website or perform a search on any search engine for XPointer tutorials.

Every web designer should learn how to use XML, XHTML, and XSL if they want to survive in the constantly changing world of web design. Internet access is now available on almost every electronic device imaginable, so it absolutely necessary to create versatile web sites that can be viewed by everyone regardless of how they connect to the world wide web.
About the Author
Jim Pretin is the owner of http://www.forms4free.com, a service that helps programmers make email forms.
Please Rate:
(Average: Not rated)
Views: 141
Print Email Report Share
Article Categories