[tracker] docs/tools/ttl2sgml: Don't error if we have nao:deprecated for namespaces



commit 72dc5e49d412e8db153366777c2f61016d4b67d3
Author: Martyn Russell <martyn lanedo com>
Date:   Fri Jan 17 12:32:29 2014 +0000

    docs/tools/ttl2sgml: Don't error if we have nao:deprecated for namespaces
    
    Previously, this would error when generating the documentation with something
    like:
    
    (lt-ttl2sgml:4857): Tracker-ERROR **:
    'http://www.tracker-project.org/temp/mlo#' is not a class nor a property!?
    
    and
    
    ../../../docs/tools/gen-doc.sh: line 52:  4857 Trace/breakpoint trap   (core
    dumped) $TTL2SGML -d $f -o $BUILD_DIR/$PREFIX-ontology.xml -f
    $BUILD_DIR/fts-properties.xml -e $ONTOLOGIES_INFO_DIR/$PREFIX/explanation.xml
    
    Given the entire namespace for MLO is deprecated, we have simply removed the
    g_error here.

 docs/tools/ttl_loader.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/docs/tools/ttl_loader.c b/docs/tools/ttl_loader.c
index fb90d77..55e07c2 100644
--- a/docs/tools/ttl_loader.c
+++ b/docs/tools/ttl_loader.c
@@ -260,7 +260,12 @@ load_in_memory (Ontology    *ontology,
                /*
                 * X nao:deprecated true
                 *
-                * This can apply to classes OR properties!
+                * This can apply to classes OR properties OR
+                * namespaces!
+                *
+                * NOTE: there is no way to check if we're dealing
+                * with a namespace or not, so we don't error here if
+                * we can't verify the property of class.
                 */
                OntologyProperty *prop;
                OntologyClass *klass;
@@ -273,8 +278,6 @@ load_in_memory (Ontology    *ontology,
                        klass = g_hash_table_lookup (ontology->classes, turtle_subject);
                        if (klass) {
                                klass->deprecated = string_to_boolean (turtle_object);
-                       } else {
-                               g_error ("'%s' is not a class nor a property!?", turtle_subject);
                        }
                }
 


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