Read XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition Online
Authors: Michael Kay
Comparing
//
with
/descendant::
Consider the two expressions
$chapters//diagram[1]
and
$chapters/descendant:: diagram[1]
:
$chapters//diagram[1]
means
$chapters/descendant-or-self::node()/child::diagram[1]
, that is, every
$chapters
.
$chapters/descendant::diagram[1]
means the first
$chapters
. Another way of writing this is
($chapters//diagram)[1]
.