dtddiff
list the changes that have occured in a DTD.
dtddiff
will
output the following information:
dtddiff
is invoked from the Unix shell as follows:
% dtddiff [options] olddtd newdtd
The following are the list of options available:
-compact
Generate a compact listing.
-help
Print a brief usage description. No other action is performed.
-mapfile
filenameUse filename as the file for mapping public
identifiers and external entities to system files. The default is
"map.txt
". See
Resolving External Entities for more
information.
Here is an example output generated by dtddiff
(with
the -compact
option specified):
---------------------------------------------------------------------- New Elements/Attributes (sgm/html2.0/html.dtd) ---------------------------------------------------------------------- <a sdapref> <address sdaform> <address sdapref> <b sdaform> <blockquote sdaform> <br> <br sdapref> <cite sdaform> <code sdaform> <dd sdaform> <dir sdaform> <dir sdapref> <dl compact> <dl sdaform> <dl sdapref> <dt sdaform> <em sdaform> <form> ... ---------------------------------------------------------------------- Old/removed Elements/Attributes (sgm/html.dtd) ---------------------------------------------------------------------- <dfn> <key> <link name> <u> ---------------------------------------------------------------------- Content Rule Differences ---------------------------------------------------------------------- ------------------------------------------------------------ <A> << old content rule << (#PCDATA|img|em|tt|strong|b|i|U|code|samp|kbd|KEY|var|DFN|cite) >> new content rule >> (h1|h2|h3|h4|h5|h6|#PCDATA|a|img|br|em|strong|code|samp|kbd|var|cite|tt| b|i)* -(a) ------------------------------------------------------------ <ADDRESS> << old content rule << (a|#PCDATA|img|em|tt|strong|b|i|U|code|samp|kbd|KEY|var|DFN|cite|p)+ >> new content rule >> (#PCDATA|a|img|br|em|strong|code|samp|kbd|var|cite|tt|b|i|p)* ...
The "..." represents text that has been deleted in order to save space.
If the -compact
option is not specified, then each
listing in the New Elements/Attributes and
Old/removed Elements/Attributes is on its own line.
dtddiff
provides the capability of resolving
external entities to system files via the
-mapfile
command-line option.
The map file, or catalog,
provides you with the capability of mapping public
identifiers to system identifiers (files) or to map entity names to
system identifiers.
dtddiff
. However, since version 1.1.0, the "map file"
format has changed to following similiar conventions of SGML catalogs
(as defined in
SGML Open Draft Technical Resolution 9401:1994).
Therefore,
the term "map file" and "catalog" are the same in the context of this
document.
A catalog contains a sequence of the following types of entries:
PUBLIC
public_id system_idThis maps public_id to system_id.
ENTITY
name system_idThis maps a general entity whose name is name to system_id.
ENTITY %
name system_idThis maps a parameter entity whose name is name to system_id.
A system_id string cannot contain any spaces. The system_id is treated as pathname of file.
Any line in a catalog file that does not follow the previously mentioned entries is ignored.
In case of duplicate entries, the first entry defined is used.
Example catalog file:
-- ISO public identifiers -- PUBLIC "ISO 8879-1986//ENTITIES General Technical//EN" iso-tech.ent PUBLIC "ISO 8879-1986//ENTITIES Publishing//EN" iso-pub.ent PUBLIC "ISO 8879-1986//ENTITIES Numeric and Special Graphic//EN" iso-num.ent PUBLIC "ISO 8879-1986//ENTITIES Greek Letters//EN" iso-grk1.ent PUBLIC "ISO 8879-1986//ENTITIES Diacritical Marks//EN" iso-dia.ent PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN" iso-lat1.ent PUBLIC "ISO 8879-1986//ENTITIES Greek Symbols//EN" iso-grk3.ent PUBLIC "ISO 8879-1986//ENTITIES Added Latin 2//EN" ISOlat2 PUBLIC "ISO 8879-1986//ENTITIES Added Math Symbols: Ordinary//EN" ISOamso -- HTML public identifiers and entities -- PUBLIC "-//IETF//DTD HTML//EN" html.dtd PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML" ISOlat1.ent ENTITY "%html-0" html-0.dtd ENTITY "%html-1" html-1.dtd
dtddiff
also supports envariables (ie. environment
variables) to aid in resolving external entities. The following
envariables are used by dtddiff
:
This is a colon (semi-colon for MSDOS users) separated list of paths for finding catalog files or system identifiers. For example, if a system identifier is not an absolute pathname, then the paths listed in P_SGML_PATH are used to find the file.
This envariable is a colon (semi-colon for MSDOS users)
separated list of catalog files to read.
The file specified by
-mapfile
is read first before any files specified by SGML_CATALOG_FILES. If
a file in the list is not an absolute path, then file is searched in
the paths listed in the P_SGML_PATH and SGML_SEARCH_PATH.
This is a colon (semi-colon for MSDOS users) separated list of paths for finding catalog files or system identifiers. This envariable serves the same function as P_SGML_PATH. If both are defined, paths listed in P_SGML_PATH are searched first before any paths in SGML_SEARCH_PATH.
The use of P_SGML_PATH is for compatibility with earlier versions
of dtddiff
. SGML_CATALOG_FILES and SGML_SEARCH_PATH
are supported for compatibility with James Clark's nsgmls(1)
.
This program is part of the perlSGML package; see <URL:http://www.oac.uci.edu/indiv/ehood/perlSGML.html>