Re: SUO: Re: Web-based ontology browsers
Robert et al.,
When you write translate KIF documents to HTML (or XML), there is
only one simple tag that you need: just put <pre> for "preserve"
formatting -- i.e. don't throw away spaces, indents, etc., at the
on the line before the KIF statement and </pre> on the line after it.
The default font for <pre> is usually courier. But if you want any
other font, you can specify it in one line in the header of the HTML
file.
For example:
<pre>
(1) (KIF$class collection)
(forall (?c (collection ?c)) (KIF$class ?c))
</pre>
<pre>
(2) (collection conglomerate)
(forall (?c (conglomerate ?c)) (collection ?c))
(not (conglomerate conglomerate))
</pre>
That is all you need. And if you would like to embed those formulas
in a larger table, you can use Netscape Composer, which is one of the
easiest programs to use for generating tables. (Much, much, much
easier than an Excel spreadsheet, which is designed for computing,
not for generating tables. The main reason why people use Excel is
that MS Word is an abomination for generating tables. Excel is only
a semi-abomination for that purpose.)
And my main comment about the following output from MS Word is that
it makes garbage sound attractive in comparison. If you want to
generate HTML from MS Word, I suggest that you output it as plain
ASCII text and use Netscape Composer or a plain ASCII editor
to insert the formatting tags.
John Sowa
________________________________________________________________________
> This is rendered as follows in the HTML version that MS-Word generates. If
> you look closely, you can see the above axioms within the dense formatting.
>
> <table border=0 cellspacing=0 cellpadding=0 style='margin-left:.25in;
> border-collapse:collapse;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
> <tr>
> <td width=566 valign=top style='width:5.9in;padding:0in 5.4pt 0in 5.4pt'>
> <p class=MsoNormal align=left style='text-align:left'><span
> style='mso-bookmark:
> _Toc515954238'><span style='font-size:8.0pt;mso-bidi-font-size:12.0pt;
> font-family:"Courier New"'>(1) (KIF$class
> collection)<o:p></o:p></span></span></p>
> <p class=MsoNormal align=left style='text-align:left'><span
> style='mso-bookmark:
> _Toc515954238'><span style='font-size:8.0pt;mso-bidi-font-size:12.0pt;
> font-family:"Courier New"'><span style="mso-spacerun: yes">
> </span>(forall
> (?c (collection ?c)) (KIF$class ?c))<o:p></o:p></span></span></p>
> <p class=MsoNormal align=left style='text-align:left'><span
> style='mso-bookmark:
> _Toc515954238'><span style='font-size:8.0pt;mso-bidi-font-size:12.0pt;
> font-family:"Courier New"'><![if
> !supportEmptyParas]> <![endif]><o:p></o:p></span></span></p>
> <p class=MsoNormal align=left style='text-align:left'><span
> style='mso-bookmark:
> _Toc515954238'><span style='font-size:8.0pt;mso-bidi-font-size:12.0pt;
> font-family:"Courier New"'>(2) (collection
> conglomerate)<o:p></o:p></span></span></p>
> <p class=MsoNormal align=left style='text-align:left'><span
> style='mso-bookmark:
> _Toc515954238'><span style='font-size:8.0pt;mso-bidi-font-size:12.0pt;
> font-family:"Courier New"'><span style="mso-spacerun: yes">
> </span>(forall
> (?c (conglomerate ?c)) (collection ?c))<o:p></o:p></span></span></p>
> <p class=MsoNormal align=left style='text-align:left'><span
> style='mso-bookmark:
> _Toc515954238'><span style='font-size:8.0pt;mso-bidi-font-size:12.0pt;
> font-family:"Courier New"'><span style="mso-spacerun: yes"> </span>(not
> (conglomerate conglomerate))<o:p></o:p></span></span></p>
> </td>
> <span style='mso-bookmark:_Toc515954238'></span>
> </tr>
>
> As indicated by this example, perhaps the KIF axioms can be extracted from
> the pattern of this formatting.
Never. Writing a program to do that would be horrible. I recommend
that you erase MS Word from your disk before you do any more damage
with it.