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

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
10.09Mb size Format: txt, pdf, ePub
ads

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]
.

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
10.09Mb size Format: txt, pdf, ePub
ads

Other books

La dama del alba by Alejandro Casona
Playing Days by Benjamin Markovits
Painkiller by N.J. Fountain
Hot Christmas Nights by Farrah Rochon
The Ghost Pattern by Leslie Wolfe
Her Dark Curiosity by Megan Shepherd
Cursed (Touched urban fantasy series) by Archer, S. A., Ravynheart, S.
Love Song Series Box Set by Emily Minton, Dawn Martens