<html>
<head>
<title>dtddiff 1.2.1</title>
</head>
<body>
<!-- =================================================================== -->
<hr>
<h1>dtddiff</h1>
<p><code>dtddiff</code> list the changes that have occured in a DTD.
<code>dtddiff</code> will
output the following information:
</p>
<ul>
<li>New elements and attributes</li>
<li>Old/removed elements and attributes</li>
<li>Content rule changes</li>
</ul>
<!-- =================================================================== -->
<hr>
<h2><a name="usage">Usage</a></h2>
<p><code>dtddiff</code> is invoked from the Unix shell as follows:
</p>
<p><tt>% dtddiff </tt><var>[options]</var><tt> </tt><var>olddtd</var>
<var>newdtd</var>
</p>
<p>The following are the list of options available:
</p>
<dl>
<!-- @(#) catopt.mod 1.1 96/09/30 @(#)
-->
<dt><a name="-catalog"><code>-catalog</code> <var>filename</var></a></dt>
<dd><p>Use <var>filename</var> as the file for mapping public
identifiers and external entities to system files. If
<code>-catalog</code> is not specified, "<code>catalog</code>" is
used as the default filename.
See
<a href="#resolving">Resolving External Entities</a> for more
information.
</p>
</dd>
<dt><a name="-compact"><code>-compact</code></a></dt>
<dd><p>Generate a compact listing.
</p>
</dd>
<dt><a name="-help"><code>-help</code></a></dt>
<dd><p>Print a brief usage description. No other action is performed.
</p>
</dd>
<dt><a name="-nocompact"><code>-nocompact</code></a></dt>
<dd><p>Generate a long listing.
</p>
</dd>
</dl>
<!-- =================================================================== -->
<hr>
<h2><a name="output">dtddiff Example Output</a></h2>
<p>Here is an example output generated by <code>dtddiff</code>:
</p>
<pre>
----------------------------------------------------------------------
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)*
...
</pre>
<p>The "..." represents text that has been deleted in order to save space.
</p>
<p>If the <code>-nocompact</code> option is specified, then each
listing in the <em>New Elements/Attributes</em> and
<em>Old/removed Elements/Attributes</em> is on its own line.
</p>
<!-- =================================================================== -->
<!-- @(#) resents.mod 1.1 96/10/05 @(#)
-->
<hr>
<h2><a name="resolving">Resolving External Entities</a></h2>
<p>Defining the mapping between external entities to system files
may be done via the <a href="#-catalog"><code>-catalog</code></a>
command-line option. The <em>catalog</em> provides you with the
capability of mapping public identifiers to system identifiers
(files) or to map entity names to system identifiers.
</p>
<!-- @(#) catalog.mod 1.4 96/10/07 @(#)
-->
<p><strong>Catalog Syntax</strong></p>
<p>The syntax of a catalog is a subset of SGML catalogs
(as defined in
<cite>SGML Open Draft Technical Resolution 9401:1994</cite>).
</p>
<p>A catalog contains a sequence of the following types of entries:
</p>
<dl>
<dt><code>PUBLIC</code> <var>public_id</var> <var>system_id</var></dt>
<dd><p>This maps <var>public_id</var> to <var>system_id</var>.
</p>
</dd>
<dt><code>ENTITY</code> <var>name</var> <var>system_id</var></dt>
<dd><p>This maps a general entity whose name is <var>name</var> to
<var>system_id</var>.
</p>
</dd>
<dt><code>ENTITY %</code><var>name</var> <var>system_id</var></dt>
<dd><p>This maps a parameter entity whose name is <var>name</var> to
<var>system_id</var>.
</p>
</dd>
</dl>
<p><strong>Syntax Notes</strong></p>
<ul>
<li><p>A <var>system_id</var> string cannot contain any spaces. The
<var>system_id</var> is treated as pathname of file. </p>
</li>
<li><p>Any line in a catalog file that does not follow the previously
mentioned entries is ignored.</p>
</li>
<li><p>In case of duplicate entries, the first entry defined is used.
</ul>
<p>Example catalog file:</p>
<pre>
-- 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
</pre>
<p><strong>Environment Variables</strong></p>
<p>The following
envariables (ie. environment variables) are supported:
</p>
<dl>
<dt><a name="P_SGML_PATH">P_SGML_PATH</a></dt>
<dd><p>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.
</p>
</dd>
<dt><a name="SGML_CATALOG_FILES">SGML_CATALOG_FILES</a></dt>
<dd><p>This envariable is a colon (semi-colon for MSDOS users)
separated list of catalog files to read.
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.
</p>
</dd>
<dt><a name="SGML_SEARCH_PATH">SGML_SEARCH_PATH</a></dt>
<dd><p>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.</p>
</dd>
</dl>
<p>The use of P_SGML_PATH is for compatibility with earlier versions.
SGML_CATALOG_FILES and SGML_SEARCH_PATH
are supported for compatibility with James Clark's <code>nsgmls(1)</code>.
</p>
<dl>
<dt><strong>Note</strong></dt>
<dd>When searching for a file via the P_SGML_PATH and/or SGML_SEARCH_PATH,
if the file is not found in any of the paths, then the current working
directory is searched.
</dd>
</dl>
<dl>
<dt><strong>Note</strong></dt>
<dd><p>
The file specified by
<a href="#-catalog"><code>-catalog</code></a>
is read first before any files specified by SGML_CATALOG_FILES.
</p>
</dd>
</dl>
<!-- =================================================================== -->
<!-- @(#) avail.mod 1.2 97/09/16 @(#)
-->
<hr>
<h2><a name="availability">Availability</a></h2>
<p>This software is part of the <em>perlSGML</em> package; see
(<a href="http://www.oac.uci.edu/indiv/ehood/perlSGML.html"
>http://www.oac.uci.edu/indiv/ehood/perlSGML.html</a>)
</p>
<!-- @(#) author.mod 1.2 97/09/16 15:50:29 @(#)
-->
<hr>
<h2><a name="author">Author</a></h2>
<address>
<a href="http://www.oac.uci.edu/indiv/ehood/">Earl Hood</a><br>
<a href="mailto:ehood@medusa.acs.uci.edu"
>ehood@medusa.acs.uci.edu</a><br>
Copyright © 1997<br>
</address>
<!-- =================================================================== -->
<hr>
</body>
</html>