From 58c3f34d861b6bc3b7a4761bdc7100fd0d530d84 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 25 Mar 2012 18:28:47 +0000 Subject: Move people information in to a common place. --- lv2specgen/lv2specgen.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lv2specgen/lv2specgen.py') diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py index f8784ae..54eb77b 100755 --- a/lv2specgen/lv2specgen.py +++ b/lv2specgen/lv2specgen.py @@ -1059,8 +1059,7 @@ def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec for uri in specProperties(m, spec_url, rdfs.seeAlso): if uri[:7] == 'file://': path = uri[7:] - if (path.startswith(abs_bundle_path) - and path != os.path.abspath(specloc) + if (path != os.path.abspath(specloc) and path.endswith('.ttl')): m.parse(path, format='n3') @@ -1085,7 +1084,7 @@ def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec prefixes_html += "" if spec_pre is None: - print('No namespace prefix for specification defined') + print('No namespace prefix for %s defined' % specloc) sys.exit(1) ns_list[spec_ns_str] = spec_pre @@ -1156,7 +1155,7 @@ def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec if uri[:len(abs_bundle_path)] == abs_bundle_path: uri = uri[len(abs_bundle_path) + 1:] else: - print("warning: seeAlso file outside bundle: %s" % uri) + continue # Skip seeAlso file outside bundle other_files += '%s ' % (uri, uri) if uri.endswith('.h'): @@ -1207,6 +1206,8 @@ def getNamespaces(m): def getOntologyNS(m): ns = None s = findOne(m, None, rdf.type, lv2.Specification) + if not s: + s = findOne(m, None, rdf.type, owl.Ontology) if s: if not isBlank(getSubject(s)): ns = str(getSubject(s)) -- cgit v1.2.1