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. 4
      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 \ --header doc/docset.header --intro doc/docset.intro \
--css doc/docset.css --title "Mini-XML API Reference" \ --css doc/docset.css --title "Mini-XML API Reference" \
mxml.xml || exit 1; \ mxml.xml || exit 1; \
$(RM) org.minixml.atom; \
/Developer/usr/bin/docsetutil package --output org.minixml.xar \ /Developer/usr/bin/docsetutil package --output org.minixml.xar \
--atom org.minixml.atom \ --atom org.minixml.atom \
--download-url http://www.minixml.org/org.minixml.xar \ --download-url http://www.minixml.org/org.minixml.xar \

@ -1,11 +1,11 @@
body { body {
background: white; background: white;
color: black; 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 { 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 { kbd {
@ -27,7 +27,7 @@ pre.example {
pre.example em { pre.example em {
color: #3f0000; color: #3f0000;
font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-family: "lucida grande", geneva, helvetica, arial, sans-serif;
} }
div.summary table { div.summary table {

@ -2,10 +2,11 @@
<html> <html>
<head> <head>
<title>Documentation </title> <title>Documentation </title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="creator" content="Mini-XML v2.7"> <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!-- <style type="text/css"><!--
body, p, h1, h2, h3, h4 { 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 { div.body h1 {
font-size: 250%; font-size: 250%;
@ -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_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> <li><a href="#mxml_type_e" title="The XML node type.">mxml_type_e</a></li>
</ul></li> </ul></li>
</ul>
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2> <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
<h3 class="function"><a name="mxmlAdd">mxmlAdd</a></h3> <h3 class="function"><a name="mxmlAdd">mxmlAdd</a></h3>
<p class="description">Add a node to a tree.</p> <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" "\"http://www.w3.org/TR/html4/frameset.dtd\">\n"
"<html>\n" "<html>\n"
"<head>\n" "<head>\n"
"<title>", out); "\t<title>", out);
write_string(out, title, OUTPUT_HTML); write_string(out, title, OUTPUT_HTML);
fputs("</title>\n", out); fputs("</title>\n", out);
if (section) 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\" "
"<frameset cols=\"250,*\">\n", out); "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 src=\"%s-toc.html\">\n", basename);
fprintf(out, "<frame name=\"body\" src=\"%s-body.html\">\n", basename); fprintf(out, "<frame name=\"body\" src=\"%s-body.html\">\n", basename);
fputs("</frameset>\n" fputs("</frameset>\n"
@ -3828,14 +3832,16 @@ write_html_head(FILE *out, /* I - Output file */
fprintf(out, "<!-- SECTION: %s -->\n", section); fprintf(out, "<!-- SECTION: %s -->\n", section);
fputs("<head>\n" fputs("<head>\n"
"<title>", out); "\t<title>", out);
write_string(out, title, OUTPUT_HTML); write_string(out, title, OUTPUT_HTML);
fputs("</title>\n", out); fputs("\t</title>\n", out);
if (section) 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); "<style type=\"text/css\"><!--\n", out);
if (cssfile) if (cssfile)
@ -3853,7 +3859,8 @@ write_html_head(FILE *out, /* I - Output file */
*/ */
fputs("body, p, h1, h2, h3, h4 {\n" 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" "}\n"
"div.body h1 {\n" "div.body h1 {\n"
" font-size: 250%;\n" " font-size: 250%;\n"
@ -4806,7 +4813,7 @@ write_toc(FILE *out, /* I - Output file */
*end, /* End of line */ *end, /* End of line */
*anchor, /* Anchor name */ *anchor, /* Anchor name */
quote, /* Quote character for value */ quote, /* Quote character for value */
level = '1', /* Current heading level */ level = '2', /* Current heading level */
newlevel; /* New heading level */ newlevel; /* New heading level */
int inelement; /* In an element? */ int inelement; /* In an element? */
@ -4960,8 +4967,8 @@ write_toc(FILE *out, /* I - Output file */
level = newlevel; level = newlevel;
xmlid ++; xmlid ++;
fprintf(out, "<li><a href=\"%s#%s\"%s>", target ? target : "", anchor, fprintf(out, "%s<li><a href=\"%s#%s\"%s>", level > '2' ? "\t" : "",
targetattr); target ? target : "", anchor, targetattr);
quote = 0; quote = 0;
@ -5047,7 +5054,7 @@ write_toc(FILE *out, /* I - Output file */
} }
else else
{ {
fprintf(out, "<li><a href=\"%s#%s\"%s title=\"", fprintf(out, "\t<li><a href=\"%s#%s\"%s title=\"",
target ? target : "", name, targetattr); target ? target : "", name, targetattr);
write_description(out, description, "", 1); write_description(out, description, "", 1);
fprintf(out, "\">%s</a></li>\n", name); fprintf(out, "\">%s</a></li>\n", name);
@ -5094,7 +5101,7 @@ write_toc(FILE *out, /* I - Output file */
} }
else else
{ {
fprintf(out, "<li><a href=\"%s#%s\"%s title=\"", fprintf(out, "\t<li><a href=\"%s#%s\"%s title=\"",
target ? target : "", name, targetattr); target ? target : "", name, targetattr);
write_description(out, description, "", 1); write_description(out, description, "", 1);
fprintf(out, "\">%s</a></li>\n", name); fprintf(out, "\">%s</a></li>\n", name);
@ -5344,6 +5351,13 @@ write_toc(FILE *out, /* I - Output file */
else else
fputs("</ul></li>\n", out); fputs("</ul></li>\n", out);
} }
/*
* Close out the HTML table-of-contents list as needed...
*/
if (!xml)
fputs("</ul>\n", out);
} }

Loading…
Cancel
Save