Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hxincl(1) [debian man page]

HXINCL(1)							  HTML-XML-utils							 HXINCL(1)

NAME
hxincl - expand included HTML or XML files SYNOPSIS
hxincl [ -x ] [ -f ] [ -s name=subst ] [ -s name=subst ]... [ -b base ] [ file-or-URL ] DESCRIPTION
The hxincl command copies an HTML or XML file to standard output, looking for comments with a certain structure. Such a comment is replaced by the file whose name is given as the attribute of the directive. For example: ...<!-- include "foo.html" -->... will be replaced by the content of the file foo.html. It is important to note that you must quote filenames if they contain white space. The comment is replaced by <!-- begin-include "foo.html" --> before the included text and <!-- end-include "foo.html" --> after it. These comments make it possible to run hxincl on the resulting file again to update the inclusions. Single quotes are allowed instead of double quotes. And if the file name contains no spaces, the quotes may also be omitted. OPTIONS
The following options are supported: -x Use XML conventions: empty elements are written with a slash at the end: <IMG />. -b base Sets the base URL for resolving relative URLs. By default the file given as argument is the base URL. -f Removes the comments after including the files. This means hxincl connot be run on the resulting file later to update the inclu- sions. (Mnemonic: final or frozen.) -s name=substitution Include a different file than the one mentioned in the directive. If the comment is <!-- include "name" --> the file substitution is included instead. The option -s may occur multiple times. OPERANDS
The following operand is supported: file-or-URL The name of an HTML or XML file or the URL of one. If absent, standard input is read instead. EXIT STATUS
The following exit values are returned: 0 Successful completion. > 0 An error occurred in the parsing of one of the HTML or XML files. ENVIRONMENT
To use a proxy to retrieve remote files, set the environment variables http_proxy or ftp_proxy. E.g., http_proxy="http://localhost:8080/" BUGS
Assumes UTF-8 as input. Doesn't expand character entities. Instead pipe the input through hxunent(1) and asc2xml(1) to convert it to UTF-8. Remote files (specified with a URL) are currently only supported for HTTP. Password-protected files or files that depend on HTTP "cookies" are not handled. (You can use tools such as curl(1) or wget(1) to retrieve such files.) SEE ALSO
asc2xml(1), hxnormalize(1), hxnum(1), hxprune(1), hxtoc(1), hxunent(1), xml2asc(1), UTF-8 (RFC 2279) 6.x 10 Jul 2011 HXINCL(1)

Check Out this Related Man Page

HXTOC(1)							  HTML-XML-utils							  HXTOC(1)

NAME
hxtoc - insert a table of contents in an HTML file SYNOPSIS
hxtoc [ -x ] [ -l low ] [ -h high ] [ file ] [ -t ] [ -d ] [ -c class ] DESCRIPTION
The hxtoc command reads an HTML file, inserts missing ID attributes in all H1 to H6 elements between the levels -l and -h (unless the option -d is in effect, see below) and also inserts A elements with NAME attributes, so old browsers will recognize the H1 to H6 headers as target anchors as well (unless the option -t is in effect). The output is written to stdout. If there is a comment of the form <!--toc--> or a pair of comments <!--begin-toc--> ... <!--end-toc--> then the comment, or the pair with everything in between, will be replaced by a table of contents, consisting of a list (UL) of links to all headers in the document. The text of headers is copied to this table of contents, including any inline markup, except that DFN tags and SPAN tags with a CLASS of "index" are omitted (but the elements content is copied). If a header has a CLASS attribute with as value (or one of its values) the keyword "no-toc", then that header will not appear in the table of contents. OPTIONS
The following options are supported: -x Use XML conventions: empty elements are written with a slash at the end: <IMG /> -l low Sets the lowest numbered header to appear in the table of content. Default is 1 (i.e., H1). -h high Sets the highest numbered header to appear in the table of content. Default is 6 (i.e., H6). -t Normally, hxtoc adds both ID attributes and empty A elements with a NAME attribute and CLASS="bctarget", so that older browsers that do no understand ID will still find the target. With this option, the A elements will not be generated. -c class The generated UL elements in the table of contents will have a CLASS attribute with the value class. The default is "toc". -d Tries to use DIV elements as targets instead of H1 to H6: If a header element H1 to H6 within the range -l to -h is found and it is the first child of a DIV element, then the table of contents will link to the DIV instead of to the header element. The DIV will be given an ID if it doesn't have one yet. ID OPERANDS
The following operand is supported: file The name of an HTML file. If absent, standard input is read instead. DIAGNOSTICS
The following exit values are returned: 0 Successful completion. > 0 An error occurred in the parsing of the HTML file. hxtoc will try to correct the error and produce output anyway. SEE ALSO
asc2xml(1), hxnormalize(1), hxnum(1), xml2asc(1) BUGS
The error recovery for incorrect HTML is primitive. 6.x 10 Jul 2011 HXTOC(1)
Man Page