mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-24 11:25:30 +00:00
Remove more mxmldoc files.
This commit is contained in:
parent
0e19e432a5
commit
3e0c8eaa0e
113
doc/docset.css
113
doc/docset.css
@ -1,113 +0,0 @@
|
||||
body {
|
||||
background: white;
|
||||
color: black;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, p, td, th {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
kbd {
|
||||
color: #006600;
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
pre.example {
|
||||
background: white;
|
||||
border: dotted thin #999999;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
pre.example em {
|
||||
color: #3f0000;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
div.summary table {
|
||||
border: solid thin #999999;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin: 10px;
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
div.summary table td, div.summary table th {
|
||||
background: white;
|
||||
border: solid thin #999999;
|
||||
border-spacing: 0;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
div.summary table thead th {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
div.body h1 {
|
||||
margin: 0;
|
||||
}
|
||||
div.body h2 {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
div.body h3, div.body h4, div.body h5 {
|
||||
margin-bottom: 0.5em;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
.class, .enumeration, .function, .struct, .typedef, .union {
|
||||
border-bottom: solid thin #999999;
|
||||
margin-bottom: 0;
|
||||
margin-top: 2em;
|
||||
}
|
||||
.description {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
code, p.code, pre, ul.code li {
|
||||
font-family: monaco, courier, monospace;
|
||||
font-size: 90%;
|
||||
}
|
||||
ul.code, ul.contents, ul.subcontents {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
ul.code li {
|
||||
margin: 0;
|
||||
}
|
||||
ul.contents > li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
ul.contents li ul.code, ul.contents li ul.subcontents {
|
||||
padding-left: 2em;
|
||||
}
|
||||
div.body dl {
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
div.body dt {
|
||||
font-style: italic;
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
div.body dd {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
span.info {
|
||||
background: black;
|
||||
border: thin solid black;
|
||||
color: white;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
h2 span.info, h3 span.info, h4 span.info {
|
||||
float: right;
|
||||
font-size: 100%;
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
<h1>Mini-XML API Reference</h1>
|
||||
|
||||
<div class='summary'>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Header</th>
|
||||
<th>mxml.h</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Library</th>
|
||||
<td>-lmxml</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
141
doc/docset.intro
141
doc/docset.intro
@ -1,141 +0,0 @@
|
||||
<h2 class="title"><a id="INTRODUCTION">Introduction</a></h2>
|
||||
|
||||
<p>Mini-XML is a small XML parsing library that you can use to read XML data files or strings in your application without requiring large non-standard libraries. Mini-XML provides the following functionality:</p>
|
||||
|
||||
<ul>
|
||||
<li>Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and strings.</li>
|
||||
<li>Data is stored in a linked-list tree structure, preserving the XML data hierarchy.</li>
|
||||
<li>SAX (streamed) reading of XML files and strings to minimize memory usage.</li>
|
||||
<li>Supports arbitrary element names, attributes, and attribute values with no preset limits, just available memory.</li>
|
||||
<li>Supports integer, real, opaque ("cdata"), and text data types in "leaf" nodes.</li>
|
||||
<li>Functions for creating and managing trees of data.</li>
|
||||
<li>"Find" and "walk" functions for easily locating and navigating trees of data.</li>
|
||||
</ul>
|
||||
|
||||
<p>Mini-XML doesn't do validation or other types of processing on the data based upon schema files or other sources of definition information.</p>
|
||||
|
||||
|
||||
<h2 class="title"><a id="USING">Using Mini-XML</a></h2>
|
||||
|
||||
<p>Mini-XML provides a single header file which you include:</p>
|
||||
|
||||
<pre class="example">
|
||||
#include <mxml.h>
|
||||
</pre>
|
||||
|
||||
<p>Nodes are defined by the "<a href="#mxml_node_t">mxml_node_t</a>" structure; the "type" member defines the node type (element, integer, opaque, real, or text) which determines which value you want to look at in the "value" union. New nodes can be created using the "<a href="#mxmlNewElement">mxmlNewElement()</a>", "<a href="#mxmlNewInteger">mxmlNewInteger()</a>", "<a href="#mxmlNewOpaque">mxmlNewOpaque()</a>", "<a href="#mxmlNewReal">mxmlNewReal()</a>", and "<a href="#mxmlNewText">mxmlNewText()</a>" functions. Only elements can have child nodes, and the top node must be an element, usually "?xml".</p>
|
||||
|
||||
<p>You load an XML file using the "mxmlLoadFile()" function:</p>
|
||||
|
||||
<pre class="example">
|
||||
FILE *fp;
|
||||
mxml_node_t *tree;
|
||||
|
||||
fp = fopen("filename.xml", "r");
|
||||
tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK);
|
||||
fclose(fp);
|
||||
</pre>
|
||||
|
||||
<p>Similarly, you save an XML file using the "<a href="#mxmlSaveFile">mxmlSaveFile()</a>" function:</p>
|
||||
|
||||
<pre class="example">
|
||||
FILE *fp;
|
||||
mxml_node_t *tree;
|
||||
|
||||
fp = fopen("filename.xml", "w");
|
||||
mxmlSaveFile(tree, fp, MXML_NO_CALLBACK);
|
||||
fclose(fp);
|
||||
</pre>
|
||||
|
||||
<p>The "<a href="#mxmlLoadString">mxmlLoadString()</a>", "<a href="#mxmlSaveAllocString">mxmlSaveAllocString()</a>", and "<a href="#mxmlSaveString">mxmlSaveString()</a>" functions load XML node trees from and save XML node trees to strings:</p>
|
||||
|
||||
<pre class="example">
|
||||
char buffer[8192];
|
||||
char *ptr;
|
||||
mxml_node_t *tree;
|
||||
|
||||
...
|
||||
tree = mxmlLoadString(NULL, buffer, MXML_NO_CALLBACK);
|
||||
|
||||
...
|
||||
mxmlSaveString(tree, buffer, sizeof(buffer),
|
||||
MXML_NO_CALLBACK);
|
||||
|
||||
...
|
||||
ptr = mxmlSaveAllocString(tree, MXML_NO_CALLBACK);
|
||||
</pre>
|
||||
|
||||
<p>You can find a named element/node using the "<a href="#mxmlFindElement">mxmlFindElement()</a>" function:</p>
|
||||
|
||||
<pre class="example">
|
||||
mxml_node_t *node = mxmlFindElement(tree, tree, "name",
|
||||
"attr", "value",
|
||||
MXML_DESCEND);
|
||||
</pre>
|
||||
|
||||
<p>The "name", "attr", and "value" arguments can be passed as <code>NULL</code> to act as wildcards, e.g.:</p>
|
||||
|
||||
<pre class="example">
|
||||
/* Find the first "a" element */
|
||||
node = mxmlFindElement(tree, tree, "a", NULL, NULL,
|
||||
MXML_DESCEND);
|
||||
|
||||
/* Find the first "a" element with "href" attribute */
|
||||
node = mxmlFindElement(tree, tree, "a", "href", NULL,
|
||||
MXML_DESCEND);
|
||||
|
||||
/* Find the first "a" element with "href" to a URL */
|
||||
node = mxmlFindElement(tree, tree, "a", "href",
|
||||
"http://www.easysw.com/~mike/mxml/",
|
||||
MXML_DESCEND);
|
||||
|
||||
/* Find the first element with a "src" attribute*/
|
||||
node = mxmlFindElement(tree, tree, NULL, "src", NULL,
|
||||
MXML_DESCEND);
|
||||
|
||||
/* Find the first element with a "src" = "foo.jpg" */
|
||||
node = mxmlFindElement(tree, tree, NULL, "src",
|
||||
"foo.jpg", MXML_DESCEND);
|
||||
</pre>
|
||||
|
||||
<p>You can also iterate with the same function:</p>
|
||||
|
||||
<pre class="example">
|
||||
mxml_node_t *node;
|
||||
|
||||
for (node = mxmlFindElement(tree, tree, "name", NULL,
|
||||
NULL, MXML_DESCEND);
|
||||
node != NULL;
|
||||
node = mxmlFindElement(node, tree, "name", NULL,
|
||||
NULL, MXML_DESCEND))
|
||||
{
|
||||
... do something ...
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>The "mxmlFindPath()" function finds the (first) value node under a specific element using a "path":</p>
|
||||
|
||||
<pre class="example">
|
||||
mxml_node_t *value = mxmlFindPath(tree, "path/to/*/foo/bar");
|
||||
</pre>
|
||||
|
||||
<p>The "mxmlGetInteger()", "mxmlGetOpaque()", "mxmlGetReal()", and "mxmlGetText()" functions retrieve the value from a node:</p>
|
||||
|
||||
<pre class="example">
|
||||
mxml_node_t *node;
|
||||
|
||||
int intvalue = mxmlGetInteger(node);
|
||||
|
||||
const char *opaquevalue = mxmlGetOpaque(node);
|
||||
|
||||
double realvalue = mxmlGetReal(node);
|
||||
|
||||
int whitespacevalue;
|
||||
const char *textvalue = mxmlGetText(node, &whitespacevalue);
|
||||
</pre>
|
||||
|
||||
<p>Finally, once you are done with the XML data, use the "<a href="#mxmlDelete">mxmlDelete()</a>" function to recursively free the memory that is used for a particular node or the entire tree:</p>
|
||||
|
||||
<pre class="example">
|
||||
mxmlDelete(tree);
|
||||
</pre>
|
@ -77,11 +77,6 @@ appendices:</p>
|
||||
Mini-XML Programming Techniques</a>", shows additional
|
||||
ways to use the Mini-XML library.</li>
|
||||
|
||||
<li>Chapter 4, "<a href="#MXMLDOC">Using the
|
||||
mxmldoc Utility</a>", describes how to use the
|
||||
<tt>mxmldoc(1)</tt> program to generate software
|
||||
documentation.</li>
|
||||
|
||||
<li>Appendix A, "<a href="#LICENSE">Mini-XML License</a>",
|
||||
provides the terms and conditions for using and distributing
|
||||
Mini-XML.</li>
|
||||
@ -90,10 +85,6 @@ appendices:</p>
|
||||
Reference</a>", contains a complete reference for
|
||||
Mini-XML, generated by <tt>mxmldoc</tt>.</li>
|
||||
|
||||
<li>Appendix C, "<a href="#SCHEMA">XML Schema</a>", shows
|
||||
the XML schema used for the XML files produced by
|
||||
<tt>mxmldoc</tt>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- NEED 10 -->
|
||||
|
@ -4,7 +4,5 @@ intro.html
|
||||
install.html
|
||||
basics.html
|
||||
advanced.html
|
||||
mxmldoc.html
|
||||
license.html
|
||||
reference.html
|
||||
schema.html
|
||||
|
204
doc/mxmldoc.html
204
doc/mxmldoc.html
@ -1,204 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<h1 align='right'><a name='MXMLDOC'>Chapter 4 - Using the mxmldoc
|
||||
Utility</a></h1>
|
||||
|
||||
<p>This chapter describes how to use <tt>mxmldoc(1)</tt> program to
|
||||
automatically generate documentation from C and C++ source
|
||||
files.</p>
|
||||
|
||||
|
||||
<h2>The Basics</h2>
|
||||
|
||||
<p>Originally developed to generate the Mini-XML and CUPS API
|
||||
documentation, <tt>mxmldoc</tt> is now a general-purpose utility
|
||||
which scans C and C++ source files to produce HTML and man page
|
||||
documentation along with an XML file representing the functions,
|
||||
types, and definitions in those source files. Unlike popular
|
||||
documentation generators like Doxygen or Javadoc, <tt>mxmldoc</tt>
|
||||
uses in-line comments rather than comment headers, allowing for more
|
||||
"natural" code documentation.</p>
|
||||
|
||||
<p>By default, <tt>mxmldoc</tt> produces HTML documentation. For
|
||||
example, the following command will scan all of the C source and
|
||||
header files in the current directory and produce a HTML
|
||||
documentation file called <var>filename.html</var>:</p>
|
||||
|
||||
<pre>
|
||||
<kbd>mxmldoc *.h *.c >filename.html ENTER</kbd>
|
||||
</pre>
|
||||
|
||||
<p>You can also specify an XML file to create which contains all of
|
||||
the information from the source files. For example, the following
|
||||
command creates an XML file called <var>filename.xml</var> in
|
||||
addition to the HTML file:</p>
|
||||
|
||||
<pre>
|
||||
<kbd>mxmldoc filename.xml *.h *.c >filename.html ENTER</kbd>
|
||||
</pre>
|
||||
|
||||
<p>The <tt>--no-output</tt> option disables the normal HTML
|
||||
output:</p>
|
||||
|
||||
<pre>
|
||||
<kbd>mxmldoc --no-output filename.xml *.h *.c ENTER</kbd>
|
||||
</pre>
|
||||
|
||||
<p>You can then run <tt>mxmldoc</tt> again with the XML file alone
|
||||
to generate the HTML documentation:</p>
|
||||
|
||||
<pre>
|
||||
<kbd>mxmldoc filename.xml >filename.html ENTER</kbd>
|
||||
</pre>
|
||||
|
||||
<h3>Creating Man Pages</h3>
|
||||
|
||||
<p>The <tt>--man filename</tt> option tells <tt>mxmldoc</tt> to
|
||||
create a man page instead of HTML documentation, for example:</p>
|
||||
|
||||
<pre>
|
||||
<kbd>mxmldoc --man filename filename.xml \
|
||||
>filename.man ENTER</kbd>
|
||||
|
||||
<kbd>mxmldoc --man filename *.h *.c \
|
||||
>filename.man ENTER</kbd>
|
||||
</pre>
|
||||
|
||||
<h3>Creating EPUB Books</h3>
|
||||
|
||||
<p>The <tt>--epub filename.epub</tt> option tells <tt>mxmldoc</tt> to
|
||||
create an EPUB book containing the HTML documentation, for example:</p>
|
||||
|
||||
<pre>
|
||||
<kbd>mxmldoc --epub foo.epub *.h *.c foo.xml ENTER</kbd>
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>Commenting Your Code</h2>
|
||||
|
||||
<p>As noted previously, <tt>mxmldoc</tt> looks for in-line comments
|
||||
to describe the functions, types, and constants in your code.
|
||||
<tt>Mxmldoc</tt> will document all public names it finds in your
|
||||
source files - any names starting with the underscore character (_)
|
||||
or names that are documented with the <A
|
||||
HREF="#ATDIRECTIVES">@private@</A> directive are treated as private
|
||||
and are not documented.</p>
|
||||
|
||||
<p>Comments appearing directly before a function or type definition
|
||||
are used to document that function or type. Comments appearing after
|
||||
argument, definition, return type, or variable declarations are used
|
||||
to document that argument, definition, return type, or variable. For
|
||||
example, the following code excerpt defines a key/value structure
|
||||
and a function that creates a new instance of that structure:</p>
|
||||
|
||||
<pre>
|
||||
/* A key/value pair. This is used with the
|
||||
dictionary structure. */
|
||||
|
||||
struct keyval
|
||||
{
|
||||
char *key; /* Key string */
|
||||
char *val; /* Value string */
|
||||
};
|
||||
|
||||
/* Create a new key/value pair. */
|
||||
|
||||
struct keyval * /* New key/value pair */
|
||||
new_keyval(
|
||||
const char *key, /* Key string */
|
||||
const char *val) /* Value string */
|
||||
{
|
||||
...
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p><tt>Mxmldoc</tt> also knows to remove extra asterisks (*) from
|
||||
the comment string, so the comment string:</p>
|
||||
|
||||
<pre>
|
||||
/*
|
||||
* Compute the value of PI.
|
||||
*
|
||||
* The function connects to an Internet server
|
||||
* that streams audio of mathematical monks
|
||||
* chanting the first 100 digits of PI.
|
||||
*/
|
||||
</pre>
|
||||
|
||||
<p>will be shown as:</p>
|
||||
|
||||
<pre>
|
||||
Compute the value of PI.
|
||||
|
||||
The function connects to an Internet server
|
||||
that streams audio of mathematical monks
|
||||
chanting the first 100 digits of PI.
|
||||
</pre>
|
||||
|
||||
<p><a name="ATDIRECTIVES">Comments</a> can also include the
|
||||
following special <tt>@name ...@</tt> directive strings:</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><tt>@deprecated@</tt> - flags the item as deprecated to
|
||||
discourage its use</li>
|
||||
|
||||
<li><tt>@exclude format[,...,format]@</tt> - excludes the item from the
|
||||
documentation in the specified formats: "all" for all formats, "epub"
|
||||
for EPUB books, "html" for HTML output, and "man" for man page
|
||||
output</li>
|
||||
|
||||
<li><tt>@private@</tt> - flags the item as private so it
|
||||
will not be included in the documentation</li>
|
||||
|
||||
<li><tt>@since ...@</tt> - flags the item as new since a
|
||||
particular release. The text following the <tt>@since</tt>
|
||||
up to the closing <tt>@</tt> is highlighted in the generated
|
||||
documentation, e.g. <tt>@since Mini-XML 2.7@</tt>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- NEED 10 -->
|
||||
<h2>Titles, Sections, and Introductions</h2>
|
||||
|
||||
<p><tt>Mxmldoc</tt> also provides options to set the title, section,
|
||||
and introduction text for the generated documentation. The
|
||||
<tt>--title text</tt> option specifies the title for the
|
||||
documentation. The title string is usually put in quotes:</p>
|
||||
|
||||
<pre>
|
||||
<kbd>mxmldoc filename.xml \
|
||||
--title "My Famous Documentation" \
|
||||
>filename.html ENTER</kbd>
|
||||
</pre>
|
||||
|
||||
<p>The <tt>--section name</tt> option specifies the section for
|
||||
the documentation. For HTML documentation, the name is placed in
|
||||
a HTML comment such as:</p>
|
||||
|
||||
<pre>
|
||||
<!-- SECTION: name -->
|
||||
</pre>
|
||||
|
||||
<p>For man pages, the section name is usually just a number ("3"),
|
||||
or a number followed by a vendor name ("3acme"). The section name is
|
||||
used in the <tt>.TH</tt> directive in the man page:</p>
|
||||
|
||||
<pre>
|
||||
.TH mylibrary 3acme "My Title" ...
|
||||
</pre>
|
||||
|
||||
<p>The default section name for man page output is "3". There is no
|
||||
default section name for HTML output.</p>
|
||||
|
||||
<p>Finally, the <tt>--intro filename</tt> option specifies a file to
|
||||
embed after the title and section but before the generated
|
||||
documentation. For HTML documentation, the file must consist of
|
||||
valid HTML without the usual <tt>DOCTYPE</tt>, <tt>html</tt>, and
|
||||
<tt>body</tt> elements. For man page documentation, the file must
|
||||
consist of valid <tt>nroff(1)</tt> text.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
194
doc/mxmldoc.man
194
doc/mxmldoc.man
@ -1,194 +0,0 @@
|
||||
.\"
|
||||
.\" mxmldoc man page for mini-XML, a small XML-like file parsing library.
|
||||
.\"
|
||||
.\" Copyright 2003-2018 by Michael R Sweet.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
.\" property of Michael R Sweet and are protected by Federal copyright
|
||||
.\" law. Distribution and use rights are outlined in the file "COPYING"
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" missing or damaged, see the license at:
|
||||
.\"
|
||||
.\" https://michaelrsweet.github.io/mxml
|
||||
.\"
|
||||
.TH mxmldoc 1 "Mini-XML" "2 July 2018" "Michael R Sweet"
|
||||
.SH NAME
|
||||
mxmldoc \- mini-xml documentation generator
|
||||
.SH SYNOPSIS
|
||||
.B mxmldoc
|
||||
\-\-no-output [
|
||||
.I filename.xml
|
||||
]
|
||||
.I source file(s)
|
||||
]
|
||||
.br
|
||||
.B mxmldoc
|
||||
[ \-\-author
|
||||
.I author
|
||||
] [ \-\-body
|
||||
.I bodyfile
|
||||
] [ \-\-copyright
|
||||
.I copyright
|
||||
] [ \-\-footer
|
||||
.I footerfile
|
||||
] [ \-\-header
|
||||
.I headerfile
|
||||
] [ \-\-section
|
||||
.I section
|
||||
] [ \-\-title
|
||||
.I title
|
||||
] [
|
||||
.I filename.xml
|
||||
] [
|
||||
.I source file(s)
|
||||
] >
|
||||
.I filename.html
|
||||
.br
|
||||
.B mxmldoc
|
||||
\-\-framed
|
||||
.I basename
|
||||
[ \-\-author
|
||||
.I author
|
||||
] [ \-\-body
|
||||
.I bodyfile
|
||||
] [ \-\-copyright
|
||||
.I copyright
|
||||
] [ \-\-footer
|
||||
.I footerfile
|
||||
] [ \-\-header
|
||||
.I headerfile
|
||||
] [ \-\-section
|
||||
.I section
|
||||
] [ \-\-title
|
||||
.I title
|
||||
] [
|
||||
.I filename.xml
|
||||
] [
|
||||
.I source file(s)
|
||||
]
|
||||
.br
|
||||
.B mxmldoc
|
||||
[ \-\-author
|
||||
.I author
|
||||
] [ \-\-body
|
||||
.I bodyfile
|
||||
] [ \-\-copyright
|
||||
.I copyright
|
||||
] [ \-\-footer
|
||||
.I footerfile
|
||||
] [ \-\-header
|
||||
.I headerfile
|
||||
] \-\-man
|
||||
.I manpage
|
||||
[ \-\-section
|
||||
.I section
|
||||
] [ \-\-title
|
||||
.I title
|
||||
] [
|
||||
.I filename.xml
|
||||
] [
|
||||
.I source file(s)
|
||||
] >
|
||||
.I filename.man
|
||||
.br
|
||||
.B mxmldoc
|
||||
\-\-epub
|
||||
.I filename.epub
|
||||
[ \-\-author
|
||||
.I author
|
||||
] [ \-\-body
|
||||
.I bodyfile
|
||||
] [ \-\-copyright
|
||||
.I copyright
|
||||
] [ \-\-coverimage
|
||||
.I image.png
|
||||
] [ \-\-docversion
|
||||
.I version
|
||||
] [ \-\-feedname
|
||||
.I name
|
||||
] [ \-\-feedurl
|
||||
.I url
|
||||
] [ \-\-footer
|
||||
.I footerfile
|
||||
] [ \-\-header
|
||||
.I headerfile
|
||||
] [ \-\-section
|
||||
.I section
|
||||
] [ \-\-title
|
||||
.I title
|
||||
] [
|
||||
.I filename.xml
|
||||
] [
|
||||
.I source file(s)
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
\fImxmldoc\fR scans the specified C and C++ source files to produce
|
||||
an XML representation of globally accessible classes, constants,
|
||||
enumerations, functions, structures, typedefs, unions, and variables
|
||||
- the XML file is updated as necessary. By default, a HTML
|
||||
representation of the XML file is written to the standard output.
|
||||
Use the \fI\-\-no-output\fR option to disable the HTML output.
|
||||
.PP
|
||||
Man page source can be generated using the \fI\-\-man\fR option.
|
||||
.PP
|
||||
If no source files are specified then the current XML file is
|
||||
converted to the standard output.
|
||||
.PP
|
||||
In general, any C or C++ source code is handled by \fImxmldoc\fR,
|
||||
however it was specifically written to handle code with
|
||||
documentation that is formatted according to the CUPS Developer
|
||||
Guide which is available at "http://www.cups.org/doc/spec-cmp.html".
|
||||
.SH OPTIONS
|
||||
.TP 5
|
||||
\-\-author "author name"
|
||||
.br
|
||||
Specifies the name of the documentation author.
|
||||
.TP 5
|
||||
\-\-body bodyfile
|
||||
.br
|
||||
Inserts the specified file between the table of contents and references.
|
||||
.TP 5
|
||||
\-\-copyright "copyright text"
|
||||
.br
|
||||
Specifies the copyright text to use.
|
||||
.TP 5
|
||||
\-\-docversion version
|
||||
.br
|
||||
Specifies the version number for the generated documentation.
|
||||
.TP 5
|
||||
\-\-epub filename.epub
|
||||
.br
|
||||
Creates an EPUB book with the specified filename.
|
||||
.TP 5
|
||||
\-\-footer footerfile
|
||||
.br
|
||||
Inserts the specified file at the bottom of the output documentation.
|
||||
.TP 5
|
||||
\-\-framed basename
|
||||
.br
|
||||
Creates HTML documentation using frames - one for the table-of-contents and
|
||||
one for the body.
|
||||
.TP 5
|
||||
\-\-header headerfile
|
||||
.br
|
||||
Inserts the specified file at the top of the output documentation.
|
||||
.TP 5
|
||||
\-\-man manpage
|
||||
.br
|
||||
Generated a man page instead of HTML documentation.
|
||||
.TP 5
|
||||
\-\-no-output
|
||||
.br
|
||||
Disables generation of documentation on the standard output.
|
||||
.TP 5
|
||||
\-\-section section
|
||||
.br
|
||||
Sets the section/keywords in the output documentation.
|
||||
.TP 5
|
||||
\-\-title title
|
||||
.br
|
||||
Sets the title of the output documentation.
|
||||
.SH SEE ALSO
|
||||
mxml(3), Mini-XML Programmers Manual, https://michaelrsweet.github.io/mxml
|
||||
.SH COPYRIGHT
|
||||
Copyright \[co] 2003-2018 by Michael R Sweet.
|
187
doc/mxmldoc.xsd
187
doc/mxmldoc.xsd
@ -1,187 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
Mini-XML 2.x documentation schema for mxmldoc output.
|
||||
Copyright 2003-2017 by Michael R Sweet.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
property of Michael R Sweet and are protected by Federal copyright
|
||||
law. Distribution and use rights are outlined in the file "COPYING"
|
||||
which should have been included with this file. If this file is
|
||||
missing or damaged, see the license at:
|
||||
|
||||
https://michaelrsweet.github.io/mxml
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<!-- basic element definitions -->
|
||||
<xsd:element name="argument" type="argumentType"/>
|
||||
<xsd:element name="class" type="classType"/>
|
||||
<xsd:element name="constant" type="constantType"/>
|
||||
<xsd:element name="description" type="xsd:string"/>
|
||||
<xsd:element name="enumeration" type="enumerationType"/>
|
||||
<xsd:element name="function" type="functionType"/>
|
||||
<xsd:element name="mxmldoc" type="mxmldocType"/>
|
||||
<xsd:element name="namespace" type="namespaceType"/>
|
||||
<xsd:element name="returnvalue" type="returnvalueType"/>
|
||||
<xsd:element name="seealso" type="identifierList"/>
|
||||
<xsd:element name="struct" type="structType"/>
|
||||
<xsd:element name="typedef" type="typedefType"/>
|
||||
<xsd:element name="type" type="xsd:string"/>
|
||||
<xsd:element name="union" type="unionType"/>
|
||||
<xsd:element name="variable" type="variableType"/>
|
||||
|
||||
<!-- descriptions of complex elements -->
|
||||
<xsd:complexType name="argumentType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="default" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
<xsd:attribute name="direction" type="direction" use="optional" default="I"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="classType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element ref="class"/>
|
||||
<xsd:element ref="enumeration"/>
|
||||
<xsd:element ref="function"/>
|
||||
<xsd:element ref="struct"/>
|
||||
<xsd:element ref="typedef"/>
|
||||
<xsd:element ref="union"/>
|
||||
<xsd:element ref="variable"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
<xsd:attribute name="parent" type="xsd:string" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="constantType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="enumerationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="constant" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="functionType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="returnvalue" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="argument" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="seealso" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
<xsd:attribute name="scope" type="scope" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="mxmldocType">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element ref="class"/>
|
||||
<xsd:element ref="enumeration"/>
|
||||
<xsd:element ref="function"/>
|
||||
<xsd:element ref="namespace"/>
|
||||
<xsd:element ref="struct"/>
|
||||
<xsd:element ref="typedef"/>
|
||||
<xsd:element ref="union"/>
|
||||
<xsd:element ref="variable"/>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="namespaceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element ref="class"/>
|
||||
<xsd:element ref="enumeration"/>
|
||||
<xsd:element ref="function"/>
|
||||
<xsd:element ref="struct"/>
|
||||
<xsd:element ref="typedef"/>
|
||||
<xsd:element ref="union"/>
|
||||
<xsd:element ref="variable"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="returnvalueType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="structType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element ref="variable"/>
|
||||
<xsd:element ref="function"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="typedefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="unionType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="variable" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="variableType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- data types -->
|
||||
<xsd:simpleType name="direction">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="I"/>
|
||||
<xsd:enumeration value="O"/>
|
||||
<xsd:enumeration value="IO"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="identifier">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="[a-zA-Z_(.]([a-zA-Z_(.,)* 0-9])*"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="identifierList">
|
||||
<xsd:list itemType="identifier"/>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="scope">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value=""/>
|
||||
<xsd:enumeration value="private"/>
|
||||
<xsd:enumeration value="protected"/>
|
||||
<xsd:enumeration value="public"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
200
doc/schema.html
200
doc/schema.html
@ -1,200 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<h1 align='right'><a name='SCHEMA'>Appendix C - XML Schema</a></h1>
|
||||
|
||||
<p>This appendix provides the XML schema that is used for the XML
|
||||
files produced by <tt>mxmldoc</tt>. This schema is available on-line
|
||||
at:</p>
|
||||
|
||||
<pre>
|
||||
https://michaelrsweet.github.io/mxml/mxmldoc.xsd
|
||||
</pre>
|
||||
|
||||
<h2 _hd_omit_toc>mxmldoc.xsd</h2>
|
||||
|
||||
<pre><small>
|
||||
<?xml version="1.0"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
Mini-XML 2.11 documentation schema for mxmldoc output.
|
||||
Copyright 2003-2017 by Michael R Sweet.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<!-- basic element definitions -->
|
||||
<xsd:element name="argument" type="argumentType"/>
|
||||
<xsd:element name="class" type="classType"/>
|
||||
<xsd:element name="constant" type="constantType"/>
|
||||
<xsd:element name="description" type="xsd:string"/>
|
||||
<xsd:element name="enumeration" type="enumerationType"/>
|
||||
<xsd:element name="function" type="functionType"/>
|
||||
<xsd:element name="mxmldoc" type="mxmldocType"/>
|
||||
<xsd:element name="namespace" type="namespaceType"/>
|
||||
<xsd:element name="returnvalue" type="returnvalueType"/>
|
||||
<xsd:element name="seealso" type="identifierList"/>
|
||||
<xsd:element name="struct" type="structType"/>
|
||||
<xsd:element name="typedef" type="typedefType"/>
|
||||
<xsd:element name="type" type="xsd:string"/>
|
||||
<xsd:element name="union" type="unionType"/>
|
||||
<xsd:element name="variable" type="variableType"/>
|
||||
|
||||
<!-- descriptions of complex elements -->
|
||||
<xsd:complexType name="argumentType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="default" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
<xsd:attribute name="direction" type="direction" use="optional"
|
||||
default="I"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="classType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element ref="class"/>
|
||||
<xsd:element ref="enumeration"/>
|
||||
<xsd:element ref="function"/>
|
||||
<xsd:element ref="struct"/>
|
||||
<xsd:element ref="typedef"/>
|
||||
<xsd:element ref="union"/>
|
||||
<xsd:element ref="variable"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
<xsd:attribute name="parent" type="xsd:string" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="constantType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="enumerationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="constant" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="functionType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="returnvalue" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="argument" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="seealso" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
<xsd:attribute name="scope" type="scope" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="mxmldocType">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element ref="class"/>
|
||||
<xsd:element ref="enumeration"/>
|
||||
<xsd:element ref="function"/>
|
||||
<xsd:element ref="namespace"/>
|
||||
<xsd:element ref="struct"/>
|
||||
<xsd:element ref="typedef"/>
|
||||
<xsd:element ref="union"/>
|
||||
<xsd:element ref="variable"/>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="namespaceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element ref="class"/>
|
||||
<xsd:element ref="enumeration"/>
|
||||
<xsd:element ref="function"/>
|
||||
<xsd:element ref="struct"/>
|
||||
<xsd:element ref="typedef"/>
|
||||
<xsd:element ref="union"/>
|
||||
<xsd:element ref="variable"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="returnvalueType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="structType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element ref="variable"/>
|
||||
<xsd:element ref="function"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="typedefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="unionType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="variable" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="variableType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="identifier" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- data types -->
|
||||
<xsd:simpleType name="direction">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="I"/>
|
||||
<xsd:enumeration value="O"/>
|
||||
<xsd:enumeration value="IO"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="identifier">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="[a-zA-Z_(.]([a-zA-Z_(.,)* 0-9])*"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="identifierList">
|
||||
<xsd:list itemType="identifier"/>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="scope">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value=""/>
|
||||
<xsd:enumeration value="private"/>
|
||||
<xsd:enumeration value="protected"/>
|
||||
<xsd:enumeration value="public"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
</small></pre>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user