w3c / activitystreams

Activity Streams 2.0
https://www.w3.org/TR/activitystreams-core/
Other
285 stars 60 forks source link

change name of activitystreams2.owl to activitystreams2.ttl #606

Open phtyson opened 4 months ago

phtyson commented 4 months ago

Please Indicate One:

I can't find any definition of the .owl file extension in the owl specs. At least one RDF datastore (jena fuseki) doesn't recognize the extension as a valid RDF type. Would be convenient to download file and upload to datastore (or other processing) where needed without renaming (in cases where not able to send proper media type).

evanp commented 4 months ago

I think this makes sense, since .ttl is a common extension for Turtle.

I'd suggest that we make it possible to use both the .owl and the .ttl extension, and possibly deprecate the .owl extension.

I think the steps are:

We'll need to coordinate this with W3C web services.

evanp commented 4 months ago

@plehegar if you have thoughts here, please let us know!

TallTed commented 4 months ago

The content of the .owl document should be converted to RDF/XML, as it is currently reported to be --

curl -LkI 
https://www.w3.org/TR/2015/WD-activitystreams-vocabulary-20151215/activitystreams2.owl

HTTP/2 200 
date: Fri, 19 Jul 2024 16:34:31 GMT
content-type: application/rdf+xml; qs=0.9 
phtyson commented 4 months ago

Thank you for attending to this. Ideally, remove the extension from the link and provide it in any requested RDF format. Default to RDF/XML or TTL. But that may require changes on the w3 server that are out of your control. The owl link could be preserved to avoid breakage, but as Ted recommended, the content-type should be corrected one way or another.

plehegar commented 3 days ago

sorry for only catching up on this now. Once you reach a conclusion, I'm happy to make it happen. Since it's affecting w3.org/ns , it should be easy to do.

csarven commented 3 days ago

I don't think the source format should be changed to RDF/XML. Please no! The source that's served from w3.org is at https://github.com/w3c/activitystreams/blob/main/vocabulary/activitystreams2.owl and it is in Turtle. It is the server that should respond with the correct and intended media type: text/turtle. If additional serializations can be provided (in RDF/XML or whatever), that's fine. Not sure if anyone really cares about having it in RDF/XML when it is already available in Turtle.

Note also that http://www.w3.org/ns/activitystreams-owl exists, and:

$ curl -iL http://www.w3.org/ns/activitystreams-owl

content-type: text/turtle
content-location: activitystreams-owl.ttl

Payload is in Turtle. So, I don't think the copy at https://www.w3.org/TR/2015/WD-activitystreams-vocabulary-20151215/activitystreams2.owl is particularly interesting. If the server corrected to respond with Content-Type: text/turtle, great.

Lastly, while the change from .owl to .ttl is generally fine, the extension is not particularly meaningful. The URI is opaque at the end of the day. And, so there is no major need to change anything. The consumer saving the file to disk can use the correct extension.


All this aside, I hope folks don't mind me re-raising the fundamental issue regarding the AS2 vocab ns and AS JSON-LD context, which boils down to resolving https://github.com/w3c/activitystreams/pull/504 .

What we need is consensus on whether there is a URI collision as I've noted, and an acceptable change (or no change) to help us move forward. @plehegar et al., could you please review this? There are a couple of possibilities, but again, what's acceptable comes down to the community's agreement on what's happening right now and most preferable way forward. My latest suggestion is at https://github.com/w3c/activitystreams/pull/504#issuecomment-2336648718 .

I'm happy to join a (Social Web CG) call to discuss this in more detail if necessary and hope that W3C Team folks, @plehegar @pchampin and/or perhaps others, can also join to come to an agreement.

TallTed commented 3 days ago

Bluntly — what's happening now is broken several different ways.

Changing this mess to something that conforms with all the relevant specs will break some things that have implemented workarounds for the non-conformance. That's regrettable, but I think it far better than persisting the current non-conformance.

The source that's served from w3.org is at https://github.com/w3c/activitystreams/blob/main/vocabulary/activitystreams2.owl and it is in Turtle.

But what you get from there is --

$ curl -LkI https://github.com/w3c/activitystreams/blob/main/vocabulary/activitystreams2.owl 
HTTP/2 200 
server: GitHub.com
date: Tue, 19 Nov 2024 18:19:42 GMT
content-type: text/html; charset=utf-8
...

i.e., text/html, not text/turtle.

And indeed, it starts with

<!DOCTYPE html>
<html

And what you get from

curl -LkI https://www.w3.org/TR/2015/WD-activitystreams-vocabulary-20151215/activitystreams2.owl
HTTP/2 200 
date: Tue, 19 Nov 2024 18:21:35 GMT
content-type: application/rdf+xml; qs=0.9

starts with

@prefix : <http://www.w3.org/ns/activitystreams#> .
@prefix as: <http://www.w3.org/ns/activitystreams#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

So, the server says it's RDF/XML, but it's really Turtle.

Increasingly common practice is for consumers to ignore media type, and focus on filename extension. If I try to parse the Turtle content of activitystreams2.owl as OWL, it will fail. .owl indicates the RDF/XML serialization, as specified in OWL Web Ontology Language Reference --

2.3 MIME type The Web Ontology Working Group has not requested a separate MIME type for OWL documents. Instead, we recommend to use the MIME type requested by the RDF Core Working Group, namely application/rdf+xml [RDF Concepts], or alternatively the XML MIME type application/xml.

As file extension, we recommend to use either .rdf or .owl.

It is worth noting that the above recommendation came from OWL 1. I was not able to locate any discussion of either media type or filename extension for OWL 2.

I strongly advise that the first thing to do is design what would be served if this were starting from zero -- filenames and media types -- and then propose a way to get from what we have (above) to this "built from scratch" optimization.

csarven commented 3 days ago

But what you get from there is --

Ok but my point was that the source copy that is being developed/ maintained is at that GitHub URL, and that Turtle is what was intended.

So, the server says it's RDF/XML, but it's really Turtle.

Right, the server needs to use the "correct and intended media type" because the copy of the source that's hosted on w3.org is "really Turtle". AFAIK, there was no RDF/XML of anything anywhere.

To be clear, I have no objection to renaming to .ttl. It is a small win (?) that's only really relevant for downloading it off https://www.w3.org/TR/2015/WD-activitystreams-vocabulary-20151215/activitystreams2.owl . What I find more pressing are the URIs and the namespaces that are used for the vocab and the JSON-LD context - those are the things that are being referred to for canonical machine use.