W3C home > Mailing lists > Public > public-vocabs@w3.org > June 2014

Re: ItemList

From: Jarno van Driel <jarnovandriel@gmail.com>
Date: Wed, 11 Jun 2014 01:05:22 +0200
Message-ID: <CADK2AU2XKjEPXuK+FtnJU-82JtyL+i+hmq5+x-FKCRU9FDMP=A@mail.gmail.com>
To: Dan Brickley <danbri@google.com>
Cc: Markus Lanthaler <markus.lanthaler@gmx.net>, W3C Web Schemas Task Force <public-vocabs@w3.org>
And now without markup errors. [sigh, sorry]

<ul itemscope itemtype="http://schema.org/ItemList">
    <li itemprop="itemListElement" itemscope itemtype="
http://schema.org/ListItem">
        <span itemprop="item" itemscope itemtype="
http://schema.org/BreadCrumb">
            <a itemprop="url" href="http://schema.org/" title>
                <span itemprop="name">Home</span>
            </a>
            <meta itemprop="position" content="1" />
        </span>
    </li>
    <li itemprop="itemListElement" itemscope itemtype="
http://schema.org/ListItem">
        <span itemprop="item" itemscope itemtype="
http://schema.org/BreadCrumb">
            <a itemprop="url" href="http://schema.org/Thing" title>
                <span itemprop="name">Thing</span>
            </a>
            <meta itemprop="position" content="2" />
        </span>
    </li>
    <li itemprop="itemListElement" itemscope itemtype="
http://schema.org/ListItem">
        <span itemprop="item" itemscope itemtype="
http://schema.org/BreadCrumb">
            <a itemprop="url" href="http://schema.org/Intangible" title>
                <span itemprop="name">Intangible</span>
            </a>
            <meta itemprop="position" content="3" />
        </span>
    </li>
    <li itemprop="itemListElement" itemscope itemtype="
http://schema.org/ListItem">
        <span itemprop="item" itemscope itemtype="
http://schema.org/BreadCrumb">
            <a itemprop="url" href="http://schema.org/StructuredValue"
title>
                <span itemprop="name">StructuredValue</span>
            </a>
            <meta itemprop="position" content="4" />
        </span>
    </li>
    <li itemprop="itemListElement" itemscope itemtype="
http://schema.org/ListItem">
        <span itemprop="item" itemscope itemtype="
http://schema.org/BreadCrumb">
            <a itemprop="url" href="http://schema.org/ListItem" title>
                <span itemprop="name">ListItem</span>
            </a>
            <meta itemprop="position" content="5" />
        </span>
    </li>
</ul>


2014-06-11 1:03 GMT+02:00 Jarno van Driel <jarnovandriel@gmail.com>:

> Something like this for the breadcrumb perhaps?
>
> <ul>
>     <li itemprop="itemListElement" itemscope itemtype="
> http://schema.org/ListItem">
>         <span itemprop="item" itemscope itemtype="
> http://schema.org/BreadCrumb">
>             <a itemprop="url" href="/" title>
>                 <span itemprop="name">Home</span>
>             </a>
>             <meta itemprop="position" content="1" />
>         </span>
>     </li>
>     <li itemprop="itemListElement" itemscope itemtype="
> http://schema.org/ListItem">
>         <span itemprop="item" itemscope itemtype="
> http://schema.org/BreadCrumb">
>             <a itemprop="url" href="/Thing" title>
>                 <span itemprop="name">Thing</span>
>             </a>
>             <meta itemprop="position" content="2" />
>         </span>
>     </li>
>     <li itemprop="itemListElement" itemscope itemtype="
> http://schema.org/ListItem">
>         <span itemprop="item" itemscope itemtype="
> http://schema.org/BreadCrumb">
>             <a itemprop="url" href="http://schema.org/Intangible" title>
>                 <span itemprop="name">Intangible</span>
>             </a>
>             <meta itemprop="position" content="3" />
>         </span>
>     </li>
>     <li itemprop="itemListElement" itemscope itemtype="
> http://schema.org/ListItem">
>         <span itemprop="item" itemscope itemtype="
> http://schema.org/BreadCrumb">
>             <a itemprop="url" href="http://schema.org/StructuredValue"
> title>
>                 <span itemprop="name">StructuredValue</span>
>             </a>
>             <meta itemprop="position" content="4" />
>         </span>
>     </li>
>     <li itemprop="itemListElement" itemscope itemtype="
> http://schema.org/ListItem">
>         <span itemprop="item" itemscope itemtype="
> http://schema.org/BreadCrumb">
>             <a itemprop="url" href="http://schema.org/ListItem" title>
>                 <span itemprop="name">ListItem</span>
>             </a>
>             <meta itemprop="position" content="5" />
>         </span>
>     </li>
> </ul>
>
>
> 2014-06-11 0:43 GMT+02:00 Dan Brickley <danbri@google.com>:
>
> 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
>>
>>
>
>
> --
> *Jarno van Driel*
> Technical & Semantic SEO Consultant
> 8 Digits - Digital Marketing Technologies
>
> Tel: +31 652 847 608
> Google+: https://plus.google.com/u/0/+JarnovanDriel
> Linkedin: linkedin.com/pub/jarno-van-driel/75/470/36a/
>



-- 
*Jarno van Driel*
Technical & Semantic SEO Consultant
8 Digits - Digital Marketing Technologies

Tel: +31 652 847 608
Google+: https://plus.google.com/u/0/+JarnovanDriel
Linkedin: linkedin.com/pub/jarno-van-driel/75/470/36a/
Received on Tuesday, 10 June 2014 23:05:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:29:42 UTC