id() function is one of the simplest and most robust means of
identifying a element node. It selects the element in the
document that has an ID type attribute with a specified value.
For example, consider the URI
you look back at Listing 17-1, you find this element:
<PERSON ID="p12" FATHER="p2" MOTHER="p1"> <NAME>Honore Bellau</NAME> </PERSON>
Since ID pointers are so common and so useful, there's also
a shortcut for this. If all you want to do is point to a
particular element with a particular ID, you can skip all the
xpointer(id("")) fru-fru and just use the
bare ID after the
XPointers are evaluated from left to right. The first match found is returned, so the backup is only used if an ID type attribute with the value p12 can't be found.