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

schema.org Breadcrumb design on top of ItemList

From: Dan Brickley <danbri@google.com>
Date: Fri, 19 Sep 2014 19:43:05 +0100
Message-ID: <CAK-qy=6jVbROVDTAbGKjEDuDzDeXjyFxf_785juc8uPWxjpaSg@mail.gmail.com>
To: W3C Web Schemas Task Force <public-vocabs@w3.org>, Stéphane Corlosquet <scorlosquet@gmail.com>
Here's one more pass over the schema.org breadcrumb usecase for ItemList.

As a recap, the challenge was to keep an ordered list of url + label
pairs which survives the transformation into an extracted graph (aka
triples). Thanks for everyone who jumped into this discussion already.
I've just been going over the rdfa/microdata options with Stephane
Corlosquet in IM and here's the best we can come up with.

I won't go into all the boring and fiddly tradeoffs here, just the 3
minimalistic examples showing a 2 item ordered list of link / anchor
text pairs. We considered dropping the @typeof in the RDFa but it
parses differently; while WebPage is quite an uninformative type, it
has a few subtypes (http://schema.org/WebPage) that might be useful.

As part of this, here's a one liner proposal for a "Breadcrumb" type,
which would be used here in place of the initial ItemList:

http://schema.org/BreadcrumbList: "A BreadcrumbList is an ItemList
consisting of a list of Web pages, typically described using at least
their URL and their name."

(This would replace/obsolete the existing unused
http://schema.org/breadcrumb property)

The examples below work with the ItemList design recently agreed here directly:

RDFa 1.1:

<ol vocab="http://schema.org/" typeof="ItemList">
  <li property="itemListElement" typeof="ListItem">
    <a property="item" typeof="WebPage"
href="https://example.com/dresses"><span
property="name">Dresses</span></a>
      <meta property="position" content="1">
  </li>
› <li property="itemListElement" typeof="ListItem">
    <a property="item" typeof="WebPage"
href="https://example.com/dresses/real"><span property="name">Real
Dresses</span></a>
    <meta property="position" content="2">
  </li>
</ol>


Microdata:

<ol itemscope itemtype="http://schema.org/ItemList">
  <li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://example.com/dresses"><span
itemprop="name">Dresses</span></a>
    <meta itemprop="position" content="1" />
  </li>
› <li itemprop="itemListElement" itemscope
itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://example.com/dresses/real"><span
itemprop="name">Real Dresses</span></a>
    <meta itemprop="position" content="2" />
  </li>
</ol>

JSON-LD:

{
 "@context": "http://schema.org",
 "@type": "ItemList",
 "itemListElement":
 [
  {
   "@type": "ListItem",
   "position": 1,
   "item":
   {
    "@id": "https://example.com/dresses",
    "name": "Dresses"
    }
  },
  {
   "@type": "ListItem",
  "position": 2,
  "item":
   {
     "@id": "https://example.com/dresses/real",
     "name": "Real Dresses"
   }
  }
 ]
}
Received on Friday, 19 September 2014 18:43:32 UTC

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