Re: Question about framing

You’re running afoul some frame selection logic, which ends up selecting just selects one of the values. What happens is that the frame gets expanded, and you show two values for the single property “skos:prefLabel”. You probably want to either have an empty frame, or wild-card “skos:prefLabel”.

These things are best communicated using links to the playground, such as https://tinyurl.com/yfr3bvxe <https://tinyurl.com/yfr3bvxe>, which uses the following frame:

{
  "@context": {
    "label_it": {"@id": "skos:prefLabel","@language": "it" },
    "label_fr": {"@id": "skos:prefLabel","@language": "fr" }
  },
  "skos:prefLabel": {}
}

Gregg Kellogg
gregg@greggkellogg.net

> On Oct 4, 2022, at 10:10 AM, Roberto Polli <robipolli@gmail.com> wrote:
> 
> Dear folks,
> 
> I am struggling with framing. The result is the same with both pyld and the playground. 
> 
> Given a multi-language JSON-LD I want to pick two skos:prefLabels, like that
> 
> {
>   "label_it": {"@language": "it", "@value": {}},
>   "label_fr": {"@language": "fr", "@value": {}},
>   "@context": {
>     "label_it": {"@id": "skos:prefLabel","@language": "it" },
>     "label_fr": {"@id": "skos:prefLabel","@language": "fr" },
>   }
> }
> 
> Full gist here
> - https://gist.github.com/ioggstream/e9c4748208728c5abca34a7c6e309284 <https://gist.github.com/ioggstream/e9c4748208728c5abca34a7c6e309284>
> 
> but the framing mechanism only shows the last field (e.g. label_fr), eg.
> 
> { label_fr: France }  # No Italy here!
> 
> Instead, if I don't filter, like below, the framing mechanism dumps all unmentioned languages in
> "skos:prefLabel" field, even if "skos:prefLabel" is not mentioned between the "@explicit" fields.
> 
> {
>   "label_it": {},
>   "label_fr": {},
>   "@context": {
>     "label_it": {"@id": "skos:prefLabel","@language": "it" },
>     "label_fr": {"@id": "skos:prefLabel","@language": "fr" },
>   }
> }
> 
> Is there a standard way to tell "framing" to strip off specific/unwanted fields like "skos:prefLabel"?
> 
> Thanks ++, <>
> R.
>  <>
> 
> 

Received on Tuesday, 4 October 2022 20:30:27 UTC