|ceXML - an XML vocabulary for building and civil engineering: Master thesis|
|Prev||Appendix A. Deeper introduction on XML and related technologies||Next|
This section deals with XML Linking, the XML technology needed if you intend to link together various pieces of information (like a technical drawing and the XML files containing the information about the various parts).
Formerly also known as XLink and XLL (eXtensible Linking Language), XML Linking provides the mechanism needed by XML to interconnect. It's role is comparable to HTML's <a href="something.html">...</a> tag, but with many more possibilities. It should be noted, though, that there is practically no browser support for the additional functionality. Of course, XML Linking only works in XML enabled programs.
Any XML element can be used as a link by adding an xlink:type attribute to the element, provided the xmlns:xlink="http://www.w3.org/1999/xlink" namespace is enabled for that element. As an example, <author xlink:type="simple" xlink:href="mailto:R.vanRees@ct.tudelft.nl" >Reinout</author> is an author tag which points towards an email address. This type="simple" usage is in fact the old HTML kind of linking.
The type="extended" usage is the other way XML Linking can be used. An extended link is best described as a directed labelled graph, connecting multiple nodes with arcs. Do not mistake the extended link to mean just one link, it can be, but normally it is a set of links (better: arcs). It is composed of arbitrary tags having the following attributes:
Indicates an element containing elements which form a directed labelled graph.
Indicates an element which points toward a remote location. That is, this element serves as a node in the graph, pointing towards a remote resource with a mandatory href="somewhere.xml" attribute.
Indicates an element which serves as a local node. That is, the element doesn't point towards a remote location, the information inside the element itself is pointed to.
Indicates an element describing one or more arcs (or: links) between nodes using xlink:from="..." and xlink:to="..." tags. The text on the dots are the allowed origin(s) and destination(s) of the arc. xlink:to="Dutch_mirror" means that this arc points towards all nodes which have the xlink:role="Dutch_mirror" attribute.
There are three major ways in which to use XML Linking:
Any XML element can be made to behave just like the <a href="...">...</a> tag of HTML, with the same purpose and usage pattern. Just simple hyperlinking.
One local resource can point to multiple locators (remote information). This way, clicking on a link may bring up a small menu of possible choices listing a few mirror sites, for example. Or, in an eventual online version of the lexicon, it might link one Dutch term to the three possible alternative Norwegian terms.
Used this way, the document containing the XML Links is called a linkbase. It does not contain any of the information which the links point to. It contains links that point to information on other pages, possibly commenting on it, providing extra information, etc. When proper tools or browsers become available, a user might load an external linkbase and use it for browsing a vendor's online documentation, all the while comparing this vendor's products to the equivalent products of two other firms. Or an image of a building crane might with one linkbase redirect a click on part of the image to the online documentation and with another linkbase redirect it to an enlarged picture of that specific part.
When ceXML is going to utilise XML instead of HTML for client side presentation, at least the xlink:type="simple" usage is mandatory. Due to the (normally) many contractors in a building and construction environment, the out-of-line links (linkbase) looks like a good way to glue together various bits of information without the need to centralise all those bits of information. Also the one-to-many possibilities built into XML Linking make it possible to present different views on a specific part (either the supplier's information on the part, an enlarged photo, it's maintenance record, a error reporting form, etc.)