[tracker/harmattan-pre-signal-updates: 1352/1380] doc: support description and print property page title in the ontologies



commit 698bd1f821fcbd3658bbda475978cfa735a111e5
Author: Ivan Frade <ivan frade nokia com>
Date:   Thu Sep 16 16:50:09 2010 +0300

    doc: support description and print property page title in the ontologies
    
    After updating the .description files, the index of the documentation will be readable

 docs/tools/ttl_loader.c |    3 +++
 docs/tools/ttl_model.h  |    1 +
 docs/tools/ttl_sgml.c   |    2 +-
 3 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/docs/tools/ttl_loader.c b/docs/tools/ttl_loader.c
index d802e30..fb90d77 100644
--- a/docs/tools/ttl_loader.c
+++ b/docs/tools/ttl_loader.c
@@ -48,6 +48,7 @@
 
 #define DSC_ONTOLOGY DSC_PREFIX "Ontology"
 #define DSC_TITLE DSC_PREFIX "title"
+#define DSC_DESCRIPTION DSC_PREFIX "description"
 #define DSC_AUTHOR DSC_PREFIX "author"
 #define DSC_EDITOR DSC_PREFIX "editor"
 #define DSC_CONTRIBUTOR DSC_PREFIX "contributor"
@@ -298,6 +299,8 @@ load_description (OntologyDescription *desc,
 		g_assert (!g_strcmp0 (turtle_object, DSC_ONTOLOGY));
 	} else if (!g_strcmp0 (turtle_predicate, DSC_TITLE)) {
 		desc->title = g_strdup (turtle_object);
+	} else if (!g_strcmp0 (turtle_predicate, DSC_DESCRIPTION)) {
+		desc->description = g_strdup (turtle_object);
 	} else if (!g_strcmp0 (turtle_predicate, DSC_UPSTREAM)) {
 		desc->upstream = g_strdup (turtle_object);
 	} else if (!g_strcmp0 (turtle_predicate, DSC_AUTHOR)) {
diff --git a/docs/tools/ttl_model.h b/docs/tools/ttl_model.h
index 561eac5..f777959 100644
--- a/docs/tools/ttl_model.h
+++ b/docs/tools/ttl_model.h
@@ -52,6 +52,7 @@ typedef struct {
 
 typedef struct {
 	gchar *title;
+        gchar *description;
 	GList *authors;
 	GList *editors;
 	GList *contributors;
diff --git a/docs/tools/ttl_sgml.c b/docs/tools/ttl_sgml.c
index 7100e75..14a6656 100644
--- a/docs/tools/ttl_sgml.c
+++ b/docs/tools/ttl_sgml.c
@@ -162,7 +162,7 @@ print_sgml_header (FILE *f, OntologyDescription *desc)
         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_fprintf (f, "<title>%s: %s</title>\n", desc->title, desc->description ? desc->description : "");
         g_free (upper_name);
 
         print_people_list (f, "Authors:", desc->authors);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]