At the time of this writing, Internet Explorer browser has no support for XLink. The Netscape 6.x and Mozilla 1.x browsers support XLink simple links only.
Listings 14.1 and 14.2 show two brief XML documents that each contain a single XLink simple link.
Notice that the XLink namespace is declared in each listing on the document element. For ease of display in the screenshots, the documents have been linked to a CSS style sheet shown in Listing 14.3.
myElement { font-family:Arial, sans-serif; font-size:30pt; color:blue; text-decoration:underline; } |
Without the CSS stylesheet, the XML text would be displayed as black, without underlining, and in the default font.
Figure 14.1 shows Listing 14.1 displayed in the Mozilla 1.0 browser. Note that the cursor changes to a pointing finger cursor over the linking text.
If you wanted Listing 14.2 to display in a new browser window, you could simply add an xlink:show attribute with the value of new, as shown in Listing 14.4.
One of the XML application languages that already implements XLink simple links is the W3C’s Scalable Vector Graphics (SVG) specification. SVG 1.0 does not support XLink extended links. An XLink example in SVG is shown in Chapter 15.
Having looked at how you can link whole Web pages, let’s move on to see how XPointer handles XML fragment identifiers.