Closed gkellogg closed 5 years ago
As the one who raised this: I am in favour of closing this.
Closing, wontfix, as new features should be compatible with the RDF data model. WG Resolution: https://www.w3.org/2018/json-ld-wg/Meetings/Minutes/2018/2018-08-03-json-ld#section2-2
To be discussed at TPAC 2019, given lack of interest in a separate WG to fix text direction in RDF generally
This issue was discussed in a meeting.
RESOLVED: (1/) We add <code>@direction</code> as a keyword to the JSON-LD Syntax to assert the base text direction of a literal string*
RESOLVED: (2/) <code>@direction</code> is legal as part of a value object in the json-ld internal model but may not be used if <code>@type</code> is present*
RESOLVED: (3/) <code>@direction</code> is legal in an expanded term definition if you could have used <code>@language</code> in that definition and applies to all values of that term in the same way as <code>@language*</code>
RESOLVED: (4/) The value space of <code>@direction</code> is one of “ltr” and “rtl” (“auto” would have been the same as not asserting the keyword)*
RESOLVED: (5/) We expand the possible values of language maps to be either a string (as per today) or a value object with direction and without language or type*
RESOLVED: (6/) <code>@direction</code> can be present in a context node, and sets in the active context that the default direction for all string literals*
RESOLVED: (7/) WG agrees that <code>@container:</code> <code>@direction</code> is not a useful feature for JSON-LD 1.1 (unlike <code>@container:</code> <code>@language)*</code>
@context":
{@vocab":
"https://example.com/",@value":
"fish",@language":
"en",@direction":
"ltr"@context”:
[“http://schema.org/”, { “@direction”:
null }], “tag:p”: { “@value”:
“foo”, “@language”:
“en”, “@direction”:
“ltr” } }@direction
and how it affects JSON-LD 1.0 processors.@vocab
and @direction…
processors are choking.@direction
and @vocab.
@direction
in various places.@version":
null} :-D@version
to 1.0 processor, it explodes.@container:
subway – 1.0 will throw a syntax error, it should throw errors when it sees an issue. My feeling is that we should remove the explicit version announcement, and do feature detection when things are discovered and throw errors when they don’t understand.@direction,
what do we do – version 1.1.1 or version 1.2?@version
proposal was a list of features@context
processing@direction,
a 1.1 processor would fail if it saw it because it was not in the whitelist. 1.2 is not necessary to say @version
1.2 to do the right thing… virtually, 90% of feature issues are discovered in context processing, the exception is when processing expanded documents where there are some features used.@context
processing phase.@direction
wouldn’t be detected in @context.
@context.
@version.
@direction
and add a new property@direction
to JSON-LD for @value
objects regardless of how it transforms to RDF.@direction,
it maps against a literal and language tag… it’s some bnode with properties, it’s very different.@direction
@direction
and without a mapping into RDF, than to not put in @direction
@language
into my web site data, what happens@language
usage would be up to the various products/consumers of that data@language–let
alone @direction,
etc.@direction
in and hope for the best@list
capability@context
to understand those@direction
@language
and soon, we think, @direction
@language
for the whole document or a certain object@direction
feature actually?@language
@direction
@language,
but for the @direction
data@language
and @value
directly as an object for the value of the property–i.e. a value object@language
@language
@direction
at the top and have it cascade to the entire document@direction
at the top@language
is because you don’t want to repeat it@direction
@language
across the whole document@language:
null on just that value@language,
but not @direction
@direction,
then it could be limited to only things that bear a @language
@language
@direction
maps?@language
maps are very useful@direction
@direction
as a keyword to the JSON-LD Syntax to assert the base text direction of a literal string** (Rob Sanderson)@direction
as a keyword to the JSON-LD Syntax to assert the base text direction of a literal string*@direction
is legal as part of a value object in the json-ld internal model but may not be used if @type
is present** (Rob Sanderson)@direction
is legal as part of a value object in the json-ld internal model but may not be used if @type
is present*@direction
with @type?
@language
with @type
@type
has a language?@direction
is legal in an expanded term definition if you could have used @language
in that definition and applies to all values of that term in the same way as @language**
(Rob Sanderson)@id":
"rdfs:label", "@direction":
"rtl"}}@direction
is legal in an expanded term definition if you could have used @language
in that definition and applies to all values of that term in the same way as @language*
@direction
is one of “ltr” and “rtl” (“auto” would have been the same as not asserting the keyword)** (Rob Sanderson)@direction
is one of “ltr” and “rtl” (“auto” would have been the same as not asserting the keyword)*@value”:
“Rob”, “@direction”:
“ltr”}}@direction
can be present in a context node, and sets in the active context that the default direction for all string literals** (Rob Sanderson)@direction
can be present in a context node, and sets in the active context that the default direction for all string literals*@container:
@direction
is not a useful feature for JSON-LD 1.1 (unlike @container:
@language)
(Rob Sanderson)@container:
@direction
is not a useful feature for JSON-LD 1.1 (unlike @container:
@language)*
This issue was discussed in a meeting.
RESOLVED: do not, by default, handle <code>@direction</code> expression in toRDF (or fromRDF)
@direction
expression in toRDF (or fromRDF) (Benjamin Young)@direction
expression in toRDF (or fromRDF)This issue was discussed in a meeting.
RESOLVED: Add a parameter option to the API function toRDF, with three possible values: null or absent (do not process, the default), datatype (reflect to a datatype per 2.1.2.1.2) and bnode (reflect to a bnode structure per 2.1.4)
RESOLVED: Add a value to the options parameter to the API function fromRDF, with the above three options plus “any” which will convert via any conversion function available as discovered in the data
This issue was discussed in a meeting.
RESOLVED: the WG is happy to merge #276, but leaves it to the editors whether they do it now or after the API changes is also in a PR
ACTION: create issue on values of language maps not including <code>@direction</code> (Gregg Kellogg)
@direction
@value
and @direction.
@direction
(Gregg Kellogg)@direction
by default,@direction
is dropped.With base direction added to the spec the issue is now part of the official I18N review; closing this one.
In some situations it is important/necessary to include the base direction of a text, alongside its language; see the “Requirements for Language and Direction Metadata in Data Formats” for further details. In practice, in a vanilla JSON, it would require something like:
(the example comes from that document).
At this moment, I believe the only way you can reasonably express that in JSON-LD is via cheating a bit:
and making sure that the
dir
term is not defined in the relevant@context
so that, when generating the RDF output, that term is simply ignored. But that also means that there is no round-tripping, that term will disappear after expansion.The difficulty lies in the RDF layer, in fact; RDF does not have any means (alas!) to express text direction. On the other hand, this missing feature is a general I18N problem whenever JSON-LD is used (there were issues when developing the Web Annotation Model, these issues are popping up in the Web Publication work, etc.).
Here is what I would propose as a non-complete solution
@dir
term, alongside@language
. This means this term can be used in place ofdir
above, ie, it is a bona-fide part of a string representation, and would therefore be kept in the compaction/expansion steps, can also be used for framing.@dir
is ignored when transforming into RDF. I.e., only the language tag would be used.[] ex:title "موبي ديك"^^rdf:internationalText(ar,rtl) ;
3.2. Go for a "generalized" RDF where strings can also appear as subjects (that has been a matter of dispute for a long time...). That would give the possibility to add such attribute to texts like directions 3.3. Some other mechanisms that I cannot think about@dir
value can be properly mapped onto an RDF representing the right choices (if such choices are worked out)Original issue Introducing @dir ? #583