< Previous PageNext Page >


A Multi-Command Example

Listing 1-3 is an example of how to write an MPGL manual page for multiple commands in a single page.

Listing 5-3 An MPGL example for multiple commands

<manpage>
<docdate>August 28, 2002</docdate>
<doctitle>Document title</doctitle>
<os>Darwin</os>
<section>1</section>
<names>
        <name>hdxml2manxml<desc>HeaderDoc XML to MPGL translator</desc></name>
        <name>xml2man<desc>MPGL to mdoc (man page) translator</desc></name>
        <name>examplemc<desc>MPGL to mdoc (man page) translator</desc></name>
</names>
<usage>
        <command name="hdxml2manxml">
                <arg>filename [ filename ... ]<desc>the filename(s) to be processed</desc></arg>
        </command>
        <command name="xml2man">
                <arg>filename<desc>This is the filename</desc></arg>
                <arg optional="1">output_filename<desc>This is the filename</desc></arg>
        </command>
        <command name="example">
                <arg>filename<desc>This is the filename</desc></arg>
                <arg optional="1">output_filename<desc>This is the filename</desc></arg>
        </command>
        <command name="example">
                <arg>filename [ filename ... ]<desc>the filename(s) to be processed</desc></arg>
                <flag optional="1">c<arg>time_to</arg><arg optional="1">crash</arg><desc>Seems like a useful flag</desc></flag>
        </command>
</usage>
<environment>
        <p>The <name>xml2man</name> program was designed to convert Man Page
        Generation Language (MPGL) XML files into mdoc-based manual pages.
        The MPGL is a fairly direct translation of mdoc to XML.</p>
        <p>The <name>hdxml2manxml</name> tool was designed to translate
        from headerdoc's XML output to an mxml file for use with xml2man.</p>
</environment>
<seealso>
        <p>For more information on xml2man, see</p>
        <manpage>xml2man<section>1</section>, </manpage>
        <manpage>hdxml2manxml<section>1</section>, </manpage>
</seealso>
</manpage>


< Previous PageNext Page >


© 1999, 2004 Apple Computer, Inc. All Rights Reserved. (Last updated: 2004-05-27)