current() function returns a node-set
containing only the current (context) node. In most
situations, this is exactly the same result as the XPath
".", but there is one case with a
very important difference.
Recall that XPath expressions can have several levels of
selection. For example, the XPath expression
park children of the context node,
and then it selects
children of those nodes. So at each
stage of evaluation of that XPath expression,
"." has a different meaning: at each stage it means
the set of nodes selected so far.
The critical difference in the
function is that it always refers to the node that was the
context node before any of the XPath expression was evaluated.