Open VladimirAlexiev opened 3 years ago
My answers:
@mgh128 Let's discuss lang tags here, not in #263
3: I wouldn't worry about JSONLD client being able to process and cache the Voc context. But schema.org people worried about a server's ability to serve a big context reliably, despite the caching. I wrote in Voc about that.
4: yes, rdf:Literal
is too broad, rdf:PlainLiteral
is exactly what's needed. Let's discuss in https://github.com/gs1/WebVoc/issues/22 (where I give 5 options), not here.
5: Ask the group but I'd be happy to stick with xsd:string
. Sensors are not poets :-)
2: JSONLD language shortcuts
If economy should be maximized, the best is to use range rdf:PlainLiteral
and then use a lang tag when you have one, and don't use any when you don't have it.
Assuming aliases "lang":"@language", "val":"@value"
:
"code": "code-not-natural-lang",
"label: {"val": "Some label", "lang": "en"}
"labels": [
"Some label, I'm not sure about lang",
{"val": "Some label", "lang": "en"}
]
If uniformity should be maximized, then you want to always use the same structure for the same field, which leads to extraneous adornments:
@none
for strings with no lang tag[...]
for multivalue fields, even when there's a single valueAgreed approach 2:
Define aliases in the context: {"lang": "@language", "val": "@value"}
, and tell the user to express his strings as in the last example (i.e. express lang tag only when he has it)
^^^ This applies when we're using master data properties from the GS1 Web vocabulary that expect language-tagged strings. We're not proposing any change to the existing CBV master data attributes / ILMD that only expect a plain xsd:string value. i.e. not breaking backward compatibility - just trying to make it more JSON-friendly if using the GS1 Web vocabulary properties instead.
We'll do this within the narrowly scoped context resources for CertificationDetails and master data attributes - as mentioned in https://github.com/gs1/EPCIS/issues/263#issuecomment-852176222
EPCIS § 7.4.1.3 will address certificationInfo, including non-normative examples with langString.
EPCIS includes very few strings (4-5), and they are all code-like so they are correctly declared
xsd:string
But
gs1:certificationStandard, gs1:certificationAgency, gs1:certificationValue
inCertificationInfo
(#245) are declaredrdf:langString
(following WebVoc's multilingual orientation). I don't see cardinality restrictions, so this allows providing values in different langs, egQuestions:
"@language", "@value"
in JSON"lang": "@language"
(but "value" already maps toepcis:value
)rdf:Literal
(orschema:rangeIncludes xsd:string, rdf:langString
; or ash:or
of these datatypes) to allow the much simpler common case of one name with no lang tag:stringValue
inSensorReport
is defined asxsd:string
. Do we ever want it to carry a lang tag to indicate the language?