1SGMLDIFF(1) SGMLDIFF(1)
2
3
4
6 sgmldiff - Find differences in the markup of two SGML files
7
9 sgmldiff [ options ... ] file1 file2 [ -a | --attributes
10 | -c [ attributes | nesting | textpos ] | --context [ attributes
11 | nesting | textpos ]
12 | -s | --statistics
13 | -h | --help
14 | -v | --version ]
15
16
18 This perl script allows to determine the structural differences between
19 two SGML files. It compares the files, regardless of what is in between
20 the tags, to only focus on the markup. Its output is similar to
21 diff(1).
22
23 The typical use of sgmldiff is to compare an SGML file with its trans‐
24 lation into another language. If the translation was done cleanly,
25 sgmldiff returns without finding any difference in the markup.
26
27 An example of a typical call to sgmldiff is:
28
29 sgmldiff english.sgml italiano.sgml
30
31
32 If there are differences in markup between both files, sgmldiff will
33 output a series of differences reports summarized with lines of the
34 form:
35
36 169a164
37 At line 169 of the first file, line 164 of the second file has
38 been added.
39
40 8a12,15
41 At line 8 of the first file, lines 12 to 15 of the second file
42 have been added.
43
44 41d28 Line 41 of the first file has been destroyed, to obtain line 28
45 of the second file.
46
47 63,66d61
48 Lines 63 to 66 of the first file have been destroyed. to obtain
49 line 61 of the second file.
50
51 52c51 Line 52 of the first file has been changed into line 51 of the
52 second file.
53
54 5,7c8,10
55 Lines 5 to 7 of the first file have been changed into lines 8 to
56 10 of the second line. In addition to those summaries, the
57 lines of the first file are shown preceeded by '<' and the lines
58 of the second file are shown preceeded by '>".
59
61 Here is the list of actions that can be requested to sgmldiff:
62
63 [ -a | --attributes ]
64 Include the attribute values in the difference tests. Don't set
65 this value if the attributes are likely to be translated. Set
66 this value if the attributes value shouldn't change between both
67 files. Default is to don't include the attributes in the differ‐
68 ence tests.
69
70 [ -c [ attributes | nesting | textpos ] | --context [
71 attributes | nesting | textpos ] ]
72 Add more context to the difference. Since every test between the
73 tags is removed before testing the differences, sgmldiff is
74 likely to resynchronize itself at the wrong place, by thinking
75 the location in both files correspond, while it's not true. By
76 adding more context to the compared area, such risk is dismin‐
77 ished.
78
79 The allowed values for the --context option are:
80
81 attributes
82 Take into account the attribute names. The attribute val‐
83 ues are controlled by the attributes option.
84
85 nesting
86 Take into account the nesting level of all the compared
87 tags.
88
89 textpos
90 Take into account the position in the text.
91
92 [ -s | --statistics ]
93 Print some SGML information at the end.
94
95 [ -h | --help ]
96 Print a short help message and exit
97
98 [ -v | --version ]
99 Print the version identifier and exit
100
103 Frederik Fouvry
104 Developer of sgmldiff.
105
107 jw(1)
108 conversion from a SGML file to other file formats
109
110 nsgmls(1)
111 a base component of Jade DSSSL engine
112
113 http://sources.redhat.com/docbook-tools/ <URL:http://sources.red‐
114 hat.com/docbook-tools/>
115 the home page of the DocBook tools, a compendium of all tools
116 necessary to process DocBook files, including the DocBook-utils
117
118
119
120 11 February 2004 SGMLDIFF(1)