dtd.pl
is a Perl library that parses an SGML document type defintion (DTD) and
builds up data structures containing the structural content of the DTD.
Unless stated, or implied, otherwise, all Perl variables mentioned are within the scope of package dtd.
require "dtd/dtd.pl";
The following routines are defined:
Parse an SGML DTD. This routine is the heart of the dtd.pl
library. Its
description describes the features and limitations of dtd.pl
when
parsing a SGML DTD.
Read in the contents of an entity map file.
Set callback function for SGML comment declarations.
Set callback function for processing instructions.
Set verbosity mode for DTDread_dtd.
Get elements in an element's base content group.
Get the attributes of an element.
Get all elements defined in the DTD.
Get elements in an element's exclusion content group.
Get elements in an element's inclusion content group.
Get all possible parent elements of an element.
Get top-most elements defined in the DTD.
Check if string is an SGML attribute value keyword.
Check if string is an SGML element value keyword.
Check if character is an SGML group connector.
Check if character is an SGML occurence indicator.
Check is string is a legal tag name.
Print the content hierarchy of an element.
Reset all data structures in dtd.pl
.
dtd.pl
: