2

For example "John ran the NYC Marathon in 3 hours 4 minutes 5 seconds" (note that the action is in the past).

Does the following make semantic sense?

<div itemscope itemtype="https://schema.org/ExerciseAction">
  <div itemprop="agent" itemscope itemtype="https://schema.org/Person">
    <span itemprop="name">John</span>
  </div>
  <meta itemprop="distance" content="26 miles" />
  <meta itemprop="exerciseType content="Running" />
  <div itemprop="event" itemscope itemtype="https://schema.org/SportsEvent">
    <span itemprop="name">NYC Marathon</span>
  </div>
  <time itemprop="result" datetime="PT3H4M5S">3 hours 4 minutes 5 seconds</time>
</div>

Should ExerciseAction be the parent or child of SportsEvent?

i.e.

<div itemscope itemtype="https://schema.org/ExerciseAction">
  <div itemprop="event" itemscope itemtype="https://schema.org/SportsEvent"></div>
</div>

OR

<div itemscope itemtype="https://schema.org/SportsEvent">
  <div itemprop="potentialAction" itemscope itemtype="https://schema.org/ExerciseAction"></div>
</div>

2 Answers 2

1

I think the first variant (ExerciseActioneventSportsEvent) makes more sense, but only because the definition of potentialAction seems to suggest that it’s for, well, potential actions, i.e., actions that could possibly happen at this event (e.g., things you can do), and not for actions that actually happened.

For explicitly denoting that this action already happened, you could add the actionStatus property:

<link itemprop="actionStatus" href="http://schema.org/CompletedActionStatus" />

Instead of the event property, you could use the sportsEvent property. But you could also use both properties together:

<div itemprop="event sportsEvent" itemscope itemtype="http://schema.org/SportsEvent">
  <span itemprop="name">NYC Marathon</span>
</div>
3
  • Doesn't the 'result' property in Action imply that 'actionStatus' is completed? Are properties 'event' and 'sportsEvent' in ExerciseAction equivalent? On reading the docs my understanding is 'sportsEvent' is more about event location than the event itself.
    – pte19022
    Commented Dec 26, 2015 at 23:29
  • 1
    @pte19022: Yes, having a result could imply that the action was successful, but (AFAIK) even a potential action (PotentialActionStatus) could have a result (e.g., if you do this action, you will get this result). As the Action documentation says: "The expectation is that the status of an action will often be self-evident based on the usage context, so this property can often be elided. However, it may still be necessary for resolving ambiguous cases when they arise. "
    – unor
    Commented Dec 27, 2015 at 17:26
  • 1
    @pte19022: About event/sportsEvent, I created an GitHub issue, asking if sportsEvent is really supposed to be a location. But in your case it seems to me that both meanings would apply anyway, right?
    – unor
    Commented Dec 27, 2015 at 17:27
0

Real-life example: Wilson Kipsang of Kenya finished the New York Marathon in 2 hours 12 minutes 45 seconds. He was 4th male of 28914 males.

schema.org/ExerciseAction
    additionalType "http://www.productontology.org/id/Long-distance_running"
    distance "26 miles"
    event > schema.org/SportsEvent
        additionalType "http://www.productontology.org/id/Marathon"
        name "New York Marathon"
        location "New York"
        startDate "2015-11-01T09:00-05:00"
        duration "PT12H" (event is complete)
    agent > schema.org/Person
        name "Wilson Kipsang"
        gender "Male"
        nationality "Kenya"
    result > schema.org/Duration
        value "PT2H12M45S" (running score)
    result > schema.org/Rating
        ratingValue "4" (running rank)
        bestRating "1"
        worstRating "28914"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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