<help> <text> <p> The XML help format allows help files to be rendered in a variety of formats, including plain text, ANSI, and HTML; the appropriate output is automatically generated from the markup. This file contains a brief guide to creating XML help files. </p> <p> All help files start with the <help> tag and end with the </help> tag. There are two types of help texts: redirects and actual texts. A redirect contains only the tag <redirect> with a required <eg>target</eg> attribute and an optional <eg>database</eg> attribute; for instance, the help file for <eg>@show</eg> redirects to <eg>@display</eg>: </p> <eg> <help><redirect target="@display" /></help> </eg> <p>Actual texts next have an optional list of usages. MOO commands, for instance, have usages summarizing the commands' syntax. A usage may have parameters for that command, some of which may be of type optional. There should be a usage for each alternative syntax for the command. Here is an example of a pair of <usage> declarations:</p> <eg> <usage>@display <param>object</param>.<param type="optional">property</param></usage> <usage>@display <param>object</param>,<param type="optional">inherited_property</param></usage> </eg> <p>The <text> section follows the usage declarations. It starts with a <text> tag and ends with a </text> tag. The following elements are allowed inside a <text> section: <p>, <pre>, <function>, <list>, <topics> and <eg>.</p> <p>The <p> tag indicates a paragraph; most text will be between <p> and </p> tags.</p> <p>The <pre> tag indicates preformatted text; the renderer will not wordwrap or otherwise mess with the text between the <pre> tags, and will render it in a monospace font.</p> <p>The <function> tag is used in documentation of verbs to indicate a MOO function.</p> <p>The <list> tag indicates a list. Each list element is enclosed by <li> tags. This tag also takes an optional <name> parameter, as used in <link target="@display-option" database="#89">@display-option</link>. Here is an example of a list:</p> <eg> My favourite colors are: <list> <li>blue</li> <li>green</li> <li>red</li> </list> </eg> <p>A more specialized type of list is the <topics> list. The <topics> list may contain an optional <eg>title</eg> attribute. It contains a list of <topic> elements (or a <break>,) where each <topic> contains a name attribute, and encloses some information on the topic of that name. A topic named <eg>foo</eg> automatically links to the help file on <eg>foo</eg> in appropriate renderers. The topics listing from <eg>@dig</eg> is as follows:</p> <eg> <topics> <topic name="topology">Information on building.</topic> <topic name="@digwith">Set your default object for building with.</topic> </topics> </eg> <p>The <eg> tag indicates an example. Spacing is preserved inside <eg> tags.</p> <p> Finally, text may always be marked up with the <b> (for <b>bold</b>) and <i> (for <i>italic</i>) text; similarly, the <link> tag indicating a link can appear anywhere in the text, as can the <eg> tag indicating an example. If you want to put explicit angle brackets in your text, type &lt; for < and &gt; for >.</p> <p>The DTD for the XML help format can be found at <eg>http://www.moo.ca/xml!moo-help.dtd</eg>.</p> <p>For questions on this help text, contact whiz (#3135).</p> </text> </help>
[home | help | who | search | setup | code]