PREXML & POSTXML 1

NAME

prexml postxmlnroff processors to build xml files.

SYNOPSIS

prexml < file.tr | nroff -mux | postxml > file.xml

DESCRIPTION

Postxml provides a solution to build an xml file from a troff document that relies on nroff itself. Since nroff builds a plain text file from a troff document, it can be used, with an appropriate macro, to produce an intermediate file that postxml will translate to xml.

That intermediate file contains tags that postxml will transform to xml tags. If these tags are present in the source file, and need to be printed as is, prexml simply escapes these tags so that postxml won’t substitute them.

Since the final xml file might contain utf-8 characters, the -Tlocale option of nroff must be used. Utmac provides the ux macro that aims to be used with prexml and postxml. Troffxml comes with xsl stylesheets to create open document and html files. So, the command line could be:

prexml < file.tr | nroff −Tlocale \
−mux | postxml > file.xml
xsltproc utohtml.xsl file.xml > file.html
xsltproc utofodt.xsl file.xml > file.fodt

TAGS

Postxml

Postxml will substitute the following tags.

So the following text:

Some text
#−
#[a#]
#−
note text
#[/a#]
#(lt#).

Will be transform in:

Some text<a>note text</a> &lt;.

Prexml

All these tags will be escaped by prexml if they are present in the original file, following these rules:

FILES

SEE ALSO

nroff(1).

LICENSE

Prexml, postxml and this man page are distributed under a isc license.

AUTHOR

Written by Pierre-Jean Fichet.