- From: Dan Brickley <danbri@google.com>
- Date: Tue, 10 Jun 2014 23:43:07 +0100
- To: Markus Lanthaler <markus.lanthaler@gmx.net>
- Cc: W3C Web Schemas Task Force <public-vocabs@w3.org>
On 10 June 2014 22:36, Markus Lanthaler <markus.lanthaler@gmx.net> wrote: > On Tuesday, June 10, 2014 7:36 PM, Dan Brickley wrote: >> On 10 June 2014 18:01, Alexander Shubin <ajax@yandex-team.ru> wrote: >> >> Does it fit the schema design I posted? >> > >> > Sure. That’s why I proposed them :) Actually it uses the fact that ItemListElement is >> Thing. >> > >> >> Re 'numberOfElements' maybe we can find an existing property to >> >> extend? >> > >> > I couldn't find anything suitable. > > Very minor point but numberOfItems might be better given how the other properties and the type itself is documented: > > A list of *items* of any sort... > A single list item... > ListItem > ... Perhaps, but we also use the word element, i.e. itemListElement. >> Adding, >> >> + <div typeof="rdf:Property" resource="http://schema.org/numberOfElements"> >> + <span class="h" property="rdfs:label">numberOfElements</span> >> + <span property="rdfs:comment">The number of elements in an >> ItemList.</span> >> + <span>Domain: <a property="http://schema.org/domainIncludes" >> href="http://schema.org/ItemList">ItemList</a></span> >> + <span>Range: <a property="http://schema.org/rangeIncludes" >> href="http://schema.org/Number">Number</a></span> >> + </div> >> >> I've added one example so far, based on your first. >> >> -> http://sdo-wip1.appspot.com/ItemList is updated, as is git >> (https://github.com/danbri/schemaorg/commits/sdo-itemlist) > Both JSON-LD examples are invalid: > In the first example the value of itemListElement should be an object and thus be wrapped in {} and not []. That's a very old example originally; it might be the JSON-LD conversion was flawed, I'll check. > The second example has two itemListElement properties which is invalid (strangely the same example is used at schema.org/ListItem!?). Both values should be wrapped in an array and collapsed into a single property. > You could also use a JSON number to express the value of numberOfElements, i.e., remove the quotes around 315. Thanks - I was grabbing time between meetings and only checked on JSONLint! Lesson learned :) I've gone with this for now (I'll check what we do elsewhere for numbers): { "@context": "http://schema.org", "@type": "ItemList", "url": "http://multivarki.ru?filters%5Bprice%5D%5BLTE%5D=39600", "numberOfElements": "315", "itemListElement": [{ "@type": "Product", "image": "http://img01.multivarki.ru.ru/c9/f1/a5fe6642-18d0-47ad-b038-6fca20f1c923.jpeg", "url": "http://multivarki.ru/brand_502/", "name": "Brand 502" },{ "@type": "Product", "name": "..." } ], "offers": { "@type": "Offer", "price": "4399 p." } } Posted as http://sdo-wip1.appspot.com/ItemList > It would also be nice if an example using next and previous would be added as people will probably struggle referencing it both from the ItemList and from a ListItem at the same time if there isn't an example they can copy-paste. Yes, more example suggestions welcomed. It's also an open question currently whether this design is adequate to address Breadcrumb use cases (essentially an order list of url / label pairs). Dan
Received on Tuesday, 10 June 2014 22:43:38 UTC