Skip to content

URIs for SPARQL versions #242

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

URIs for SPARQL versions #242

wants to merge 1 commit into from

Conversation

afs
Copy link
Contributor

@afs afs commented Jun 24, 2025

See #241

sparql:version-1.1
rdfs:label "1.1" ;
rdfs:comment "SPARQL 1.1"
.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to duplicate what we have in service description. Not sure if it's a good thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean sd:Language? That predates the version work.

As I read it, they are the URI for the whole language, not the version, and for use in the sd:Language where they are a subClassOf sd:Feature.

IMO The definition of the version URIs, if we have them at all, should be defined in the NS document and then referenced in service description.

Copy link
Contributor

@Tpt Tpt Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking about sd:SPARQL12Query for example. If I am not wrong it refers to the version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to precisely indicate the relationship between these versions and sd:Languages indeed.

To me, the difference is that what is added here are URLs that are implicitly connected to standard version labels.
These version labels are then a part of an sd:Language such as sd:SPARQL12Query.

We could consider connecting version URLs to language URLs using rdfs:isDefinedBy (perhaps there's a better predicate for this).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking about sd:SPARQL12Query for example. If I am not wrong it refers to the version.

A person is not their telephone number nor their social security number.
A version is an aspect of the language, not identical to it.

SPARQL 1.2 Query support the functions sparql:isTriple - versions do not support functions.

We could consider connecting version URLs to language URLs using rdfs:isDefinedBy (perhaps there's a better predicate for this).

Yes - version is an aspect of the abstract concept of a SPARQL query language.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To touch on your example:

A person is not their telephone number nor their social security number.
A version is an aspect of the language, not identical to it.

I think it depends on how you look at it. I would argue SPARQL1.1 and SPARQL1.2 are two different query languages. It happens to be that the grammar of SPARQL1.2 is a superset of the grammar of SPARQL1.1 . To me there is no single SPARQL query language, there is a set of query languages that look much alike, and we call those SPARQL query languages.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The service description seems to agree 1:

An instance of sd:Language represents one of the SPARQL languages

Footnotes

  1. https://www.w3.org/TR/sparql12-service-description/#sd-Language

@jitsedesmet
Copy link

Is it also the intention to change the grammar so that the VERSION is defined by an IRI? In that case #240 can also be closed because the formatting will again be consistent with the rest of the grammar.

@afs
Copy link
Contributor Author

afs commented Jun 24, 2025

Is it also the intention to change the grammar so that the VERSION is defined by an IRI? In that case #240 can also be closed because the formatting will again be consistent with the rest of the grammar.

No.

@rubensworks
Copy link
Member

To resolve @jitsedesmet's concern, we could consider writing somewhere in the SPARQL query spec that there's an implicit mapping between the version strings (e.g. in the query) and their corresponding URLs as added here in this PR.

(this whole exercise can probably also be repeated at the RDF level)

@afs
Copy link
Contributor Author

afs commented Jun 24, 2025

(this whole exercise can probably also be repeated at the RDF level)

I am beginning to think the controlled vocabulary would be better in rdf:
The SPARQL Graph Store Protocol is using RDF versions as are CONSTRUCT queries for the Accept.

I had thought we might have separate versions we could have "SPARQL 1.3" without a round of new RDF.

It isn't necessary to have two sets of definition if we say "here is a defined controlled vocabulary" in rdf: and then connect version URIs to language URIs (e.g. rdfs:isDefinedBy) separately.

@rubensworks
Copy link
Member

I am beginning to think the controlled vocabulary would be better in rdf:

I agree that this would be better indeed.

Then we can have languages such as sd:SPARQL12Query just link to these versions in the controlled rdf: vocab.

@afs afs marked this pull request as draft June 25, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants