aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-06-15 12:59:31 -0400
committerDavid Robillard <d@drobilla.net>2022-06-16 09:34:51 -0400
commit076e70f57640c3718309a89f690683a030b4ffcb (patch)
tree644e5fda333e90ea135a06349ceacba955cb75ba /lv2specgen
parent27eb30b2fceccc1bde9bd6b76638603dda460ba8 (diff)
downloadlv2-076e70f57640c3718309a89f690683a030b4ffcb.tar.xz
lv2specgen: Fix clashing time namespace prefix
Diffstat (limited to 'lv2specgen')
-rwxr-xr-xlv2specgen/lv2specgen.py8
1 files changed, 7 insertions, 1 deletions
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)