New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong use of ItemList #569
Comments
@rhofvendahl can you please take a peek at this? |
@VladimirAlexiev Thanks for pointing this out, and for the explanation! It looks as though the |
|
@nissimsan it's still used in 7 schemas: https://github.com/w3c-ccg/traceability-vocab/search?q=ItemList&type=code |
Nice search, @VladimirAlexiev. The simple solution seems to be just removing |
I'm afraid that the #686 fix doesn't do much. Another example from RevocationList2020Status.yml: revocationListIndex:
title: revocationListIndex
type: string
$linkedData:
term: revocationListIndex
'@id': https://schema.org/itemListElement
revocationListCredential:
title: revocationListCredential
type: string
$linkedData:
term: revocationListCredential
'@id': https://schema.org/LinkRole
example: |-
{
"type" : ["RevocationList2020Status"],
"revocationListIndex" : "0",
"revocationListCredential": "https://example.gov/revocation-lists/urn:uuid:3bc24f87-b47b-43a0-b5bf-b9fde7913746"
} There are several mistakes here:
|
This is now controlled by https://github.com/w3c/vc-bitstring-status-list I suggest we close this issue |
The following schemas use https://schema.org/ItemList:
That's a rather specific class that should only be used for ordered lists, and there's no way to specify the class of elements.
More precisely, its
itemListElement
must beListItem
, which must have aposition
(integer) anditem
that'sThing
(i.e. unspecific class).Here are 2 specific cases to illustrate the error:
AgricultureActivity.yml:
You cannot state "a list of Persons", and the
Person.yml
schema doesn't have any fields pertaining to ordered lists, nor does the example embedded in AgricultureActivity.yml.The problems are the same.
If you need an ordered list of items, you can do specify this in the JSONLD context:
Then it will be emitted as an
rdf:List
that doesn't have integerposition
fields but uses a linked list to preserve order.It looks nice in turtle, eg:
But such list uses blank nodes and looks like the following RDF structure:
Despite JSONLD's syntactic support for rdf:List,
you probably will want to avoid it and use your own structure, eg a simplification of schema:ItemList:
The text was updated successfully, but these errors were encountered: