![]() |
![]()
| ![]() |
![]()
NAMEXML-FORMAT - XML beautifier SYNOPSISxml-format filename DESCRIPTIONxml-format is an XML beautifier that indents and formats XML files for consistent line length. As with all file beautifiers, its primary purpose is to take a document created by someone with a perplexing lack of self-discipline and aesthetic sensibility and make it readable. The XML file is modified in place, and the original document is saved to filename.bak, in case you don't like the results. Since XML is a class of markup languages, not a markup language, the type of each tag encountered is determined from the type of XML file (DocBook, XHTML, etc.), which, in turn, is inferred from the filename extension (".dbk" for DocBook, ".xhtml" for XHTML, etc.) There are four types of tags: Block tags denote blocks of content that should be visually separated from others in the XML source, and often require multiple lines, such as paragraphs, captions, and programlistings. Blocks are separated from other content by a blank line. Content within a block is indented the same as the block tags.
Line tags denote small but important content items that should be highlighted, but not necessarily use multiple lines, such as titles and index terms. xml-format attempts to keep line tag items to a single, separate line line.
Sectioning tags denote structural components of a document, such as chapters, sections, figures, and lists. Opening and closing sectioning tags are placed alone on separate lines. Content between sectioning tags is indented one more level beyond the tags themselves. <chapter> All other tags that do not fall into the first three categories are considered in-line, and are treated essentially as text, except that they are nestled against the text they surround.
The type of each tag is determined from simple text files containing lists of each tag name, on per line, in DATADIR/Config/language/<type>-tags.txt. For example, the tags for DocBook XML are found in: DATADIR/Config/dbk/block-tags.txt DATADIR/Config/dbk/line-tags.txt DATADIR/Config/dbk/sectioning-tags.txt FILESDATADIR/Config/*/*.txt SEE ALSOdblatex, xmlto BUGSPlease report bugs to the author and send patches in unified diff format. (Run man diff for more information.) AUTHORJason W. Bacon
|