Query with base namespace in JSON-LD Context #1131
-
Currently in order to execute any type of queries we require to define all context IRIs we need to resolve manually - is there a way to define the IRIs and prefixes for our sources as part of context and for any IRIs with those base namespaces to auto resolve for our queries? For example for this ttl file: @Prefix v: http://www.w3.org/2006/vcard/ . http://www.w3.org/People/Berners-Lee/card#i v:title "Director"@en . while defining the json-ld context, could we do something like { and then query |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Prefixes in queries and prefixes in datasets are distinct, so they can not be used interchangeably. |
Beta Was this translation helpful? Give feedback.
Prefixes in queries and prefixes in datasets are distinct, so they can not be used interchangeably.
While what you suggest could be implemented, I would recommend against this, as this will cause issues with federated queries, since different RDF files may define clashing prefixes, which would cause issues during querying.
Furthermore, this would hard-couple your queries to prefix definitions in files, which means that if the file changes its prefixes (or its RDF serialization), without making any actual semantic changes, the query would fail.