w3c / json-ld-syntax

JSON-LD 1.1 Specification
https://w3c.github.io/json-ld-syntax/
Other
112 stars 22 forks source link

Flagging an action for CR (RDF vocabulary file update) #263

Closed iherman closed 4 years ago

iherman commented 5 years ago

Just flagging the action: when we go to CR, the http://www.w3.org/1999/02/22-rdf-syntax-ns document should be updated to include rdf:JSON (plus the new terms defined by the addition of @direction).

cc @swickr

gkellogg commented 4 years ago

Also i18n namespace. and rdf:CompoundLiteral, rdf:language, and rdf:direction.

iherman commented 4 years ago

This issue was discussed in a meeting.

Ivan Herman: for i18n, can you give me a pointer for what should go into the document?
Ivan Herman: See comment added to the transition request
Gregg Kellogg: It doesn’t define anything, only a namespace … so some text in a comment
… it’s a URI prefix to which we append fragments for indicating language and direction
Gregg Kellogg: i18n:ar-EG_rtl
Gregg Kellogg: for instance ^^^
Gregg Kellogg: @prefix i18n: <https://www.w3.org/ns/i18n#> .
Ivan Herman: one of the alternatives that we use
… a pointer in one of our docs where we describe that?
Gregg Kellogg: https://www.w3.org/TR/json-ld11/#the-i18n-namespace
Gregg Kellogg: The content of the document is probably HTML and contains something extracted from this section
Pierre-Antoine Champin: For the fragments, we make it hard to comply with linked data principles to make them dereferencable
… don’t want to list them all in a document … so if we used / we could do some smart service that served relevant data for the IRIs
… if someone felt like that would be a good idea
Gregg Kellogg: I see where you’re going
… something that responded to the location and could give you info about combinations of language tags and directions
Pierre-Antoine Champin: Yes, with / instead of #, then we leave the door open
… wouldn’t fight for it
Benjamin Young: Sounds like the IANA pages for media types
Benjamin Young: https://www.iana.org/assignments/media-types/application/x-www-form-urlencoded
Gregg Kellogg: Would be a delay
… impacts tests and etc
… not that it’s not a good idea, and now /would/ be the time to do it … or rather a couple of months ago
Pierre-Antoine Champin: Well, it happens!
Gregg Kellogg: It might be useful. Another media type for the document that could better describe the fragment identifier space
… but no practical purpose
Rob Sanderson: wanted to agree with everybody
… it would’ve been good to do this earlier
… but let’s do remember that this is all for a workaround until RDF sorts out it’s i18n issues
… this should not be a long term thing
… by the time any of these services to do this dereferences got built, hopefully the real problem would be fixed
… so I don’t think we should delay

gkellogg commented 4 years ago

Note my proposed namespace updates.

rdf:JSON a rdfs:Datatype ;
    rdfs:label "JSON" ;
    rdfs:comment "The datatype of RDF literals storing JSON content" ;
    rdfs:subClassOf rdfs:Literal ;
    rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
    rdfs:seeAlso <https://www.w3.org/TR/json-ld11/#the-rdf-json-datatype> .

rdf:CompoundLiteral a rdfs:Class ;
    rdfs:label "CompoundLiteral" ;
    rdfs:comment "A class representing a compound literal." ;
    rdfs:subClassOf rdfs:Resource ;
    rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
    rdfs:seeAlso <https://www.w3.org/TR/json-ld11/#the-rdf-compoundliteral-class-and-the-rdf-language-and-rdf-direction-properties> .

rdf:language a rdf:Property ;
    rdfs:label "language" ;
    rdfs:comment "The language component of a CompoundLiteral." ;
    rdfs:domain rdf:CompoundLiteral ;
    rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
    rdfs:seeAlso <https://www.w3.org/TR/json-ld11/#the-rdf-compoundliteral-class-and-the-rdf-language-and-rdf-direction-properties> .

rdf:direction a rdf:Property ;
    rdfs:label "direction" ;
    rdfs:comment "The direction component of a CompoundLiteral." ;
    rdfs:domain rdf:CompoundLiteral ;
    rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
    rdfs:seeAlso <https://www.w3.org/TR/json-ld11/#the-rdf-compoundliteral-class-and-the-rdf-language-and-rdf-direction-properties> .

and for i18n:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .

<https://www.w3.org/ns/i18n#> a owl:Ontology ;
    dc:title "The I18N Namespace" ;
    dc:description """
            The i18n namespace is used for describing combinations of language tag and base direction in RDF literals.
            It is used as an alternative mechanism for describing the BCP47 language tag and base direction of RDF literals
            that would otherwise use the xsd:string or rdf:langString datatypes.
        """;
    rdfs:seeAlso <https://www.w3.org/TR/json-ld11/#the-i18n-namespace> .
davidlehn commented 4 years ago

Two quick minor issues:

TallTed commented 4 years ago

There are multiple instances (I see three) of the "smart" doublequote which should all be changed to the "dumb" ".

gkellogg commented 4 years ago

There are multiple instances (I see three) of the "smart" doublequote which should all be changed to the "dumb" ".

Stupid "smart" quotes in my Mac email, from which I created the initial message; I'll fix inline.

iherman commented 4 years ago

I believe rdf:CompoundLiteral a rdfs:Resource ; should be, instead, rdf:CompoundLiteral a rdfs:Class ;

iherman commented 4 years ago

I have made the changes on my machine. See the diff and the (proposed) html document. What I propose to do is:

  1. update the rdf vocabulary in json-ld/rdf-xml/ttl formats along the diff above once the CR is published
  2. send a mail to the semantic-web mailing list
    1. informing them about the changes on the vocab file
    2. pointing them to html document and asking form comments
  3. if 2.ii. above is o.k. with the community, put that document to 22-rdf-syntax-ns.html and update the .htaccess file

The only concern I have is that applications may access the vocabulary file without checking the return media-type, expecting to receive an RDF syntax and receiving an HTML file instead. Although the HTML file includes the JSON-LD format of the vocabulary (embedded via a <script> element) such applications may still fail. Of course, that behaviour (ie, not checking the returned media type) is a bug, but they could get by in the past 20+ years and we could break them. If we do get remarks about that from the semantic-web crowd, we may have to abort point (3) above.

Cc: @swickr @gkellogg @draggett

swickr commented 4 years ago

I'm inclined to be conservative w.r.t. adding the .html there but let's see how the community feels.

iherman commented 4 years ago

However, the HTML version issue is not a problem of the JSON-LD Working Group, so I will close this issue as completed.