Every element in a Callimachus template must have either a new subject or an inherited subject.

New Subject

As processing progresses, any @about or @resource attributes will change the current subject.

Below the body changes the current subject to the variable ?this.

<body resource="?this">
  <!-- Expressions and RDFa attribute in body will use the subject ?this. -->
</body>

If @about and @resource is not present, then @src and @href can also set the new subject of an element.

Inherited Subject

The usual way an inherited subject gets set is when a parent element has the attribute @resource.

<body resource="?this">
  <ul>
    <li rel="foaf:knows" resource="?friend">
      <!-- Within this element the current subject is ?friend. -->
    </li>
  </ul>
</body>

The attribute @href and @src can also change the inherited subject.

<body resource="?this">
  <ul>
    <li rel="foaf:knows" resource="?friend">
      <a rel="foaf:img" href="?img">
        <!-- Within this element the current subject is ?img. -->
      </a>
    </li>
  </ul>
</body>