Microformats 2 and Schema

There's been some misinformation about microformats spread at AccBristol, specifically:

For the sake of daftness, I'm going to show how to do this. I'm going to take the 2nd example of BroadcastService, about In Our Time and give a microformats2 markup for the arbitrary schema vocab.

Immediately, there is some confusion as the various examples given don't match (the JSON-LD is missing all of the episode name information, and has misparsed the dates as text; the microdata and RDFa have injected lots of extra div's that will relayout the page) but I'll see if I can match the microdata/RDFa examples:

  1. <div>
  2. <a href="http://www.bbc.co.uk/programmes/b006qykl">In Our Time</a>,
  3. <a href="http://www.bbc.co.uk/programmes/b03ggc19">Ordinary Language Philosophy</a>, episode 604,
  4. broadcast on BBC Radio 4 at 09:00, 7th of November 2013, available online from 09:45 on the same day.
  5. </div>
  1. <div class="h-schema-RadioSeries">
  2. <a class="p-name" href="http://www.bbc.co.uk/programmes/b006qykl">In Our Time</a>,
  3. <div class="p-schema-episode h-schema-RadioEpisode">
  4. <a class="p-name" href="http://www.bbc.co.uk/programmes/b03ggc19">Ordinary Language Philosophy</a>,
  5. episode <span class="p-schema-position">604</span>,
  6. broadcast on
  7. <span class="p-schema-publication h-schema-BroadcastEvent">
  8. <a class="p-schema-publishedOn h-schema-BroadcastService" href="http://bbc.co.uk/radio4">BBC Radio 4</a>
  9. at <time class="dt-schema-startDate" datetime="2013-11-07T09:00+0100">09:00, 7th of November 2013</time>
  10. </span>, available online from
  11. <span class="p-schema-publication h-schema-OnDemandEvent">
  12. <time class="dt-schema-startDate" datetime="2013-11-07T09:45+0100">09:45 on the same day
  13. </span>.
  14. </div>
  15. </div>
  1. {
  2. "items": [{
  3. "type": ["h-schema-RadioSeries"],
  4. "properties": {
  5. "name": ["In Our Time"],
  6. "schema-episode": [{
  7. "value": "Ordinary Language Philosophy",
  8. "type": ["h-schema-RadioEpisode"],
  9. "properties": {
  10. "name": ["Ordinary Language Philosophy"],
  11. "schema-position": ["604"],
  12. "schema-publication": [{
  13. "value": "BBC Radio 4\n at 09:00, 7th of November 2013",
  14. "type": ["h-schema-BroadcastEvent"],
  15. "properties": {
  16. "schema-publishedOn": [{
  17. "value": "BBC Radio 4",
  18. "type": ["h-schema-BroadcastService"],
  19. "properties": {
  20. "name": ["BBC Radio 4"],
  21. "url": ["http://bbc.co.uk/radio4"]
  22. }
  23. }],
  24. "schema-startDate": ["2013-11-07T09:00+0100"],
  25. "name": ["BBC Radio 4\n at 09:00, 7th of November 2013"]
  26. }
  27. }, {
  28. "value": "09:45 on the same day",
  29. "type": ["h-schema-OnDemandEvent"],
  30. "properties": {
  31. "schema-startDate": ["2013-11-07T09:45+0100"],
  32. "name": ["09:45 on the same day"]
  33. }
  34. }],
  35. "url": ["http://www.bbc.co.uk/programmes/b03ggc19"]
  36. }
  37. }],
  38. "url": ["http://www.bbc.co.uk/programmes/b006qykl"]
  39. }
  40. }],
  41. "rels": {},
  42. "rel-urls": {}
  43. }
  1. {
  2. "type": "schema-RadioSeries",
  3. "name": "In Our Time",
  4. "url": "http://www.bbc.co.uk/programmes/b006qykl",
  5. "schema-episode": {
  6. "type": "schema-RadioEpisode",
  7. "name": "Ordinary Language Philosophy",
  8. "url": "http://www.bbc.co.uk/programmes/b03ggc19",
  9. "schema-position": "604",
  10. "schema-publication": {
  11. "children": [
  12. {
  13. "type": "schema-BroadcastEvent",
  14. "name": "BBC Radio 4\n at 09:00, 7th of November 2013",
  15. "schema-startDate": "2013-11-07T09:00:00+0100",
  16. "schema-publishedOn": {
  17. "type": "schema-BroadcastService",
  18. "name": "BBC Radio 4",
  19. "url": "http://bbc.co.uk/radio4"
  20. }
  21. },
  22. {
  23. "type": "schema-OnDemandEvent",
  24. "name": "09:45 on the same day",
  25. "schema-startDate": "2013-11-07T09:45:00+0100"
  26. }
  27. ]
  28. }
  29. }
  30. }
  1. <div itemscope itemtype="http://schema.org/RadioSeries">
  2. <a itemprop="url" href="http://www.bbc.co.uk/programmes/b006qykl">
  3. <span itemprop="name">In Our Time</span></a>,
  4. <div itemprop="episode" itemscope itemtype="http://schema.org/RadioEpisode">
  5. <a itemprop="url" href="http://www.bbc.co.uk/programmes/b03ggc19">
  6. <span itemprop="name">Ordinary Language Philosophy</span></a>,
  7. episode <span itemprop="position">604</span>, broadcast on
  8. <div itemprop="publication" itemscope itemtype="http://schema.org/BroadcastEvent">
  9. <div itemprop="publishedOn" itemscope itemtype="http://schema.org/BroadcastService">
  10. <a itemprop="url" href="http://www.bbc.co.uk/radio4"><span itemprop="name">BBC Radio 4</span></a>
  11. </div> at
  12. <span itemprop="startDate"
  13. content="2013-11-07T09:00:00+01:00">09:00, 7th of November 2013</span>
  14. </div>,
  15. available online from
  16. <div itemprop="publication" itemscope itemtype="http://schema.org/OnDemandEvent">
  17. <span itemprop="startDate"
  18. content="2013-11-07T09:45:00+01:00">09:45 on the same day</span>.
  19. </div>
  20. </div>
  21. </div>
  1. <div vocab="http://schema.org/" typeof="RadioSeries">
  2. <a property="url" href="http://www.bbc.co.uk/programmes/b006qykl">
  3. <span property="name">In Our Time</span></a>,
  4. <div property="episode" typeof="RadioEpisode">
  5. <a property="url" href="http://www.bbc.co.uk/programmes/b03ggc19">
  6. <span property="name">Ordinary Language Philosophy</span></a>,
  7. episode <span property="position">604</span>, broadcast on
  8. <div property="publication" typeof="BroadcastEvent">
  9. <div property="publishedOn" typeof="BroadcastService">
  10. <a property="url" href="http://www.bbc.co.uk/radio4"><span property="name">BBC Radio 4</span></a>
  11. </div> at
  12. <span property="startDate"
  13. content="2013-11-07T09:00:00+01:00">09:00, 7th of November 2013</span>
  14. </div>,
  15. available online from
  16. <div property="publication" typeof="OnDemandEvent">
  17. <span property="startDate"
  18. content="2013-11-07T09:45:00+01:00">09:45 on the same day</span>.
  19. </div>
  20. </div>
  21. </div>
  1. <script type="application/ld+json">
  2. {
  3. "@context": "http://schema.org",
  4. "@type": "RadioSeries",
  5. "episode": {
  6. "@type": "RadioEpisode",
  7. "position": "604",
  8. "publication": [
  9. {
  10. "@type": "BroadcastEvent",
  11. "publishedOn": {
  12. "@type": "BroadcastService",
  13. "url": "http://www.bbc.co.uk/radio4"
  14. },
  15. "startDate": "09:00, 7th of November 2013"
  16. },
  17. {
  18. "@type": "OnDemandEvent",
  19. "startDate": "09:45 on the same day"
  20. }
  21. ],
  22. "url": "http://www.bbc.co.uk/programmes/b03ggc19"
  23. },
  24. "url": "http://www.bbc.co.uk/programmes/b006qykl"
  25. }
  26. </script>

Things to note here:

Updated with jf2 version.