SgmlStatement ::= |
do Expr ( in Expr )? ( ( with IDENTIFIER | ( extends IDENTIFIER )? ) |
Used by: |
This statement is for SGML/HTML scraping and processing, which takes a file name or URL as
the source, and allow handler code for each tag including text. The source can also be a file
within a zip archive. The text encoding can be specified in
Tags and text pieces in a SGML document are parsed and become "events", allowing code to process. There are also special events such as BEFORE and AFTER . See SgmlEvent.
In the tag handler code,
SGML handler statement can also be declared first. See SgmlHandlerDeclaration. A declared SGML handler can be invoked via the with clause. It also allows other SGML handler statement to inherit its handlers via the extends clause.
Here are the rules for inherited SGML handler statements. The BEFORE and AFTER
handlers are never inherited. For a tag, if no specific handler is provided in the current
handler, the processing goes to the parent; if none of the processors have a specific handler
for it, it tries the any tag handler (