|
|||||
operator |
number of current elements |
Return type: Integer
Returns: Number of opened elements.
Syntax
number of current elements element-qualifier*
The number of currently opened elements, including the currently opened element (if any), can be determined using number of current elements
.
Similarly, the number of opened elements down to and including a specified opened element can be determined by adding an element qualifier to specify the element to be examined.
If number of current elements
is followed by of
and an element-qualifier, then that qualifier must identify a currently opened element. On the other hand, number of current elements
can always be used without a qualifier. If there are no opened elements, then the number of current elements
without a following element qualifier has a value of zero (0).
The following element rule uses number of current elements
to show the depth of the current element in the overall element hierarchy:
element #implied set depth to number of current elements output "Element %q is nested %d(depth) deep. %n" output "%c"
Copyright © Stilo International plc, 1988-2008.