1man(1)                      General Commands Manual                     man(1)
2
3
4

NAME

6       addid - add ID's to selected elements
7

SYNOPSIS

9       addid [ -x ] [--] elem|.class|elem.class [ html-file ]
10

DESCRIPTION

12       The  addid  command opies an HTML or XML file to standard output, while
13       adding element IDs to the specified elements or classes.
14
15       For example, given the input
16
17           <p>A paragraph without an ID</p>
18
19       the command
20
21           addid p
22
23       will output
24
25           <p id="a-paragraph">A paragraph without an ID</p>
26
27
28       If you specify a class using .class then IDs will only be added to ele‐
29       ments  that  contain  that  class.   And if you specify a element and a
30       class using elem.class then IDs will only be  added  to  the  specified
31       elements that contain the specified class.
32
33       If two elements would naturally generate the same ID, a number is added
34       to the ID name (starting with 0) to make sure the IDs are unique.   IDs
35       are not added to matching elements that already contain an ID.
36

OPTIONS

38       The following options are supported:
39
40       -x        Use  XML conventions: empty elements are written with a slash
41                 at the end: <IMG /> Also causes the  name  of  the  attribute
42                 (see option -a) to become case-sensitive.
43

OPERANDS

45       The following operand is supported:
46
47       elem      The name of element to select.
48
49       .class    The name of class to select.
50
51       elem.class
52                 The name of element that contains class to select.
53
54       html-file The name of an HTML file.
55

EXIT STATUS

57       The following exit values are returned:
58
59       0         Successful completion.
60
61       >0        An  error  occurred  in the parsing of one of the HTML or XML
62                 files.
63

SEE ALSO

65       xml2asc(1), UTF-8  (RFC  2279),  normalize(1),  num(1),  toc(1),  html‐
66       prune(1).  unent(1) asc2xml(1)
67

BUGS

69       Assumes UTF-8 as input. Doesn't expand character entities. Instead pipe
70       the input through unent(1) and asc2xml(1) to convert it to UTF-8.
71
72
73
74                                  27 May 2004                           man(1)
Impressum