O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Locating Resources with xlink:href

The xlink:href attribute is also called the locator attribute. This is the attribute that supplies the data that allows an XLink application to find a remote resource.

URI Definition

Although XLinks can be quite general, they commonly use URIs to locate resources. You usually use a URI in xlink:href. Now that we're examining the way linking works in XML, you might want to look up the formal definition of URIs, which you can find in its entirety at www.ics.uci.edu/pub/ietf/uri/rfc2396.txt.

We've seen that you can set the xlink:href attribute to specify a document and an XPointer:

<MOVIE_REVIEW xmlns:xlink = "http://www.w3.org/1999/xlink" 
    xlink:type = "simple"
    xlink:show = "new"
    xlink:href = "http://www.starpowdermovies.com/reviews.xml#xpointer(/child::*[position ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required