![]() |
![]()
| ![]() |
![]()
NAMEhxnormalize - pretty-print an HTML file SYNOPSIShxnormalize [ -x ] [ -X ] [ -e ] [ -d ] [ -s ] [ -L ] [ -i indent ] [ -l line-length ] [ -c commentmagic ] [ file-or-URL ] DESCRIPTIONThe hxnormalize command pretty-prints an HTML or XML file, and also tries to fix small HTML errors. The output is the same file, but with a maximum line length and with optional indentation to indicate the nesting level of each line. OPTIONSThe following options are supported:
OPERANDSThe following operand is supported:
EXIT STATUSThe following exit values are returned:
ENVIRONMENTTo use a proxy to retrieve remote files, set the environment variables http_proxy and ftp_proxy. E.g., http_proxy="http://localhost:8080/" BUGSThe error recovery for incorrect HTML is primitive. hxnormalize will not omit an endtag if the white space after it could possibly be significant. E.g., it will not remove the first </p> from ‘<div><p>text</p> <p>text</p></div>’. hxnormalize can currently only retrieve remote files over HTTP. It doesn't handle password-protected files, nor files whose content depends on HTTP ‘cookies.’ When converting from XML to HTML (option -X without option -x), any pairs of <![CDATA[ and ‘]]>’ are removed and character entities < > " ' and & are expanded (to ‘<’, ‘>’, ‘"’, ‘'’ and ‘&’, respectively), but any other character entities are not expanded. To expand other character entities, pipe the input through hxunent(1) first. To limit lines to a given number of characters, hxnormalize breaks lines at spaces (or inside tags). Some writing systems do not use spaces between words and thus hxnormalize may not be able to break lines, except at already existing line breaks. To make short lines longer, hxnormalize will combine lines and replace a line break by a space, except in writing systems that do not put spaces between words, where the line break is replaced by nothing. hxnormalize currently only does the latter for Japanese, Chinese, Korean, Khmer and Thai. (The text must be correctly marked up with ‘lang’ or ‘xml:lang’.) SEE ALSOasc2xml(1), xml2asc(1), hxunent(1), UTF-8 (RFC 2279)
|