Fix some HTML and CSS validation issues.

pull/193/head
Michael R Sweet 14 years ago
parent a9cc5e77a4
commit 3899cb0aa5
  1. 1
      Makefile.in
  2. 6
      doc/docset.css
  3. 146
      doc/reference.html
  4. 42
      mxmldoc.c

@ -391,6 +391,7 @@ mxml.xml: mxmldoc-static mxml.h $(PUBLIBOBJS:.o=.c)
--header doc/docset.header --intro doc/docset.intro \
--css doc/docset.css --title "Mini-XML API Reference" \
mxml.xml || exit 1; \
$(RM) org.minixml.atom; \
/Developer/usr/bin/docsetutil package --output org.minixml.xar \
--atom org.minixml.atom \
--download-url http://www.minixml.org/org.minixml.xar \

@ -1,11 +1,11 @@
body {
background: white;
color: black;
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
font-family: "lucida grande", geneva, helvetica, arial, sans-serif;
}
h1, h2, h3, h4, h5, h6, p, td, th {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
font-family: "lucida grande", geneva, helvetica, arial, sans-serif;
}
kbd {
@ -27,7 +27,7 @@ pre.example {
pre.example em {
color: #3f0000;
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
font-family: "lucida grande", geneva, helvetica, arial, sans-serif;
}
div.summary table {

@ -1,11 +1,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documentation</title>
<meta name="creator" content="Mini-XML v2.7">
<title>Documentation </title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
body, p, h1, h2, h3, h4 {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
font-family: "lucida grande", geneva, helvetica, arial, sans-serif;
}
div.body h1 {
font-size: 250%;
@ -144,80 +145,80 @@ Reference</h1>
<h2 class="title">Contents</h2>
<ul class="contents">
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
<li><a href="#mxmlAdd" title="Add a node to a tree.">mxmlAdd</a></li>
<li><a href="#mxmlDelete" title="Delete a node and all of its children.">mxmlDelete</a></li>
<li><a href="#mxmlElementDeleteAttr" title="Delete an attribute.">mxmlElementDeleteAttr</a></li>
<li><a href="#mxmlElementGetAttr" title="Get an attribute.">mxmlElementGetAttr</a></li>
<li><a href="#mxmlElementSetAttr" title="Set an attribute.">mxmlElementSetAttr</a></li>
<li><a href="#mxmlElementSetAttrf" title="Set an attribute with a formatted value.">mxmlElementSetAttrf</a></li>
<li><a href="#mxmlEntityAddCallback" title="Add a callback to convert entities to Unicode.">mxmlEntityAddCallback</a></li>
<li><a href="#mxmlEntityGetName" title="Get the name that corresponds to the character value.">mxmlEntityGetName</a></li>
<li><a href="#mxmlEntityGetValue" title="Get the character corresponding to a named entity.">mxmlEntityGetValue</a></li>
<li><a href="#mxmlEntityRemoveCallback" title="Remove a callback.">mxmlEntityRemoveCallback</a></li>
<li><a href="#mxmlFindElement" title="Find the named element.">mxmlFindElement</a></li>
<li><a href="#mxmlFindPath" title="Find a node with the given path.">mxmlFindPath</a></li>
<li><a href="#mxmlGetCDATA" title="Get the value for a CDATA node.">mxmlGetCDATA</a></li>
<li><a href="#mxmlGetCustom" title="Get the value for a custom node.">mxmlGetCustom</a></li>
<li><a href="#mxmlGetElement" title="Get the name for an element node.">mxmlGetElement</a></li>
<li><a href="#mxmlGetFirstChild" title="Get the first child of an element node.">mxmlGetFirstChild</a></li>
<li><a href="#mxmlGetInteger" title="Get the integer value from the specified node or its
<li><a href="#mxmlAdd" title="Add a node to a tree.">mxmlAdd</a></li>
<li><a href="#mxmlDelete" title="Delete a node and all of its children.">mxmlDelete</a></li>
<li><a href="#mxmlElementDeleteAttr" title="Delete an attribute.">mxmlElementDeleteAttr</a></li>
<li><a href="#mxmlElementGetAttr" title="Get an attribute.">mxmlElementGetAttr</a></li>
<li><a href="#mxmlElementSetAttr" title="Set an attribute.">mxmlElementSetAttr</a></li>
<li><a href="#mxmlElementSetAttrf" title="Set an attribute with a formatted value.">mxmlElementSetAttrf</a></li>
<li><a href="#mxmlEntityAddCallback" title="Add a callback to convert entities to Unicode.">mxmlEntityAddCallback</a></li>
<li><a href="#mxmlEntityGetName" title="Get the name that corresponds to the character value.">mxmlEntityGetName</a></li>
<li><a href="#mxmlEntityGetValue" title="Get the character corresponding to a named entity.">mxmlEntityGetValue</a></li>
<li><a href="#mxmlEntityRemoveCallback" title="Remove a callback.">mxmlEntityRemoveCallback</a></li>
<li><a href="#mxmlFindElement" title="Find the named element.">mxmlFindElement</a></li>
<li><a href="#mxmlFindPath" title="Find a node with the given path.">mxmlFindPath</a></li>
<li><a href="#mxmlGetCDATA" title="Get the value for a CDATA node.">mxmlGetCDATA</a></li>
<li><a href="#mxmlGetCustom" title="Get the value for a custom node.">mxmlGetCustom</a></li>
<li><a href="#mxmlGetElement" title="Get the name for an element node.">mxmlGetElement</a></li>
<li><a href="#mxmlGetFirstChild" title="Get the first child of an element node.">mxmlGetFirstChild</a></li>
<li><a href="#mxmlGetInteger" title="Get the integer value from the specified node or its
first child.">mxmlGetInteger</a></li>
<li><a href="#mxmlGetLastChild" title="Get the last child of an element node.">mxmlGetLastChild</a></li>
<li><a href="#mxmlGetNextSibling" title="Return the node type...">mxmlGetNextSibling</a></li>
<li><a href="#mxmlGetOpaque" title="Get an opaque string value for a node or its first child.">mxmlGetOpaque</a></li>
<li><a href="#mxmlGetParent" title="Get the parent node.">mxmlGetParent</a></li>
<li><a href="#mxmlGetPrevSibling" title="Get the previous node for the current parent.">mxmlGetPrevSibling</a></li>
<li><a href="#mxmlGetReal" title="Get the real value for a node or its first child.">mxmlGetReal</a></li>
<li><a href="#mxmlGetRefCount" title="Get the current reference (use) count for a node.">mxmlGetRefCount</a></li>
<li><a href="#mxmlGetText" title="Get the text value for a node or its first child.">mxmlGetText</a></li>
<li><a href="#mxmlGetType" title="Get the node type.">mxmlGetType</a></li>
<li><a href="#mxmlGetUserData" title="Get the user data pointer for a node.">mxmlGetUserData</a></li>
<li><a href="#mxmlIndexDelete" title="Delete an index.">mxmlIndexDelete</a></li>
<li><a href="#mxmlIndexEnum" title="Return the next node in the index.">mxmlIndexEnum</a></li>
<li><a href="#mxmlIndexFind" title="Find the next matching node.">mxmlIndexFind</a></li>
<li><a href="#mxmlIndexGetCount" title="Get the number of nodes in an index.">mxmlIndexGetCount</a></li>
<li><a href="#mxmlIndexNew" title="Create a new index.">mxmlIndexNew</a></li>
<li><a href="#mxmlIndexReset" title="Reset the enumeration/find pointer in the index and
<li><a href="#mxmlGetLastChild" title="Get the last child of an element node.">mxmlGetLastChild</a></li>
<li><a href="#mxmlGetNextSibling" title="Return the node type...">mxmlGetNextSibling</a></li>
<li><a href="#mxmlGetOpaque" title="Get an opaque string value for a node or its first child.">mxmlGetOpaque</a></li>
<li><a href="#mxmlGetParent" title="Get the parent node.">mxmlGetParent</a></li>
<li><a href="#mxmlGetPrevSibling" title="Get the previous node for the current parent.">mxmlGetPrevSibling</a></li>
<li><a href="#mxmlGetReal" title="Get the real value for a node or its first child.">mxmlGetReal</a></li>
<li><a href="#mxmlGetRefCount" title="Get the current reference (use) count for a node.">mxmlGetRefCount</a></li>
<li><a href="#mxmlGetText" title="Get the text value for a node or its first child.">mxmlGetText</a></li>
<li><a href="#mxmlGetType" title="Get the node type.">mxmlGetType</a></li>
<li><a href="#mxmlGetUserData" title="Get the user data pointer for a node.">mxmlGetUserData</a></li>
<li><a href="#mxmlIndexDelete" title="Delete an index.">mxmlIndexDelete</a></li>
<li><a href="#mxmlIndexEnum" title="Return the next node in the index.">mxmlIndexEnum</a></li>
<li><a href="#mxmlIndexFind" title="Find the next matching node.">mxmlIndexFind</a></li>
<li><a href="#mxmlIndexGetCount" title="Get the number of nodes in an index.">mxmlIndexGetCount</a></li>
<li><a href="#mxmlIndexNew" title="Create a new index.">mxmlIndexNew</a></li>
<li><a href="#mxmlIndexReset" title="Reset the enumeration/find pointer in the index and
return the first node in the index.">mxmlIndexReset</a></li>
<li><a href="#mxmlLoadFd" title="Load a file descriptor into an XML node tree.">mxmlLoadFd</a></li>
<li><a href="#mxmlLoadFile" title="Load a file into an XML node tree.">mxmlLoadFile</a></li>
<li><a href="#mxmlLoadString" title="Load a string into an XML node tree.">mxmlLoadString</a></li>
<li><a href="#mxmlNewCDATA" title="Create a new CDATA node.">mxmlNewCDATA</a></li>
<li><a href="#mxmlNewCustom" title="Create a new custom data node.">mxmlNewCustom</a></li>
<li><a href="#mxmlNewElement" title="Create a new element node.">mxmlNewElement</a></li>
<li><a href="#mxmlNewInteger" title="Create a new integer node.">mxmlNewInteger</a></li>
<li><a href="#mxmlNewOpaque" title="Create a new opaque string.">mxmlNewOpaque</a></li>
<li><a href="#mxmlNewReal" title="Create a new real number node.">mxmlNewReal</a></li>
<li><a href="#mxmlNewText" title="Create a new text fragment node.">mxmlNewText</a></li>
<li><a href="#mxmlNewTextf" title="Create a new formatted text fragment node.">mxmlNewTextf</a></li>
<li><a href="#mxmlNewXML" title="Create a new XML document tree.">mxmlNewXML</a></li>
<li><a href="#mxmlRelease" title="Release a node.">mxmlRelease</a></li>
<li><a href="#mxmlRemove" title="Remove a node from its parent.">mxmlRemove</a></li>
<li><a href="#mxmlRetain" title="Retain a node.">mxmlRetain</a></li>
<li><a href="#mxmlSAXLoadFd" title="Load a file descriptor into an XML node tree
<li><a href="#mxmlLoadFd" title="Load a file descriptor into an XML node tree.">mxmlLoadFd</a></li>
<li><a href="#mxmlLoadFile" title="Load a file into an XML node tree.">mxmlLoadFile</a></li>
<li><a href="#mxmlLoadString" title="Load a string into an XML node tree.">mxmlLoadString</a></li>
<li><a href="#mxmlNewCDATA" title="Create a new CDATA node.">mxmlNewCDATA</a></li>
<li><a href="#mxmlNewCustom" title="Create a new custom data node.">mxmlNewCustom</a></li>
<li><a href="#mxmlNewElement" title="Create a new element node.">mxmlNewElement</a></li>
<li><a href="#mxmlNewInteger" title="Create a new integer node.">mxmlNewInteger</a></li>
<li><a href="#mxmlNewOpaque" title="Create a new opaque string.">mxmlNewOpaque</a></li>
<li><a href="#mxmlNewReal" title="Create a new real number node.">mxmlNewReal</a></li>
<li><a href="#mxmlNewText" title="Create a new text fragment node.">mxmlNewText</a></li>
<li><a href="#mxmlNewTextf" title="Create a new formatted text fragment node.">mxmlNewTextf</a></li>
<li><a href="#mxmlNewXML" title="Create a new XML document tree.">mxmlNewXML</a></li>
<li><a href="#mxmlRelease" title="Release a node.">mxmlRelease</a></li>
<li><a href="#mxmlRemove" title="Remove a node from its parent.">mxmlRemove</a></li>
<li><a href="#mxmlRetain" title="Retain a node.">mxmlRetain</a></li>
<li><a href="#mxmlSAXLoadFd" title="Load a file descriptor into an XML node tree
using a SAX callback.">mxmlSAXLoadFd</a></li>
<li><a href="#mxmlSAXLoadFile" title="Load a file into an XML node tree
<li><a href="#mxmlSAXLoadFile" title="Load a file into an XML node tree
using a SAX callback.">mxmlSAXLoadFile</a></li>
<li><a href="#mxmlSAXLoadString" title="Load a string into an XML node tree
<li><a href="#mxmlSAXLoadString" title="Load a string into an XML node tree
using a SAX callback.">mxmlSAXLoadString</a></li>
<li><a href="#mxmlSaveAllocString" title="Save an XML tree to an allocated string.">mxmlSaveAllocString</a></li>
<li><a href="#mxmlSaveFd" title="Save an XML tree to a file descriptor.">mxmlSaveFd</a></li>
<li><a href="#mxmlSaveFile" title="Save an XML tree to a file.">mxmlSaveFile</a></li>
<li><a href="#mxmlSaveString" title="Save an XML node tree to a string.">mxmlSaveString</a></li>
<li><a href="#mxmlSetCDATA" title="Set the element name of a CDATA node.">mxmlSetCDATA</a></li>
<li><a href="#mxmlSetCustom" title="Set the data and destructor of a custom data node.">mxmlSetCustom</a></li>
<li><a href="#mxmlSetCustomHandlers" title="Set the handling functions for custom data.">mxmlSetCustomHandlers</a></li>
<li><a href="#mxmlSetElement" title="Set the name of an element node.">mxmlSetElement</a></li>
<li><a href="#mxmlSetErrorCallback" title="Set the error message callback.">mxmlSetErrorCallback</a></li>
<li><a href="#mxmlSetInteger" title="Set the value of an integer node.">mxmlSetInteger</a></li>
<li><a href="#mxmlSetOpaque" title="Set the value of an opaque node.">mxmlSetOpaque</a></li>
<li><a href="#mxmlSetReal" title="Set the value of a real number node.">mxmlSetReal</a></li>
<li><a href="#mxmlSetText" title="Set the value of a text node.">mxmlSetText</a></li>
<li><a href="#mxmlSetTextf" title="Set the value of a text node to a formatted string.">mxmlSetTextf</a></li>
<li><a href="#mxmlSetUserData" title="Set the user data pointer for a node.">mxmlSetUserData</a></li>
<li><a href="#mxmlSetWrapMargin" title="Set the wrap margin when saving XML data.">mxmlSetWrapMargin</a></li>
<li><a href="#mxmlWalkNext" title="Walk to the next logical node in the tree.">mxmlWalkNext</a></li>
<li><a href="#mxmlWalkPrev" title="Walk to the previous logical node in the tree.">mxmlWalkPrev</a></li>
<li><a href="#mxmlSaveAllocString" title="Save an XML tree to an allocated string.">mxmlSaveAllocString</a></li>
<li><a href="#mxmlSaveFd" title="Save an XML tree to a file descriptor.">mxmlSaveFd</a></li>
<li><a href="#mxmlSaveFile" title="Save an XML tree to a file.">mxmlSaveFile</a></li>
<li><a href="#mxmlSaveString" title="Save an XML node tree to a string.">mxmlSaveString</a></li>
<li><a href="#mxmlSetCDATA" title="Set the element name of a CDATA node.">mxmlSetCDATA</a></li>
<li><a href="#mxmlSetCustom" title="Set the data and destructor of a custom data node.">mxmlSetCustom</a></li>
<li><a href="#mxmlSetCustomHandlers" title="Set the handling functions for custom data.">mxmlSetCustomHandlers</a></li>
<li><a href="#mxmlSetElement" title="Set the name of an element node.">mxmlSetElement</a></li>
<li><a href="#mxmlSetErrorCallback" title="Set the error message callback.">mxmlSetErrorCallback</a></li>
<li><a href="#mxmlSetInteger" title="Set the value of an integer node.">mxmlSetInteger</a></li>
<li><a href="#mxmlSetOpaque" title="Set the value of an opaque node.">mxmlSetOpaque</a></li>
<li><a href="#mxmlSetReal" title="Set the value of a real number node.">mxmlSetReal</a></li>
<li><a href="#mxmlSetText" title="Set the value of a text node.">mxmlSetText</a></li>
<li><a href="#mxmlSetTextf" title="Set the value of a text node to a formatted string.">mxmlSetTextf</a></li>
<li><a href="#mxmlSetUserData" title="Set the user data pointer for a node.">mxmlSetUserData</a></li>
<li><a href="#mxmlSetWrapMargin" title="Set the wrap margin when saving XML data.">mxmlSetWrapMargin</a></li>
<li><a href="#mxmlWalkNext" title="Walk to the next logical node in the tree.">mxmlWalkNext</a></li>
<li><a href="#mxmlWalkPrev" title="Walk to the previous logical node in the tree.">mxmlWalkPrev</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#mxml_custom_destroy_cb_t" title="Custom data destructor">mxml_custom_destroy_cb_t</a></li>
@ -237,6 +238,7 @@ using a SAX callback.">mxmlSAXLoadString</a></li>
<li><a href="#mxml_sax_event_e" title="SAX event type.">mxml_sax_event_e</a></li>
<li><a href="#mxml_type_e" title="The XML node type.">mxml_type_e</a></li>
</ul></li>
</ul>
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
<h3 class="function"><a name="mxmlAdd">mxmlAdd</a></h3>
<p class="description">Add a node to a tree.</p>

@ -3180,15 +3180,19 @@ write_html(const char *section, /* I - Section */
"\"http://www.w3.org/TR/html4/frameset.dtd\">\n"
"<html>\n"
"<head>\n"
"<title>", out);
"\t<title>", out);
write_string(out, title, OUTPUT_HTML);
fputs("</title>\n", out);
if (section)
fprintf(out, "<meta name=\"keywords\" content=\"%s\">\n", section);
fprintf(out, "\t<meta name=\"keywords\" content=\"%s\">\n", section);
fputs("<meta name=\"creator\" content=\"" MXML_VERSION "\">\n"
"<frameset cols=\"250,*\">\n", out);
fputs("\t<meta http-equiv=\"Content-Type\" "
"content=\"text/html;charset=utf-8\">\n"
"\t<meta name=\"creator\" content=\"" MXML_VERSION "\">\n"
"</head>\n", out);
fputs("<frameset cols=\"250,*\">\n", out);
fprintf(out, "<frame src=\"%s-toc.html\">\n", basename);
fprintf(out, "<frame name=\"body\" src=\"%s-body.html\">\n", basename);
fputs("</frameset>\n"
@ -3828,14 +3832,16 @@ write_html_head(FILE *out, /* I - Output file */
fprintf(out, "<!-- SECTION: %s -->\n", section);
fputs("<head>\n"
"<title>", out);
"\t<title>", out);
write_string(out, title, OUTPUT_HTML);
fputs("</title>\n", out);
fputs("\t</title>\n", out);
if (section)
fprintf(out, "<meta name=\"keywords\" content=\"%s\">\n", section);
fprintf(out, "\t<meta name=\"keywords\" content=\"%s\">\n", section);
fputs("<meta name=\"creator\" content=\"" MXML_VERSION "\">\n"
fputs("\t<meta http-equiv=\"Content-Type\" "
"content=\"text/html;charset=utf-8\">\n"
"\t<meta name=\"creator\" content=\"" MXML_VERSION "\">\n"
"<style type=\"text/css\"><!--\n", out);
if (cssfile)
@ -3853,7 +3859,8 @@ write_html_head(FILE *out, /* I - Output file */
*/
fputs("body, p, h1, h2, h3, h4 {\n"
" font-family: lucida grande, geneva, helvetica, arial, sans-serif;\n"
" font-family: \"lucida grande\", geneva, helvetica, arial, "
"sans-serif;\n"
"}\n"
"div.body h1 {\n"
" font-size: 250%;\n"
@ -4806,7 +4813,7 @@ write_toc(FILE *out, /* I - Output file */
*end, /* End of line */
*anchor, /* Anchor name */
quote, /* Quote character for value */
level = '1', /* Current heading level */
level = '2', /* Current heading level */
newlevel; /* New heading level */
int inelement; /* In an element? */
@ -4960,8 +4967,8 @@ write_toc(FILE *out, /* I - Output file */
level = newlevel;
xmlid ++;
fprintf(out, "<li><a href=\"%s#%s\"%s>", target ? target : "", anchor,
targetattr);
fprintf(out, "%s<li><a href=\"%s#%s\"%s>", level > '2' ? "\t" : "",
target ? target : "", anchor, targetattr);
quote = 0;
@ -5047,7 +5054,7 @@ write_toc(FILE *out, /* I - Output file */
}
else
{
fprintf(out, "<li><a href=\"%s#%s\"%s title=\"",
fprintf(out, "\t<li><a href=\"%s#%s\"%s title=\"",
target ? target : "", name, targetattr);
write_description(out, description, "", 1);
fprintf(out, "\">%s</a></li>\n", name);
@ -5094,7 +5101,7 @@ write_toc(FILE *out, /* I - Output file */
}
else
{
fprintf(out, "<li><a href=\"%s#%s\"%s title=\"",
fprintf(out, "\t<li><a href=\"%s#%s\"%s title=\"",
target ? target : "", name, targetattr);
write_description(out, description, "", 1);
fprintf(out, "\">%s</a></li>\n", name);
@ -5344,6 +5351,13 @@ write_toc(FILE *out, /* I - Output file */
else
fputs("</ul></li>\n", out);
}
/*
* Close out the HTML table-of-contents list as needed...
*/
if (!xml)
fputs("</ul>\n", out);
}

Loading…
Cancel
Save