XML
  Home arrow XML arrow Page 5 - XLink Basics
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

XLink Basics
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2001-10-05

    Table of Contents:
  • XLink Basics
  • ...In With The New
  • Playing By The Rules
  • A Little Experiment
  • Back To Base
  • A Little More...

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    XLink Basics - Back To Base


    (Page 5 of 6 )

    You already know that XLink allows for inbound, outbound or third-party arcs. Most of the time, arcs are outbound - the direction of link traversal is from the local document to a remote resource - and XLink has no trouble identifying the starting point. However, when the starting point of link traversal is remote, XLink has no way of knowing where to find the link information to initiate the process of traversal.

    It's precisely to address this kind of situation that the XLink specification allows for "linkbases" or link databases - essentially, well-formed XML documents that contain extended link information.

    XLink defines a link to a linkbase by adding the value

    http://www.w3.org/1999/xlink/properties/linkbase
    to the arc's "arcrole" attribute. When an XLink link processor comes across such an arc definition, it locates the linkbase, loads the links within it and processes them as per its own built-in rules.

    Here's an example of a country being linked to a linkbase of states:

    <ext xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="extended"> <!-- start from here --> <link xlink:type="resource" xlink:label="country" xlink:title="Country">United States</link> <!-- linkbase containing links to states --> <directory xlink:type="locator" xlink:href="states.xml" xlink:label="states" xlink:title="States within country" /> <!-- special linkbase arc with arcrole attribute --> <arc xlink:type="arc" xlink:from="country" xlink:to="states" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:show="replace" xlink:actuate="onRequest" /> </ext>
    The XLink specification also raises the possibility of "chained" linkbases - one of the links within the linkbase is itself a link to another linkbase, and so on. While the idea is certainly interesting - think of a Yahoo!-type portal, composed entirely of interconnected XML linkbases - it remains to be seen how link authors would utilize this capability.

    More XML Articles
    More By Vikram Vaswani, (c) Melonfire


     

       

    XML ARTICLES

    - How to Set Up Podcasting and Vodcasting
    - Creating an RSS Reader Application
    - Building an RSS File
    - An Introduction to XUL Part 6
    - An Introduction to XUL Part 5
    - An Introduction to XUL Part 4
    - An Introduction to XUL Part 3
    - An Introduction to XUL Part 2
    - An Introduction to XUL Part 1
    - XML Matters: Practical XML Data Design and M...
    - Practical XML Data Design and Manipulation f...
    - SimpleXML
    - XForms Basics, Part 3
    - XForms Basics, Part 2
    - XForms Basics





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway