version 1.7, 2008/11/28 11:21:12 |
version 1.10, 2008/11/30 21:41:35 |
|
|
.\" |
.\" |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm mdocml |
.Nm mdocml |
.Op Fl vW |
.Op Fl W |
.Op Fl f Ar filter |
.Op Fl f Ar filter |
.Op Fl o Ar outfile |
.Op Fl o Ar outfile |
.Op Ar infile |
.Op Ar infile |
Line 27 formatted manual source and passes results into the ou |
|
Line 27 formatted manual source and passes results into the ou |
|
dictated by |
dictated by |
.Fl f Ar filter . |
.Fl f Ar filter . |
The only current output filter is |
The only current output filter is |
.Ar validate , |
.Ar xml , |
the default. The arguments are as follows: |
the default. The arguments are as follows: |
.Bl -tag -width "\-o outfile" |
.Bl -tag -width "\-o outfile" |
|
.It Fl f Ar filter |
|
The output filter name, which defaults to |
|
.Ar xml . |
.It Fl o Ar outfile |
.It Fl o Ar outfile |
Place output in |
Place output in |
.Ar outfile , |
.Ar outfile , |
which may be |
which may be |
.Qq \- |
.Qq \- |
for standard output. The default is standard output. |
for stdout. The default is stdout. |
|
.It Fl W |
|
Print compiler warnings to stderr. |
.It Ar infile |
.It Ar infile |
Read input from |
Read input from |
.Ar infile , |
.Ar infile , |
which may be |
which may be |
.Qq \- |
.Qq \- |
for standard input. The default is standard input. |
for stdin. The default is stdin. |
.It Fl v |
|
Print messages (output depends on filter). |
|
.It Fl W |
|
Print warnings (output depends on filter). |
|
.El |
.El |
.Ss Validate Filter |
.Ss XML Filter |
The validate filter, specified by |
The XML filter, specified by |
.Fl f Ar validate , |
.Fl f Ar xml , |
is the default filter. It produces no output, so specifying |
is the default filter. It creates an XML document where element names are |
.Fl o Ar outfile |
their respective roff macro names. Each element name has an associated |
results in an empty file. |
namespace, which is one of |
|
.Qq block , |
|
.Qq inline , |
|
or |
|
.Qq special , |
|
corresponding to the display mode of a node. |
|
.Pp |
|
Sample output follows: |
|
.Bd -literal |
|
<?xml version="1.0" encoding="UTF-8"?> |
|
<block:mdoc> |
|
<block:Sh> |
|
<inline:Sh>NAME</inline:Sh> <inline:Nm>example</inline:Nm> |
|
<inline:Nd>example text</inline:Nd> |
|
</block:Sh> |
|
</block:mdoc> |
|
.Ed |
.\" The following requests should be uncommented and used where appropriate. |
.\" The following requests should be uncommented and used where appropriate. |
.\" This next request is for sections 2, 3, and 9 function return values only. |
.\" This next request is for sections 2, 3, and 9 function return values only. |
.\" .Sh RETURN VALUES |
.\" .Sh RETURN VALUES |
Line 74 results in an empty file. |
|
Line 91 results in an empty file. |
|
The |
The |
.Nm |
.Nm |
utility was written by |
utility was written by |
.An Kristaps Dzonsons Aq kristaps@kth.se . |
.An Em Kristaps Dzonsons Aq kristaps@kth.se . |
.\" |
.\" |
.Sh CAVEATS |
.Sh CAVEATS |
Most caveats of |
Most caveats of |
Line 95 All macro arguments may be quoted, instead of only som |
|
Line 112 All macro arguments may be quoted, instead of only som |
|
.It |
.It |
Blank lines raise warnings. |
Blank lines raise warnings. |
.It |
.It |
Non-ascii characters may cause issues. |
If terminating punctuation is found, then |
|
.Em all |
|
remaining tokens are flushed after line scope is closed, not just the |
|
last one. |
.El |
.El |
.\" .Sh BUGS |
.\" .Sh BUGS |