Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Docker Compose template for SPARQL endpoint and RDF browser. #97
Add Docker Compose template for SPARQL endpoint and RDF browser. #97
Changes from 1 commit
47e9bc6
063cc4e
11ef8a7
2315368
bee0b51
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TallTed , is there a way to load the namespaces from Turtle files instead? This seems like a rather hokey way to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any Turtle file may contain its own namespaces.
Those loaded via the (SQL)
DB.DBA.XML_SET_NS_DECL()
function are just the presets that are used when no declaration is found in a SPARQL query, as shown for the DBpedia instance.Does that make this seem less hokey?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately no. I understand that it is just setting default namespaces, but it would be much simpler for a user if a Turtle or SPARQL file could simply be provided to do so. After all, that's likely where they'll come from anyway.
But this certainly isn't a show stopper. I was just wondering if it could be simplified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if that would even be possible to implement because in a real-world situation you often load multiple files, which may have conflicting namespaces and then it is not defined, which one would take precedence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pointer?
In practice - do prefix declarations (they aren't namespaces - that's XML!) get redeclared?
http://prefix.cc/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm not sure what you mean with pointer, but I try to clarify what I mean and how I understand and use the terms, feel free to correct me with the right terms in case I use the wrong ones:
DB.DBA.XML_SET_NS_DECL
is used in setup.sql to define default prefix to namespace mappings, in case a SPARQL query does not declare the prefix.When we load N-Triples files in
setup.sql
then we have no other choice but to do it this way, because N-Triple files don't contain prefixes.However when we load Turtle or RDF/XML then the question is if it is possible to load them from there.
My argument against that, besides that as far as I know Virtuoso does not support this, is that it it does not make sense to implement it because of the following case:
Example
ld_dir_all ('/rdf/', '*.ttl', 'http://example.org');
rdf
directory containsa.ttl
andb.ttl
http://example.org/ontology/
http://example.org/resource/
Now the namespace mapping for the empty prefix in Virtuoso would be undefined (maybe unpredictable is a better word).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's a good reason for disallowing it. The same problem already exists if the user does this:
The tool could warn if a prefix is redefined differently, but should not warn if it is redefined to have the same value, because it's common to define the same prefixes (the same way) in different files.
Consider this a feature enhancement suggestion. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue that at least in this case there can be a defined behavior because the order of statements is deterministic, while in the "*.ttl" example it is either undefined or at least less clear. But I have to pass this feature enhancement suggestion to @TallTed, because I'm not a Virtuoso developer :-)
I don't think there is a succinct way to implement this in the
setup.sql
script itself.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it's only the empty prefix? (and
ex:
!)For all others, what I see out there is strong consistency across datasets.
A PREFIX in Turtle can redefine a prefix mid file. So when loading or concatenated, last prefix wins. Prefixes don't affect the data. Only the presentation.