Given the following XML file :
3
/*/*/*
This selects all "grand-children of the top element -- these are: c
, d
, c
, d
/*//*
This selects all descendant elements of the top element: b
, c
, d
, b
, c
, d
, e
, f
/*/*//@*
This selects all attributes either of children of the top element or of their descendants: n
, o
, p
, n
, o
, p
, q
, r
, s
.
Therefore, the counts produced must be, respectively:
4, 8, 9
XSLT - based verification:
=========
=========
When this transformation is performed on the provided XML document (never, never ever present the document with a picture!!!):
3
3
2
The Xpath expressions are evaluated and their results are copied to the output:
4
=========
8
=========
9