In XPath, the context indicates the location of the node where a processor is currently situated.
That node is called the context node.
The context also includes a context position and a context size.
Consider the following XML document, book.xml:
This is the first chapter
This is the second chapter
This is the third chapter
This is the fourth chapter
This is the fifth chapter
Suppose the context node is the node that represents the Chapter element node for the second chapter.
We can use the position() and last() functions to show the position of the context node and the context size.