URI + XPath == XPointer

The examples so far have used URI for document entities. It is also possible to combine the URI of a document entity with an XPath expression to narrow the scope of the referent. This is the role of the XML Pointer Language (XPointer) language.

XPointer defines how XPath expressions can be used within URI fragment identifiers to identify subsets of particular XML documents. URI fragment identifiers are commonly used in Web documents to address a particular location within a document. For example, the following URI specifies that the User-Agent should navigate to the location within the document identified by the gohere ID:

http://www.guitars-r-us.com/guitarlist.htm#gohere

The URI fragment identifier is the part that comes ...

Get Essential XML: Beyond Markup now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.