4

I'm in the process of creating a album-based webpage and now in the process of providing Schema.org annotations (using Microdata) for element as needed. The only element I'm having trouble labeling are the numeric representations of tracks, or track number.

I've searched through Schema.org's array of options for music records but had no luck finding anything. Is there a property that I'm overlooking that is best suited for numeric list values?

<div itemscope itemtype="http://schema.org/MusicRecording">
  <div itemprop="track">
    <span>01</span> <!--Here's an example of what I'm referring to -->
    <span itemprop="name"">Track 1</span>      
    <time datetime="PT2M30S">2:30</time>
  </div>

  <div itemprop="track">
    <span>02</span>
    <span itemprop="name"">Track 2</span>      
    <time datetime="PT3M0S">3:00</time>
  </div>
  ...
</div>
3

The MusicRecording type does not define a suitable property for the track number. I think this makes sense, because a recording could be released on different records, possibly with a different track number.

The MusicAlbum type allows to reference an ItemList in the track property. An ItemList can reference ListItem items (itemListElement property), and each ListItem can have a position property, giving the position "of an item in a series or sequence of items". I guess this could be used for the track numbers in an album.

However, the description of MusicAlbum’s track property says:

If an ItemList is given, the list should contain items of type MusicRecording.

So they recommend to use MusicRecording, which can’t have the position property.

You could use both types, MusicRecording and ListItem, and provide the position property. This works fine with the syntaxes RDFa and JSON-LD, but it’s not allowed in the Microdata syntax (where you may provide multiple types, but you may not use properties that are not defined for all of these types; but many users seem to ignore this restriction).

  • So would the itemprop and itemscope be applied to the track number inline as so? <span itemscope itemtype="http://schema.org/ListItem" itemprop="position">01</span> – Carl Edwards Sep 16 '15 at 14:33
  • @CarlEdwards: No, the position property has to be a child, and each ListItem (which represents a track, possibly multi-typed with MusicRecording) has to be referenced with the itemListElement property, e.g.: <div itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="position">1</span></div>. – unor Sep 17 '15 at 14:50
  • Ah, thanks for clearing that up for me. Do you think going the extra mile in providing the additional ListItem scope would benefit the page in regards to page crawlability? – Carl Edwards Sep 17 '15 at 15:21
  • @CarlEdwards: I’m not sure in which way do you think it would have an effect on the crawlability? From my point of view, you’d have to decide which level of detail you want to provide in your structured data. If you want to include the track number, I think this is the only way that’s currenly possible with Schema.org. – unor Sep 17 '15 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.