def formatHTML_EntityTreeTable(treedict, element=0):
    """ outputs an html tree representation based on the dictionary we get from the Inspector
	object....

	EG:
	<table class=h>

		<tr>
		  <td class="tc" colspan=4><a href="../DataType">DataType</a>
		  </td>
		</tr>
		<tr>
		  <td class="tc" colspan=4><a href="../DataType">DataType</a>
		  </td>
		</tr>

		<tr>
		  <td class="space"></td>
		  <td class="bar"></td>
		  <td class="space"></td>

		  <td>
			<table class=h>
			   <tr><td class="tc" colspan=4><a href="../Boolean">Boolean</a>
					</td>
			   </tr>
			   <tr><td class="tc" colspan=4><a href="../Boolean">Boolean</a>
					</td>
			   </tr>
		   </table>
		  </td>


		 </tr>
	 </table>


	Note: The top level owl:Thing never appears as a link.

	"""
    # ontoFile = onto.ontologyMaskedLocation or onto.ontologyPhysicalLocation
    # if not treedict:
    # 	treedict = onto.ontologyClassTree()
    stringa = """<table class="h">"""
    for x in treedict[element]:
        if x.qname == "owl:Thing":
            stringa += """<tr>
							<td class="tc" colspan=4><a>%s</a></td>
						  </tr>""" % (truncchar_inverse(x.qname, 50))
        else:
            stringa += """<tr>
							<td class="tc" colspan=4><a title=\"%s\" class=\"treelinks\" href=\"%s.html\">%s</a></td>
						  </tr>""" % (x.uri, x.slug, truncchar_inverse(x.qname, 50))

        if treedict.get(x, None):
            stringa += """ <tr>
							<td class="space"></td>
							<td class="bar"></td>
							<td class="space"></td>
							<td>%s</td>
							</tr>""" % formatHTML_EntityTreeTable(treedict, x)

        # stringa += formatHTML_ClassTree(onto, treedict, x)
        # stringa += "</li>"
    stringa += "</table>"
    return stringa