sgmldiff [ options ...] file1 file2 [ [ -a] [ --attributes]
[ -c [ [ attributes] [ nesting] [ textpos] ] ] [ --context [ [ attributes] [ nesting] [ textpos] ] ]
[ -s] [ --statistics]
[ -h] [ --help]
[ -v] [ --version] ]
This perl script allows to determine the structural differences between two SGML files. It compares the files, regardless of what is in between the tags, to only focus on the markup. Its output is similar to diff(1).
The typical use of sgmldiff is to compare an SGML file with its translation into another language. If the translation was done cleanly, sgmldiff returns without finding any difference in the markup.
An example of a typical call to sgmldiff is:
sgmldiff english.sgml italiano.sgml
If there are differences in markup between both files, sgmldiff will output a series of differences reports summarized with lines of the form:
Here is the list of actions that can be requested to sgmldiff:
[ [ -a] [ --attributes] ]
Include the attribute values in the difference tests. Don't set this value if the attributes are likely to be translated. Set this value if the attributes value shouldn't change between both files. Default is to don't include the attributes in the difference tests.
[ [ -c [ [ attributes] [ nesting] [ textpos] ] ] [ --context [ [ attributes] [ nesting] [ textpos] ] ] ]
Add more context to the difference. Since every test between the tags is removed before testing the differences, sgmldiff is likely to resynchronize itself at the wrong place, by thinking the location in both files correspond, while it's not true. By adding more context to the compared area, such risk is disminished.
The allowed values for the --context option are:
[ [ -s] [ --statistics] ]
iPrint some SGML information at the end.
[ [ -h] [ --help] ]
Print a short help message and exit
[ [ -v] [ --version] ]
conversion from a SGML file to other file formats
a base component of Jade DSSSL engine
the home page of the DocBook tools, a compendium of all tools necessary to process DocBook files, including the DocBookr-utils