| Syntax 
   number of current subdocuments
 
 Purpose
 
 An operator that allows the programmer to quickly determine how deeply the subdocuments being parsed are nested. number of current subdocumentsreturns the number of subdocuments of the current document or instance (that is not a subdocument) being parsed. The value returned is determined as follows:
 outside of any do sgml-parse, the value returned is zero (0).a do sgml-parsefordocumentorinstancesaves the current value ofnumber of subdocumentsand resets it to zero. At the end of processing thedo sgml-parse, the saved value is restored.a do sgml-parseforsubdocumentincrements the current value ofnumber of current subdocuments. At the end of processing thedo sgml-parse, the value ofnumber of current subdocumentsis decremented to its value on entry to thedo sgml-parse.
 |