SYNOPSIS

 dtdparse [options] [dtdfile]

DESCRIPTION

dtdparse parses an \s-1XML\s0 or \s-1SGML\s0 \s-1DTD\s0 and prints an \s-1XML\s0 representation of it. The \s-1XML\s0 version can be further processed by other tools to aid in the analysis and documentation of the \s-1DTD\s0.

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

The generated \s-1XML\s0 document is printed to standard output unless the \*(C`--output\*(C' option is specified.

OPTIONS

--catalog <catalog>

Specify catalog files to parse for resolving external entity references. This option can be specified multiple times. \s-1NOTE:\s0 Currently, only \s-1SGML\s0 Open Catalog format is supported. \s-1XML\s0 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 \s-1SGML\s0 declaration. The \s-1SGML\s0 declaration is parsed to determine the type of \s-1DTD\s0 being parsed, \s-1XML\s0 or \s-1SGML\s0. The key parts of the \s-1SGML\s0 declaration examined are the \s-1NAMECASE\s0 and \s-1CHARSET\s0 directives to determine the \s-1DTD\s0 type. If no \s-1SGML\s0 declaration is available, the \*(C`--xml\*(C', \*(C`--namecase-general\*(C', and \*(C`--namecase-entity\*(C' options can be used.

--namecase-general
--nonamecase-general

In the absence of an \s-1SGML\s0 declaration, these options specifiy if \*(C`NAMECASE GENERAL\*(C' is \s-1YES\s0 or \s-1NO\s0. The default is \s-1YES\s0 unless \*(C`--xml\*(C' is specified.

--namecase-entity
--nonamecase-entity

In the absence of an \s-1SGML\s0 declaration, these options specifiy if \*(C`NAMECASE ENTITY\*(C' is \s-1YES\s0 or \s-1NO\s0. The default is \s-1NO\s0.

--output <file>

Specifies the filename to send \s-1XML\s0 output.

--public-id <pubid>

The \s-1DTD\s0's public \s-1ID\s0.

--system-id <sysid>

The \s-1DTD\s0's system \s-1ID\s0.

--title <title>

Set the title of the \s-1DTD\s0.

--unexpanded
--nounexpanded

Include, or do not include, unexpanded content models in generated \s-1XML\s0. By default, unexpanded content models are included. It is common for \s-1DTD\s0 authors and maintainers to use parameter entities within content models. When this option is enabled, dtdparse will include a version of content models with parameter entities not expanded.

--verbose
--noverbose

Print parsing progress. By default, this option is enabled. Verbose output is sent to standard error. If \*(C`--debug\*(C' is specified, then this option is automatically enabled.

--xml
--noxml

In the absence of an \s-1SGML\s0 declaration, this option specifies if the \s-1DTD\s0 is an \s-1XML\s0 \s-1DTD\s0 or an \s-1SGML\s0 \s-1DTD\s0 (the default is --noxml).

--version

Print version and synopsis.

--help

Print synopsis and options available.

--man

Print manual page.

RELATED TO dtdparse…

dtdformat, dtddiff, dtdflatten

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

PREREQUISITES

Getopt::Long, Text::DelimMatch

AVAILABILITY

<http://dtdparse.sourceforge.net/>

AUTHORS

Originally developed by Norman Walsh, <[email protected]>.

Earl Hood <[email protected]> picked up support and maintenance.

COPYRIGHT AND LICENSE

See SGML::DTDParse for copyright and license information.