1

Suppose I have a PublicationIssue of a Periodical, and I display a webpage with a ToC/summary with a list of Articles and a file document embedded with an iframe. The issue content is not coded on the page directly, but is fully available as file embedded.

For example, consider the following simplified HTML:

<article>
    <h1>Issue number 42</h1>

    <div class="toc">
        Table of contents:
        <ul>
            <li>Editorial</li>
            <li>First article</li>
            <li>Another interesting article</li>
            <li>The importance of microdata</li>
            <li>Microtagging your ToC like a pro</li>
        </ul>
    </div>

    <!-- here we have an embed document via iframe like a PDF or maybe a google doc or similar  -->
    <iframe src="url-to-file-embed"></iframe>
</article>

How can you markup the above with structured data so that you can inform crawlers that the ul is the ToC of the issue with the relative articles and the content of the issue is actually the src of the iframe embed?

1

For an iframe, Microdata will use the src value as property value. So you can specify itemprop="url" on the iframe to convey that this file is the PublicationIssue.

There doesn’t seem to be a property for a ToC, though. You could use hasPart to provide each Article, even if you only provide a name per Article. If the file allows linking to specific parts/pages, you could provide each article’s link in a link element; if it doesn’t, I would simply omit the url property.

<article itemscope itemtype="http://schema.org/PublicationIssue">

  <ul>

    <li itemprop="hasPart" itemscope itemtype="http://schema.org/Article">
      <span itemprop="name">First article</span>
      <link itemprop="url" href="url-to-file-embed#page-2" /> <!-- omit if there is no such URL --> 
    </li>

    <li itemprop="hasPart" itemscope itemtype="http://schema.org/Article">
      <span itemprop="name">Another interesting article</span>
      <link itemprop="url" href="url-to-file-embed#page-4" /> <!-- omit if there is no such URL --> 
    </li>

  </ul>

  <iframe itemprop="url" src="url-to-file-embed"></iframe>

</article>
  • Thank you. I'll leave the discussion open for a bit longer, but your answer is indeed a nice approach, if nothing else is suggested I will accept and follow it. – Gruber Oct 24 '18 at 23:39

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.