Document Fragments and XPointer

In HTML documents, the process of addressing a specific part of the document involves using anchors. This can be a useful mechanism, but it does have significant limitations.

Caution

Immediately before this writing, the XPointer specification was split into four W3C Working Drafts. The description that follows is based on those drafts and, therefore, is potentially subject to change.

Let’s suppose that you want to link to the HTML document shown in Listing 14.5. It includes many br tags to space out the anchors.

Listing 14.5. Anchors.html: An HTML Document with Anchors
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML ...

Get Sams Teach Yourself XML in 10 Minutes 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.