You can create ranges with two points, a start point and an end point, as long as they are in the same document and the start point is not after the end point. (If the start point and the end point are the same, the range is said to be collapsed.) A range is all of the XML structure between those two points.
A range doesn't have to be a neat subsection of a document; it can extend from one subtree to another in the document, for example. All you need are a valid start point and a valid end point in the same document.
The XPointer specification adds a number of functions to those available in XPath to handle ranges:
range(location-set)— This function takes the locations you pass to it and returns a range that ...