w3c / sparql-query

https://w3c.github.io/sparql-query/
Other
9 stars 0 forks source link

Support directional language-tagged strings (rdf:dirLangString) #112

Open afs opened 1 year ago

afs commented 1 year ago

See RDF concepts.

See https://github.com/w3c/rdf-star-wg/wiki/Text-Direction-Proposal

afs commented 2 months ago

PR #153 includes the grammar changes for rdf:dirLangString.

domel commented 2 months ago

I want to bring to your attention a minor yet notable inconsistency in the naming conventions used since RDF 1.1. This version introduced rdf:langString, replacing the previous rdf:LangString, which breaks the convention of naming classes and datatypes with capital letters. Furthermore, the recently introduced rdf:dirLangString also starts with a lowercase letter, reinforcing this inconsistency.

While the naming of rdf:dirLangString at least aligns with the style of rdf:langString, the overall approach seems to deviate from the previously established conventions. This lack of uniformity in capitalization could lead to confusion among users and developers working with RDF, who typically expect such naming conventions to be more consistent.

TallTed commented 2 months ago

I think @domel's point qualifies as a bug.

rdf:LangString should not have been replaced by rdf:langString.

This change should be reverted (restoring rdf:LangString), and rdf:dirLangString should be replaced by rdf:DirLangString.

gkellogg commented 2 months ago

RDF Vocab defines rdf:langString.

domel commented 2 months ago

@TallTed rdf:langString was proposed in RDF 1.1 and defined in vocab. So the situation is hopeless if we want to maintain backward compatibility.

afs commented 2 months ago

This version introduced rdf:langString, replacing the previous rdf:LangString I'm not sure what "This version" is referring to.

RDF 1.2 is not replacing anything from RDF 1.1.

previously established conventions

In RDF 1.1, there is rdf:HTML and rdf:XMLLiteral but the uppercase there is from the underlying name.

It's xsd:integer and xsd:dateTime. XSD dataypes are called out in RDF 1.1. So what convention there might be is quite weak.

gkellogg commented 2 months ago

There are no syntaxes where you can use datatype rdf:langString or rdf:dirLangString, it's just for internal use. Normalizing to use these two variants instead of rdf:LangString or rdf:DirLangString should be a transparent change, and is necessary to fix an inconsistency. The fact that in RDF/SPARQL 1.1 no one noticed that it was capitalized is evidence that it doesn't matter to implementaitons.

kasei commented 2 months ago

Where was rdf:LangString previously defined?

There are no syntaxes where you can use datatype rdf:langString or rdf:dirLangString, it's just for internal use.

That may be true for RDF syntaxes, but it's not true in general. rdf:langString is returned by the DATATYPE function. Changing it would break queries.

gkellogg commented 2 months ago

Can someone help me find there the previous spec uses rdf:LangString? SPARQL Query Language for RDF doesn't mention it, and SPARQL 1.1 Query methods rdf:langString. I don't see any reference to rdf:LangString.

There's also this information box in 17.4.2.7:

The SPARQL Working Group is using rdf:langString based on the latest Working Drafts of the RDF Working Group. This usage should be considered experimental (and non-normative) until/unless rdf:langString becomes part of an updated RDF Recommendation.