1man(1) General Commands Manual man(1)
2
3
4
6 name2id - move some NAME and ID attributes from an A to its parent
7
9 name2id [ -x ] [ file ]
10
12 The name2id command reads an HTML file and looks for elements with an A
13 element has first child, with no intervening text other than white‐
14 space. If that A element has an ID or NAME attribute, it is moved to
15 the parent element and removed from the A.
16
17 Because Netscape 4 doesn't understand ID attributes, it was common
18 practice to write <H2><A NAME="sect7">...</A></H2> instead of <H2
19 ID="sect7">. This program can be used to convert such old HTML files to
20 the new convention.
21
22 Other programs in this suite, such as multitoc, require IDs on headings
23 instead of A elements with NAME attributes. So it is useful to run
24 name2id prior to running multitoc and similar program. name2id can be
25 used in a pipe.
26
28 The following options are supported:
29
30 -x Use XML conventions: empty elements are written with a slash
31 at the end: <IMG />
32
34 The following operand is supported:
35
36 file The name of an HTML file. If absent, standard input is read
37 instead.
38
40 The following exit values are returned:
41
42 0 Successful completion.
43
44 >0 An error occurred in the parsing of the HTML file. name2id
45 will try to correct the error and produce output anyway.
46
48 num(1), normalize(1), xml2asc(1) asc2xml(1) multitoc(1) toc(1)
49
51 The error recovery for incorrect HTML is primitive.
52
53
54
55 2 Dec 1998 man(1)