The current() function returns a node-set that contains only the current node. Usually the current node and the context node are the same.
is equal to
However, there is one difference. Look at the following XPath expression: "catalog/cd". This expression selects the <catalog> child nodes of the current node, and then it selects the <cd> child nodes of the <catalog> nodes. This means that on each step of evaluation, the "." has a different meaning.
The following line:
will process all cd elements that have a title attribute with value equal to the value of the current node's ref attribute.
This is different from
that will process all cd elements that have a title attribute and a ref attribute with the same value.
Your message has been sent to W3Schools.