logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

dtdflatten - Flatten an SGML/XML DTD.

Authors

       Originally developed by Norman Walsh, <ndw@nwalsh.com>.

       Earl Hood <earl@earlhood.com> picked up support and maintenance.

Availability

Description

dtdflatten parses a DTD and prints out a flatten/expanded version of it with all parameter entities
       expanded.

       The first non-option-related argument provided on the command-line specifies the file to parse.  If no
       filename is given, then the DTD is read from standard input.

       The flatten DTD is printed to standard output unless the "--output" option is specified.

Name

       dtdflatten - Flatten an SGML/XML DTD.

Options

       --catalog <catalog>
           Specify  catalog  files  to  parse  for  resolving  external  entity  references.  This option can be
           specified multiple times.

           NOTE: Currently, only SGML Open Catalog format is supported.  XML Catalog support is not  implemented
           (yet).

       --debug
           Extra  debugging  output.   This  option  can  be  specified multiple times to increase the amount of
           output.

           Debugging output is sent to standard error.

       --declaration <file>
           Specify the SGML declaration.  The SGML declaration is parsed to determine  the  type  of  DTD  being
           parsed,  XML  or  SGML.   The key parts of the SGML declaration examined are the NAMECASE and CHARSET
           directives to determine the DTD type.

           If no SGML declaration is  available,  the  "--xml",  "--namecase-general",  and  "--namecase-entity"
           options can be used.

       --output <file>
           Output file.  If not specified, standard output is used.

       --preserve <entity-name>
           Preserve  parameter  entity  declaration  denoted  by  <entity-name>.   This  option can be specified
           multiple times.

           Note, if <entity-name> matches any portion of a parameter entity, the  parameter  entity  declaration
           will be preserved.

       --verbose
       --noverbose
           Print  parsing  progress.   By  default,  this option is enabled.  Verbose output is sent to standard
           error.

           If "--debug" is specified, then this option is automatically enabled.

       --version
           Print version and synopsis.

       --help
           Print synopsis and options available.

       --man
           Print manual page.

Prerequisites

Getopt::Long, Text::DelimMatch, XML::Parser

See Also

       dtdparse

       See SGML::DTDParse for an overview of the DTDParse package.

Synopsis

         dtdflatten [options]

See Also