In this section, we will look at the concepts that XPointer adds to those provided in XPath.
A location generalizes the idea of a node, which you saw in Chapter 11 when we looked at XPath. A location can be a node (as in XPath), a point, or a range. In a moment, we will examine precisely what a point and a range are.
Consider the following snippet of code:
<paragraph number="1"> This is the text in the first paragraph. This paragraph has two sentences. </paragraph> <paragraph number="2"> This is also a paragraph. It too has two sentences. </paragraph>
In the XPath data model, the preceding code would have two paragraph element nodes and two text nodes—each text node being a child node of its parent ...