Originally posted by Niraj Sheth:
XPath functions like position, last, size, current always applies to the current context ( and not to the node-set returned by the XPath expression ). So last() in "//CCC[last()]" doesn't apply to the node-set containing all CCC elements returned by //CCC but it applies to the current context for the every CCC element returned by the node-set. So this expression selects all CCC elements which are last in thier own cotext.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
NOTE: The location path //para[1] does not mean the same as the location path /descendant: :p ara[1]. The latter selects the first descendant para element; the former selects all descendant para elements that are the first para children of their parents.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.