operator
number of current subdocuments
An operator that allows the programmer to quickly determine how deeply the subdocuments being parsed are nested. number of current subdocuments
returns the number of subdocuments of the current document or instance (that is not a subdocument) being parsed.
The value returned is determined as follows:
do sgml-parse
, the value returned is zero (0).
do sgml-parse
for document
or instance
saves the current value of number of subdocuments
and resets it to zero. At the end of processing the do sgml-parse
, the saved value is restored.
do sgml-parse
for subdocument
increments the current value of number of current subdocuments
. At the end of processing the do sgml-parse
, the value of number of current subdocuments
is decremented to its value on entry to the do sgml-parse
.