function makeHTML($endpoint_stats, $endpoint_desc)
{
    //create one html file per endpoint
    foreach ($endpoint_stats as $endpoint => $d) {
        if (count($d) > 2) {
            $desc = @$endpoint_desc[$endpoint];
            //create an output file
            $fo = fopen($endpoint . ".html", "w") or die("Could not create file!");
            if ($fo) {
                $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html>';
                $html .= addHeader($endpoint);
                //add Bio2RDF logo
                //add Endpoint description
                //add link back to the statistics page
                $html .= "<body>";
                //add the logo
                $html .= addBio2RDFLogo();
                $html .= "<h1> Summary data metrics for the Bio2RDF " . $endpoint . " endpoint</h1>";
                $html .= "<div id='container'> <div id='items'></div>";
                $html .= addDatasetDescription($desc);
                $html .= addBio2RDFDetails($d['endpoint_url'], $desc['namespace']);
                $html .= addBasicStatsTable($d['endpoint_url'], $d['triples'], $d['unique_subjects'], $d['unique_predicates'], $d['unique_objects']);
                $html .= addUniqueTypesTable($d['endpoint_url'], $d['unique_types']);
                $html .= addPredicateObjLinks($d['endpoint_url'], $d['predicate_object_links']);
                $html .= addPredicateLiteralLinks($d['endpoint_url'], $d['predicate_literals']);
                $html .= addSubjectCountPredicateObjectCount($d['endpoint_url'], $d['subject_count_predicate_object_count']);
                $html .= addSubjectPredicateUniqueLits($d['endpoint_url'], $d['subject_count_predicate_literal_count']);
                $html .= addSubjectTypePredType($d['endpoint_url'], $d['subject_type_predicate_object_type']);
                $html .= addNSNSCounts($d['endpoint_url'], $d['nsnscounts']);
                $html .= "</div></body></html>";
                fwrite($fo, $html);
            }
            fclose($fo);
        }
    }
}
function makeHTML($entry, $ofile)
{
    global $options;
    $fp = fopen($ofile, "w") or die("Could not create {$ofile}!");
    $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>';
    $html .= addHeader($entry['name']);
    $html .= "<body>";
    if ($options['bio2rdf.version']) {
        $html .= addBio2RDFLogo();
    }
    $html .= "<div id='description'>";
    $html .= addDatasetDescription($entry);
    if ($options['bio2rdf.version']) {
        $html .= addBio2RDFDetails($entry['sparql'], $entry['prefix']);
    }
    $html .= "</div>";
    $html .= "<div id='container'> <div id='items'></div>";
    $html .= addBasicStatistics($entry);
    echo "type counts" . PHP_EOL;
    $html .= addTypeCountTable($entry);
    //	echo "property counts".PHP_EOL;
    //	$html .= addPropertyCountTable($entry);
    echo "object property counts" . PHP_EOL;
    $html .= addObjectPropertyCountTable($entry);
    echo "datatype property counts" . PHP_EOL;
    $html .= addDatatypePropertyCountTable($entry);
    echo "subject type property counts" . PHP_EOL;
    $html .= addSubjectTypePropertyCountTable($entry);
    echo "property object type counts" . PHP_EOL;
    $html .= addPropertyObjectTypeCountTable($entry);
    //	echo "subject property object counts".PHP_EOL;
    //	$html .= addSubjectPropertyObjectCountTable($entry);
    echo "type property type counts" . PHP_EOL;
    $html .= addTypePropertyTypeCountTable($entry);
    echo "dataset property dataset counts" . PHP_EOL;
    $html .= addDatasetPropertyDatasetCountTable($entry);
    $html .= "</div>";
    $html .= "</body>";
    $html .= "</html>";
    fwrite($fp, $html);
    fclose($fp);
}