diff options
author | David Robillard <d@drobilla.net> | 2022-07-16 22:29:40 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-17 18:14:02 -0400 |
commit | 666fc60b6e332cee4389cae0f06b50cb764edd1c (patch) | |
tree | 04c49208ed48e6ee71124f65f193a40da85ae13a /lv2specgen/lv2specgen.py | |
parent | e1c80a39b280509007693225abb2eb9d47ac01e1 (diff) | |
download | lv2-666fc60b6e332cee4389cae0f06b50cb764edd1c.tar.xz |
Use the same set of external vocabulary prefixes everywhere
The RDFa in specification pages doesn't actually use prefixed names for the
documented resources. So, simplify things by trimming the namespaces down to a
consistent set that is actually used in the LV2 universe.
Diffstat (limited to 'lv2specgen/lv2specgen.py')
-rwxr-xr-x | lv2specgen/lv2specgen.py | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py index a07bdf3..a37ad32 100755 --- a/lv2specgen/lv2specgen.py +++ b/lv2specgen/lv2specgen.py @@ -86,20 +86,14 @@ spec_pre = None spec_bundle = None specgendir = None ns_list = { + "http://ontologi.es/doap-changeset#": "dcs", + "http://purl.org/dc/terms/": "dcterms", + "http://usefulinc.com/ns/doap#": "doap", + "http://xmlns.com/foaf/0.1/": "foaf", + "http://www.w3.org/2002/07/owl#": "owl", "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf", "http://www.w3.org/2000/01/rdf-schema#": "rdfs", - "http://www.w3.org/2002/07/owl#": "owl", "http://www.w3.org/2001/XMLSchema#": "xsd", - "http://rdfs.org/sioc/ns#": "sioc", - "http://xmlns.com/foaf/0.1/": "foaf", - "http://purl.org/dc/elements/1.1/": "dc", - "http://purl.org/dc/terms/": "dcterms", - "http://purl.org/rss/1.0/modules/content/": "content", - "http://www.w3.org/2003/01/geo/wgs84_pos#": "geo", - "http://www.w3.org/2004/02/skos/core#": "skos", - "http://lv2plug.in/ns/lv2core#": "lv2", - "http://usefulinc.com/ns/doap#": "doap", - "http://ontologi.es/doap-changeset#": "dcs", } rdf = rdflib.Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#") @@ -1377,12 +1371,6 @@ def specgen( ) template = template.replace("@URI@", spec) template = template.replace("@PREFIX@", spec_pre) - if spec_pre == "lv2": - template = template.replace("@XMLNS@", "") - else: - template = template.replace( - "@XMLNS@", 'xmlns:%s="%s"' % (spec_pre, spec_ns_str) - ) filename = os.path.basename(specloc) basename = os.path.splitext(filename)[0] |