HXNAME2ID(1) | HTML-XML-utils | HXNAME2ID(1) |
hxname2id - move some NAME and ID attributes from an A to its parent
hxname2id [ -x ] [ file ]
The hxname2id command reads an HTML file and looks for elements with an A element as first child, with no intervening text other than whitespace. If that A element has an ID or NAME attribute, it is moved to the parent element and removed from the A.
Because Netscape 4 doesn't understand ID attributes, it was common practice to write <H2><A NAME="sect7">...</A></H2> instead of <H2 ID="sect7">. This program can be used to convert such old HTML files to the new convention.
Other programs in this suite, such as hxmultitoc(1), require IDs on headings instead of A elements with NAME attributes. So it is useful to run hxname2id prior to running hxmultitoc and similar program. hxname2id can be used in a pipe.
The following options are supported:
The following operand is supported:
The following exit values are returned:
asc2xml(1), hxmultitoc(1), hxnormalize(1), hxnum(1), hxtoc(1), xml2asc(1)
The error recovery for incorrect HTML is primitive.
10 Jul 2011 | 7.x |