Commit 81100619 authored by Carlos Garnacho's avatar Carlos Garnacho

Autogenerate ontology documentation.

There is now a new gtk-doc reference for ontology, which is created
from data/ontologies/*. docs/tools contains the programs to generate
both docbook and graphs, these are dumped on docs/reference/ontology,
which is compiled afterwards.

Documentation generation happens on make, ontology graphs require
graphviz and are only generated on distcheck, A base image is
committed, so people don't need graphviz to have a peek.
parent fad8db3f
......@@ -2,7 +2,7 @@ Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008 Free Software Foundation, Inc.
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
......@@ -159,7 +159,7 @@ Particular systems
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae"
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
......@@ -174,6 +174,16 @@ and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
......@@ -189,7 +199,8 @@ type, such as `sun4', or a canonical name which has the form:
where SYSTEM can have one of these forms:
OS KERNEL-OS
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
......
......@@ -222,6 +222,10 @@ fi
AC_PATH_PROG(VALAC, valac, valac)
AC_SUBST(VALAC)
AC_PATH_PROG(GRAPHVIZ_FDP, fdp)
AC_SUBST(GRAPHVIZ_FDP)
AM_CONDITIONAL(HAVE_GRAPHVIZ_FDP, test -n "$GRAPHVIZ_FDP")
# Check we have the DBUS binding tool we need
AC_PATH_PROG(DBUSBINDINGTOOL, dbus-binding-tool)
if test -z $DBUSBINDINGTOOL; then
......@@ -1590,6 +1594,9 @@ AC_CONFIG_FILES([
docs/reference/libtracker-common/version.xml
docs/reference/libtracker-miner/Makefile
docs/reference/libtracker-miner/version.xml
docs/reference/ontology/Makefile
docs/reference/ontology/version.xml
docs/tools/Makefile
Makefile
po/Makefile.in
src/libinotify/Makefile
......
......@@ -131,7 +131,7 @@ nfo:isContentEncrypted a rdf:Property ;
nmm:isForHearingImpaired a rdf:Property ;
rdfs:label "Is for hearing-impaired" ;
rdfs:comment "Does text stream contain helper tags for hearing-impaired such as <steps in hallway>" ;
rdfs:comment "Does text stream contain helper tags for hearing-impaired such as &lt;steps in hallway&gt;" ;
nrl:maxCardinality 1 ;
rdfs:domain nmm:SynchronizedText ;
rdfs:range xsd:boolean .
......
include $(top_srcdir)/Makefile.decl
SUBDIRS = manpages design reference
SUBDIRS = manpages design tools reference
......@@ -3,5 +3,6 @@ include $(top_srcdir)/Makefile.decl
SUBDIRS = \
libtracker-client \
libtracker-common \
libtracker-miner
libtracker-miner \
ontology
include $(top_srcdir)/Makefile.decl
AUTOMAKE_OPTIONS = 1.6
# The name of the module.
DOC_MODULE = ontology
# The top-level SGML file.
DOC_MAIN_SGML_FILE = ontology-docs.sgml
# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR = .
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS = --sgml-mode --output-format=xml
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
nie-ontology.xml \
nco-ontology.xml \
nmo-ontology.xml \
nfo-ontology.xml \
nao-ontology.xml \
mto-ontology.xml \
nmm-ontology.xml \
mfo-ontology.xml \
mlo-ontology.xml \
tracker-ontology.xml \
maemo-ontology.xml \
ncal-ontology.xml \
scal-ontology.xml \
version.xml
expand_content_files =
# Images to copy into HTML directory
HTML_IMAGES = ontology.png
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS =
include $(top_srcdir)/gtk-doc.make
# Other files to distribute
EXTRA_DIST += version.xml.in ontology.png
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY nie-ontology SYSTEM "nie-ontology.xml">
<!ENTITY nco-ontology SYSTEM "nco-ontology.xml">
<!ENTITY nmo-ontology SYSTEM "nmo-ontology.xml">
<!ENTITY nfo-ontology SYSTEM "nfo-ontology.xml">
<!ENTITY nao-ontology SYSTEM "nao-ontology.xml">
<!ENTITY mto-ontology SYSTEM "mto-ontology.xml">
<!ENTITY nmm-ontology SYSTEM "nmm-ontology.xml">
<!ENTITY mfo-ontology SYSTEM "mfo-ontology.xml">
<!ENTITY mlo-ontology SYSTEM "mlo-ontology.xml">
<!ENTITY tracker-ontology SYSTEM "tracker-ontology.xml">
<!ENTITY maemo-ontology SYSTEM "maemo-ontology.xml">
<!ENTITY ncal-ontology SYSTEM "ncal-ontology.xml">
<!ENTITY scal-ontology SYSTEM "scal-ontology.xml">
]>
<book id="index">
<bookinfo>
<title>Tracker Ontology Reference Manual</title>
<releaseinfo>for Tracker &version;</releaseinfo>
</bookinfo>
<part id="ontology">
<title>Overview</title>
<partintro>
<para>
<ulink url="http://www.tracker-project.org">Tracker</ulink> is a central repository of user information, that provides two big benefits for the desktop: <emphasis>Share</emphasis> data between applications (it doesn't matter the source once it is stored in the repository) and <emphasis>Link</emphasis> information from different sources (mixing contacts with files, location, activities and whatnot).
</para>
<para>
This central repository can work only with a very well defined data model, that applications can rely to store and recover their information. That data model is defined using a semantic web artifact called <emphasis>ontology</emphasis>. An ontology defines the concepts (classes) and properties (attributes) that the items in the repository can be/have.
</para>
<para>
There is an EU-funded project called <ulink url="http://nepomuk.semanticdesktop.org/">Nepomuk</ulink>, where a core of ontologies to model the Desktop were defined. This set was a very good starting point for Tracker but new requirements and heavy development in collaboration with applications provided a very valuable feedback, in form of fixes and extensions. Some of this work is already submitted for approval in the upstream version, but the process is long and hard, so the Tracker ontologies are diverging slowly.
</para>
<para>
This documentation describes the Tracker flavour of Nepomuk ontologies. The big picture and basic concepts are the same as in the original Nepomuk, but "hell and heaven are in the details". All classes, properties and restrictions included in these pages should work in Tracker. Any error in this documentation can be reported in the Tracker <ulink url="http://mail.gnome.org/mailman/listinfo/tracker-list">Mailing list</ulink> or <ulink url="https://bugzilla.gnome.org/enter_bug.cgi?product=tracker">bugzilla</ulink>.
</para>
<para>
This is just documentation about the ontologies. For more information about Tracker technical details and implementation, please refer to the Tracker <ulink url="http://live.gnome.org/Tracker/Documentation/">Documentation wiki</ulink> page in GNOME.
</para>
</partintro>
&nie-ontology;
&nco-ontology;
&nmo-ontology;
&nfo-ontology;
&nao-ontology;
&mto-ontology;
&nmm-ontology;
&mfo-ontology;
&mlo-ontology;
&tracker-ontology;
&maemo-ontology;
&ncal-ontology;
&scal-ontology;
</part>
<part id="ontology-graphs">
<title>The big picture</title>
<partintro>
This is a graph that shows how different classes in the ontology are related:
</partintro>
<figure id="ontology-graph">
<title>Ontology classes and their relations</title>
<graphic fileref="ontology.png" format="PNG"></graphic>
</figure>
</part>
</book>
This diff is collapsed.
include $(top_srcdir)/Makefile.decl
noinst_PROGRAMS = ontology-graph
noinst_PROGRAMS = ontology-graph ttl2sgml
INCLUDES = \
-DG_LOG_DOMAIN=\"Tracker\" \
......@@ -22,8 +22,49 @@ ontology_graph_LDADD = \
$(GIO_LIBS) \
$(GLIB2_LIBS)
EXTRA_DIST = generate-ontology.sh
ttl2sgml_SOURCES = \
ttl2sgml.c \
ttl_loader.h \
ttl_loader.c \
ttl_model.h \
ttl_model.c \
qname.h \
qname.c \
ttl_sgml.h \
ttl_sgml.c
GENERATED_FILES = ontology.png ontology.dot
ttl2sgml_LDADD = \
$(top_builddir)/src/libtracker-data/libtracker-data.la \
$(top_builddir)/src/libtracker-common/libtracker-common.la \
$(DBUS_LIBS) \
$(GLIB2_LIBS) \
$(GIO_LIBS)
gen-doc.stamp: ttl2sgml
./gen-doc.sh
$(AM_V_GEN) touch $@
if HAVE_GRAPHVIZ_FDP
dist-check-graphviz:
else
dist-check-graphviz:
@echo "*** Graphviz's fdp tool must be installed in order to make dist"
@false
endif
ontology.dot: ontology-graph
$(AM_V_GEN) ./ontology-graph -d $(top_srcdir)/data/ontologies -o ontology.dot
ontology.png: ontology.dot
$(AM_V_GEN)$(GRAPHVIZ_FDP) -Tpng -o $(top_srcdir)/docs/reference/ontology/ontology.png ontology.dot
BUILT_SOURCES = gen-doc.stamp
EXTRA_DIST = \
gen-doc.sh \
$(BUILT_SOURCES)
DISTCLEANFILES = ontology.dot
CLEANFILES = $(BUILT_SOURCES)
CLEANFILES = $(GENERATED_FILES)
\ No newline at end of file
dist-hook: dist-check-graphviz ontology.dot ontology.png
\ No newline at end of file
#!/bin/bash
#
# This script generates the HTML documentation from TTL description
# This script generates the SGML documentation from TTL description
# for the tracker specific ontologies
#
BUILD_DIR="./build/ontologies"
if [ -e $BUILD_DIR ]; then
echo "Removing old " $BUILD_DIR "directory"
rm -rf $BUILD_DIR
fi
echo "Creating new directory"
mkdir -p $BUILD_DIR
echo "Compiling the tools"
make
BUILD_DIR="../reference/ontology/"
echo "Generating list of classes-properties and files (file-class.cache)"
if [ -e file-class.cache ]; then
......@@ -28,27 +17,17 @@ for f in `find ../../data/ontologies -name "*.ontology"` ; do
grep "^[a-z]\{1,\}\:[a-zA-Z]" $f |awk -v pr=$PREFIX '{print pr " " $1}' >> file-class.cache
done
echo "Converting all dia diagrams to png"
for image in `find ../../docs/ontologies -name "*.dia"` ; do
dia -t png $image -e $BUILD_DIR/$(basename ${image/.dia/.png})
done
#echo "Converting all dia diagrams to png"
#for image in `find ../../docs/ontologies -name "*.dia"` ; do
# dia -t png $image -e $BUILD_DIR/$(basename ${image/.dia/.png})
#done
for f in `find ../../data/ontologies -name "*.description"` ; do
# ../../data/ontologies/XX-aaa.description -> PREFIX=aaa
TMPNAME=${f%.description}
PREFIX=${TMPNAME#*-}
echo "Generating $PREFIX"
mkdir -p $BUILD_DIR/$PREFIX
# Copy before because we check in the code if the documentation exists
if [ -e ../../docs/ontologies/$PREFIX ]; then
cp -r ../../docs/ontologies/$PREFIX/* $BUILD_DIR/$PREFIX/ ;
fi
./ttl2html -d $f -o $BUILD_DIR/$PREFIX/index.html -l file-class.cache \
echo "Generating $PREFIX documentation"
./ttl2sgml -d $f -o $BUILD_DIR/$PREFIX-ontology.xml -l file-class.cache \
-e ../../docs/ontologies/$PREFIX/explanation.html
done
echo "Copying resources"
cp -R resources/ $BUILD_DIR
cp ../../docs/ontologies/index.html $BUILD_DIR
echo "Visit documentation here: $BUILD_DIR/index.html"
......@@ -4,7 +4,7 @@
#include <stdio.h>
#include "ttl_loader.h"
#include "ttl_model.h"
#include "ttl_html.h"
#include "ttl_sgml.h"
static gchar *desc_file = NULL;
static gchar *output_file = NULL;
......@@ -84,7 +84,7 @@ main (gint argc, gchar **argv)
g_free (ttl_file);
g_free (dirname);
ttl_html_print (description, ontology, f, class_location_file, explanation_file);
ttl_sgml_print (description, ontology, f, class_location_file, explanation_file);
ttl_loader_free_ontology (ontology);
ttl_loader_free_description (description);
......
#include "ttl_html.h"
#include <glib/gprintf.h>
#include <string.h>
#include "ttl_sgml.h"
#include "qname.h"
#define DEFAULT_COPYRIGHT "Copyright &copy; 2009 <a href=\"http://www.nokia.com/\">Nokia</a>"
......@@ -12,40 +14,112 @@ typedef struct {
} CallbackInfo;
static void
print_someone (FILE *f,
const gchar *role,
const gchar *who)
{
gchar **details;
details = g_strsplit (who, ",", 3);
g_fprintf (f, "<%s>\n", role);
g_fprintf (f, "<firstname>%s</firstname>\n", g_strstrip (details[0]));
if (details[1] || details[2]) {
g_fprintf (f, "<affiliation>\n");
if (details[1]) {
g_fprintf (f, "<orgname>%s</orgname>\n", g_strstrip (details[1]));
}
if (details[1] && details[2]) {
g_fprintf (f, "<address><email>%s</email></address>\n", g_strstrip (details[2]));
}
g_fprintf (f, "</affiliation>\n");
}
g_fprintf (f, "</%s>\n", role);
g_strfreev (details);
}
static void
print_author (gpointer item, gpointer user_data) {
FILE *f = (FILE *)user_data;
g_fprintf (f,"<dd>%s</dd>", (gchar *)item);
print_someone (f, "author", (gchar *) item);
}
static void
print_editor (gpointer item, gpointer user_data) {
FILE *f = (FILE *)user_data;
print_someone (f, "editor", (gchar *) item);
}
static void
print_collab (gpointer item, gpointer user_data) {
FILE *f = (FILE *)user_data;
print_someone (f, "collab", (gchar *) item);
}
static gchar *
shortname_to_id (const gchar *name)
{
gchar *id, *p;
id = g_strdup (name);
p = strchr (id, ':');
if (p) {
*p = '-';
}
return id;
}
static void
print_reference (gpointer item, gpointer user_data)
{
gchar *shortname;
gchar *link;
gchar *shortname, *id;
FILE *f = (FILE *)user_data;
shortname = qname_to_shortname ((gchar *)item);
link = qname_to_link ((gchar *)item);
shortname = qname_to_shortname ((gchar *) item);
id = shortname_to_id (shortname);
g_fprintf (f,"<a href=\"%s\">%s</a>, ", link , shortname);
g_fprintf (f,"<link linkend='%s'>%s</link>, ", id , shortname);
g_free (shortname);
g_free (link);
g_free (id);
}
static void
print_variablelist_entry (FILE *f,
const gchar *param,
const gchar *value)
{
g_fprintf (f, "<varlistentry>\n");
g_fprintf (f, "<term><parameter>%s</parameter>&#160;:</term>\n", param);
g_fprintf (f, "<listitem><simpara>%s</simpara></listitem>\n", (value) ? value : "--");
g_fprintf (f, "</varlistentry>\n");
}
static void
print_references_list (FILE *f, GList *list)
print_variablelist_entry_list (FILE *f,
const gchar *param,
GList *list)
{
g_fprintf (f,"<td>");
if (list == NULL) {
g_fprintf (f,"--");
} else {
g_list_foreach (list, print_reference, f);
}
g_fprintf (f,"</td>");
g_fprintf (f, "<varlistentry>\n");
g_fprintf (f, "<term><parameter>%s</parameter>&#160;:</term>\n", param);
g_fprintf (f, "<listitem><simpara>");
if (list) {
g_list_foreach (list, print_reference, f);
} else {
g_fprintf (f, "--");
}
g_fprintf (f, "</simpara></listitem>\n");
g_fprintf (f, "</varlistentry>\n");
}
static void
......@@ -54,7 +128,6 @@ print_list (FILE *f, GList *list)
GList *it;
gchar *shortname;
g_fprintf (f, "<td>");
for (it = list; it != NULL; it = it->next) {
shortname = qname_to_shortname ((gchar *)it->data);
......@@ -73,9 +146,32 @@ print_deprecated_message (FILE *f)
}
static void
print_html_header (FILE *f, OntologyDescription *desc)
print_sgml_header (FILE *f, OntologyDescription *desc)
{
g_fprintf (f,"<html>\n");
gchar *upper_name;
g_fprintf (f, "<?xml version='1.0' encoding='UTF-8'?>\n");
g_fprintf (f, "<chapter id='%s-ontology'>\n", desc->localPrefix);
upper_name = g_ascii_strup (desc->localPrefix, -1);
g_fprintf (f, "<title>%s Ontology</title>\n", upper_name);
g_free (upper_name);
/* FIXME: get rid of "<>" */
#if 0
/* Ontology authors */
g_fprintf (f, "<authorgroup>\n");
g_list_foreach (desc->authors, print_author, f);
g_list_foreach (desc->editors, print_editor, f);
g_list_foreach (desc->contributors, print_collab, f);
g_fprintf (f, "</authorgroup>\n");
#endif
/* FIXME: upstream version, gitlog, copyright */
#if 0
g_fprintf (f,"<html>\n");
g_fprintf (f,"<head>\n");
g_fprintf (f,"\t<link rel=\"stylesheet\" type=\"text/css\"");
g_fprintf (f," href=\"../resources/nie-maemo.css\" />\n");
......@@ -127,11 +223,11 @@ print_html_header (FILE *f, OntologyDescription *desc)
(desc->copyright ? desc->copyright : DEFAULT_COPYRIGHT));
g_fprintf (f,"<hr />\n");
#endif
}
static void
print_html_explanation (FILE *f, const gchar *explanation_file)
print_sgml_explanation (FILE *f, const gchar *explanation_file)
{
gchar *raw_content;
gint length;
......@@ -142,171 +238,126 @@ print_html_explanation (FILE *f, const gchar *explanation_file)
}
g_fprintf (f, "%s", raw_content);
}
g_fprintf (f,"<hr />\n");
}
static void
print_html_footer (FILE *f)
print_sgml_footer (FILE *f)
{
g_fprintf (f,"</body>\n");
g_fprintf (f,"</html>\n");
g_fprintf (f,"</chapter>\n");
}
static void
print_ontology_class (gpointer key, gpointer value, gpointer user_data)
{
OntologyClass *def = (OntologyClass *)value;
gchar *name, *anchor;
gchar *name, *id;
FILE *f = (FILE *)user_data;
g_return_if_fail (f != NULL);
name = qname_to_shortname (def->classname);
anchor = qname_to_link (def->classname);
/* Anchor without initial '#' */
g_fprintf (f,"<a name=\"%s\">\n", &anchor[1]);
g_free (anchor);
if (def->deprecated) {
g_fprintf (f,"<h3 class=\"deprecated\">%s</h3>\n", name);
g_fprintf (f,"<table class=\"deprecated\">\n");
print_deprecated_message (f);
} else {
g_fprintf (f,"<h3>%s</h3>\n", name);
g_fprintf (f,"<table class=\"doctable\">\n");
}
g_free (name);
id = shortname_to_id (name);
g_fprintf (f, "<refsect2 id='%s'>\n", id);
g_free (id);
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">Superclasses</td>");
print_references_list (f, def->superclasses);
g_fprintf (f,"</tr>\n");
g_fprintf (f, "<title>%s</title>\n", name);
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">Subclasses</td>");
print_references_list (f, def->subclasses);
g_fprintf (f,"</tr>\n");
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">In domain of</td>");
print_references_list (f, def->in_domain_of);
g_fprintf (f,"</tr>\n");
if (def->description) {
g_fprintf (f, "<para>%s</para>\n", def->description);
}
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">In range of</td>");
print_references_list (f, def->in_range_of);
g_fprintf (f,"</tr>\n");
g_fprintf (f, "<variablelist>\n");
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">Description</td>");
g_fprintf (f,"<td>%s</td>\n", (def->description ? def->description : "--"));
g_fprintf (f,"</tr>\n");
print_variablelist_entry_list (f, "Superclasses", def->superclasses);
print_variablelist_entry_list (f, "Subclasses", def->subclasses);
print_variablelist_entry_list (f, "In domain of", def->in_domain_of);
print_variablelist_entry_list (f, "In range of", def->in_range_of);
if (def->notify) {
g_fprintf (f,"<tr>");
g_fprintf (f,"<td colspan=\"2\">This class <a href=\"%s\">notifies changes</a></td>\n", SIGNALS_DOC);
g_fprintf (f,"</tr>\n");
}
if (def->instances) {
print_variablelist_entry_list (f, "Predefined instances", def->instances);
}
if (def->instances) {
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">Predefined instances</td>");
print_list (f, def->instances);
g_fprintf (f,"</tr>\n");
}
g_fprintf (f, "</variablelist>\n");
if (def->notify) {
g_fprintf (f, "<note>\n");
g_fprintf (f, "<title>Note:</title>\n");
g_fprintf (f, "<para>This class notifies about changes</para>\n");
g_fprintf (f, "</note>\n");
}
g_fprintf (f,"</table>\n\n");
g_fprintf (f, "</refsect2>\n\n");
g_free (name);
}
static void
print_ontology_property (gpointer key, gpointer value, gpointer user_data)
{
OntologyProperty *def = (OntologyProperty *)value;
gchar *name, *anchor;
FILE *f = (FILE *)user_data;
OntologyProperty *def = (OntologyProperty *) value;
gchar *name, *id;
FILE *f = (FILE *) user_data;
g_return_if_fail (f != NULL);
name = qname_to_shortname (def->propertyname);
anchor = qname_to_link (def->propertyname);
id = shortname_to_id (name);
/* Anchor without initial '#' */
g_fprintf (f,"<a name=\"%s\">", &anchor[1]);
g_free (anchor);
g_fprintf (f, "<refsect2 id='%s'>\n", id);
g_free (id);
if (def->deprecated) {
g_fprintf (f,"<h3 class=\"deprecated\">%s</h3>\n", name);
g_fprintf (f,"<table class=\"deprecated\">\n");
print_deprecated_message (f);
} else {
g_fprintf (f,"<h3>%s</h3>\n", name);
g_fprintf (f,"<table class=\"doctable\">\n");
}
g_free (name);
g_fprintf (f, "<title>%s</title>\n", name);
if (def->description) {
g_fprintf (f, "<para>%s</para>\n", def->description);
}
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">Type</td>");
print_references_list (f, def->type);
g_fprintf (f,"</tr>\n");
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">Domain</td>");
print_references_list (f, def->domain);
g_fprintf (f,"</tr>\n");
g_fprintf (f, "<variablelist>\n");
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">Range</td>");
print_references_list (f, def->range);
g_fprintf (f,"</tr>\n");
print_variablelist_entry_list (f, "Type", def->type);
print_variablelist_entry_list (f, "Domain", def->domain);
print_variablelist_entry_list (f, "Range", def->range);
print_variablelist_entry_list (f, "Superproperties", def->superproperties);
print_variablelist_entry_list (f, "Subproperties", def->subproperties);
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">Superproperties</td>");
print_references_list (f, def->superproperties);
g_fprintf (f,"</tr>\n");
g_fprintf (f,"<tr>");
g_fprintf (f,"<td class=\"rowheader\">Subproperties</td>");
print_references_list (f, def->subproperties);
g_fprintf (f,"</tr>\n");