Skip to content

Commit e16ec94

Browse files
authored
fix(context): resolve prefixes from @Prefix declarations instead of IRI heuristic (#58)
Replace iri_to_domain_hint() with namespace binding lookup from RDFLib's graph.namespaces() in context_generator.py. The @Prefix declarations in the OWL Turtle source are the authoritative prefix-to-namespace mappings - deriving prefix names by URL path segment extraction was unreliable. - Add _build_ns_prefix_lookup() and _lookup_prefix() helpers - Use declared namespace bindings for domain and import prefixes - Skip imports without @Prefix declaration (with warning, no guessing) - Fix development to gx in envited-x and tzip21 contexts - Update tests: add namespace lookup tests, add envited-x gx assertion Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>
1 parent 1b9226e commit e16ec94

5 files changed

Lines changed: 255 additions & 141 deletions

File tree

artifacts/envited-x/envited-x.context.jsonld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"skos": "http://www.w3.org/2004/02/skos/core#",
1717
"envited-x": "https://w3id.org/ascs-ev/envited-x/envited-x/v3/",
1818
"manifest": "https://w3id.org/ascs-ev/envited-x/manifest/v5/",
19-
"development": "https://w3id.org/gaia-x/development#",
19+
"gx": "https://w3id.org/gaia-x/development#",
2020
"hasCodeArtifact": {
2121
"@id": "envited-x:hasCodeArtifact",
2222
"@type": "@id"

0 commit comments

Comments
 (0)