XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (424 page)

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

element that is the first

child of its parent element and that is a descendant of a node in
$chapters
.

$chapters/descendant::diagram[1]
means the first

element (taking them in document order) that is a descendant of a node in
$chapters
. Another way of writing this is
($chapters//diagram)[1]
.

Other books

Mistborn: The Well of Ascension by Brandon Sanderson
The Mistletoe Mystery by Caroline Dunford
Job: A Comedy of Justice by Robert A Heinlein
Accepting His Terms by Isabella Kole
Pantheon by Sam Bourne
Power of the Fae by Ariel Marie
Long Hidden: Speculative Fiction from the Margins of History by Tananarive Due, Sofia Samatar, Ken Liu, Victor LaValle, Nnedi Okorafor, Sabrina Vourvoulias, Thoraiya Dyer
Unhallowed Ground by Gillian White
Fool's Journey by Comstock, Mary Chase