From 076e70f57640c3718309a89f690683a030b4ffcb Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Jun 2022 12:59:31 -0400 Subject: lv2specgen: Fix clashing time namespace prefix --- lv2specgen/lv2specgen.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py index 72421a2..a994017 100755 --- a/lv2specgen/lv2specgen.py +++ b/lv2specgen/lv2specgen.py @@ -1393,6 +1393,12 @@ def specgen( linkmap = load_tags(tags, docdir) m = rdflib.ConjunctiveGraph() + + # RDFLib adds its own prefixes, so kludge around "time" prefix conflict + m.namespace_manager.bind('time', + rdflib.URIRef('http://lv2plug.in/ns/ext/time#'), + replace=True) + manifest_path = os.path.join(os.path.dirname(specloc), "manifest.ttl") if os.path.exists(manifest_path): m.parse(manifest_path, format="n3") @@ -1502,7 +1508,7 @@ def specgen( template = template.replace("@XMLNS@", "") else: template = template.replace( - "@XMLNS@", ' xmlns:%s="%s"' % (spec_pre, spec_ns_str) + "@XMLNS@", 'xmlns:%s="%s"' % (spec_pre, spec_ns_str) ) filename = os.path.basename(specloc) -- cgit v1.2.1