Introduction to XPointer

XLink uses the XPointer language to point the hyperlinks to specific parts of an XML document. For example, you can point a link to a particular list item in an XML document. You can also point a link to a sentence in a paragraph of an XML document.

To point a hyperlink to a specific part of a page, add a number sign (#) and an XPointer expression after the URL in the xlink:href attributes. The following code points to the second item in a list with the unique id of color:

  href="http://www.mysite.com/example.xml#id
  ('color').child(2,item)"

In this code, http://www.mysite.com/example.xml indicates the path of an XML document and the #id('color').child(2,item) declaration points to the second item in the list.

After specifying the XPointer constructs in an XML document, applications can use an XPointer processor, which can interpret the XPointer elements and attributes, to point the hyperlinks contained in an XML document. Examples of such applications are HTML web browsers and XInclude processors.
The graphic shows a hyperlink in an XML document point to another XML page.
Click the Next button to continue.