[tracker/wip/carlosg/sparql1.1: 200/201] docs: Make ttl2sgml handle rdf:List elements
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/sparql1.1: 200/201] docs: Make ttl2sgml handle rdf:List elements
- Date: Mon, 9 Sep 2019 22:35:37 +0000 (UTC)
commit eb3c8b0fa7c09313c6a244ac76a9a37a6f0e96cf
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Sep 7 15:46:09 2019 +0200
docs: Make ttl2sgml handle rdf:List elements
It strictly looks for types derived from rdfs:Class, so rdf:List
confused the parser when handling the special rdf:nil element.
Fixes ontology documentation generation after the addition of
rdf:List.
docs/tools/ttl_loader.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/docs/tools/ttl_loader.c b/docs/tools/ttl_loader.c
index 4f882d077..c9e8b6980 100644
--- a/docs/tools/ttl_loader.c
+++ b/docs/tools/ttl_loader.c
@@ -26,6 +26,7 @@
/* Ontology classes */
#define RDFS_CLASS "http://www.w3.org/2000/01/rdf-schema#Class"
#define RDF_PROPERTY "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"
+#define RDF_LIST "http://www.w3.org/1999/02/22-rdf-syntax-ns#List"
#define RDFS_SUBCLASSOF "http://www.w3.org/2000/01/rdf-schema#subClassOf"
#define RDFS_TYPE "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
#define RDFS_RANGE "http://www.w3.org/2000/01/rdf-schema#range"
@@ -83,7 +84,8 @@ load_in_memory (Ontology *ontology,
if (!g_strcmp0 (turtle_predicate, RDFS_TYPE)) {
/* It is a definition of class or property */
- if (!g_strcmp0 (turtle_object, RDFS_CLASS)) {
+ if (!g_strcmp0 (turtle_object, RDFS_CLASS) ||
+ !g_strcmp0 (turtle_object, RDF_LIST)) {
g_hash_table_insert (ontology->classes,
g_strdup (turtle_subject),
ttl_model_class_new (turtle_subject));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]