<!DOCTYPE html>
<html>
  <head>
    <title>Web Annotation Data Model</title>
    <meta charset='utf-8'></meta>
    <style>

.model {
 empty-cells: show;
 border-collapse: collapse;
 margin-bottom: .5ex;
 border: 1px solid black;
 width: 100%;
}

.model th {
 padding: 3px;
 border: 1px solid #404040;
 text-align: center;
 font-weight: bold;
 font-family: sans-serif;
}

.model td {
 padding: 5px;
 border: 1px solid #404040;
 text-align: left;
 font-family: sans-serif;
}
      </style>
      <script src='https://www.w3.org/Tools/respec/respec-w3c-common' async='true' class='remove'></script>
      <script class='remove'>
      var respecConfig = {
          specStatus: "REC",
          prEnd: "2017-02-14",
          shortName:  "annotation-model",
          errata:     "https://www.w3.org/annotation/errata/",
          editors: [
                {   name:       "Robert Sanderson",
                    company:    "J. Paul Getty Trust",
                    companyURL: "http://getty.edu/",
                    mailto:     "rsanderson@getty.edu",
					extras:     [{
                      name:  "<img src='orcid_logo.png' alt='orcid logo' />",
                      href:  "http://orcid.org/0000-0003-0782-2704",
                      class: "orcid"
                    }],
				},
                {   name:       "Paolo Ciccarese",
                    url:        "http://www.paolociccarese.info",
                    company:    "Massachusetts General Hospital",
                    companyUrl: "",
                    mailto:     "paolo.ciccarese@gmail.com "
                },
                {   name:       "Benjamin Young",
                    url:        "http://bigbluehat.com/",
                    company:    "John Wiley &amp; Sons, Inc.",
                    companyURL: "http://www.wiley.com/",
                    mailto:     "byoung@bigbluehat.com"
                }
          ],
          implementationReportURI: "https://w3c.github.io/test-results/annotation-model/all.html",
          crEnd:                "2016-12-20",
          previousMaturity:     "PR",
          previousPublishDate:  "2017-01-17",
          previousURI:          "http://www.w3.org/TR/2017/PR-annotation-model-20170117/",
          publishDate:          "2017-02-23",
          edDraftURI:           "http://w3c.github.io/web-annotation/",
          wg:                   "Web Annotation Working Group",
          wgURI:                "http://www.w3.org/annotation/",
          wgPublicList:         "public-annotation",
          wgPatentURI:          "https://www.w3.org/2004/01/pp-impl/73180/status",
          localBiblio: {
            "iana-media-types": {
                title: "Media Types",
                href: "http://www.iana.org/assignments/media-types/",
                publisher: "IANA (Internet Assigned Numbers Authority)"
            },
            "w3c-language-tags": {
                title: "Language Tags in HTML and XML",
                href: "https://www.w3.org/International/articles/language-tags/",
                publisher: "W3C"
            },
            "cfi": {
                "authors" : [
                    "Peter Sorotokin",
                    "Garth Conboy",
                    "Brady Duga",
                    "John Rivlin",
                    "Don Beaver",
                    "Kevin Ballard",
                    "Alastair Fettes",
                    "Daniel Weck"
                ],
                title: "EPUB Canonical Fragment Identifiers",
                href: "http://www.idpf.org/epub/linking/cfi/epub-cfi-20140628.html",
                publisher: "IDPF",
                rawDate: "2014-06-26",
                status: "Recommended Specification"
            },
            "annotation-vocab": {
              "authors": [
                 "Robert Sanderson",
                 "Paolo Ciccarese",
                 "Benjamin Young"
              ],
              title: "Web Annotation Vocabulary",
              href: "http://www.w3.org/TR/annotation-vocab/",
              publisher: "W3C",
              rawDate: "2017-02-23",
              status: "REC"
            },
            "annotation-protocol": {
              "authors": [
                "Robert Sanderson"
              ],
              title: "Web Annotation Protocol",
              href: "http://www.w3.org/TR/annotation-protocol/",
              publisher: "W3C",
              rawDate: "2017-02-23",
              status: "REC"
            }
          },
          otherLinks: [
                {
                        key: "Repository",
                        data: [{
                                value: "Github Repository",
                                href: "https://github.com/w3c/web-annotation"
                        }]
                },
                {
                  key: "Changes",
                  data: [{
                      value: "Diff to previous version",
                      href: "diff.html"
                    }, {
                      value: "Commit history",
                      href: "https://github.com/w3c/web-annotation/commits/gh-pages"
                    }]
                 }
          ],
          alternateFormats: [
            {
              uri: "annotation-model.epub",
              label: "ePub"
            }
          ]
      };
      </script>
    </head>
    <body>


<section id="abstract">

<p>Annotations are typically used to convey information about a resource or associations between resources. Simple examples include a comment or tag on a single web page or image, or a blog post about a news article.</p>

<p>The Web Annotation Data Model specification describes a structured model and format to enable annotations to be shared and reused across different hardware and software platforms. Common use cases can be modeled in a manner that is simple and convenient, while at the same time enabling more complex requirements, including linking arbitrary content to a particular data point or to segments of timed multimedia resources.</p>

<p>The specification provides a specific JSON format for ease of creation and consumption of annotations based on the conceptual model that accommodates these use cases, and the vocabulary of terms that represents it.</p>

</section>

<section id="sotd">
<p>
This specification was derived from the Open Annotation Community Group's outcomes, and details of the differences between the two are maintained in the <a href="#acknowledgments">Acknowledgment</a> appendix.
</p>
</section>

<section class="informative">
<h2>Introduction</h2>

<p>Annotating, the act of creating associations between distinct pieces
of information, is a pervasive activity online in many guises.
Web citizens make comments about online resources using either tools built
in to the hosting website, external web services, or the functionality
of an annotation client. Comments about shared photos or videos, reviews of products, or even social network mentions of web resources could all be considered as annotations. In addition, there are a plethora of "sticky note" systems and stand-alone multimedia annotation systems. This specification describes a common approach to expressing these annotations, and more.
</p>

<p>The Web Annotation Data Model provides an extensible, interoperable framework for
expressing annotations such that they can easily be shared between
platforms, with sufficient richness of expression to satisfy complex
requirements while remaining simple enough to also allow for the most common use cases,
such as attaching a piece of text to a single web resource.</p>

<p>An annotation is considered to be a set of connected resources,
typically including a body and target, and conveys that the body is related to the target.
The exact nature of this relationship changes according to the intention of the annotation, but the body is most frequently somehow "about" the target.  This perspective results in a basic model with three parts, depicted below.
The full model supports additional functionality, enabling content to be embedded within the annotation,
selecting arbitrary segments of resources, choosing the appropriate representation of a
resource and providing styling hints to help clients render the annotation appropriately.
Annotations created by or intended for machines are also possible, ensuring that the Data Web is not ignored in favor of only considering the human-oriented Document Web.</p>

<img src="images/intro_model.png" alt="Basic Model: Annotation, Body and Target" width="400"/>

<p>The Web Annotation Data Model does not prescribe a transport protocol for creating, managing and retrieving annotations. Instead it describes a resource oriented structure and serialization of that structure that could be carried over many different protocols.  The related [[!annotation-protocol]] specification describes a recommended transport layer, which may be adopted separately.</p>


<section>
	<h3>Aims of the Model</h3>

	<p>
The primary aim of the Web Annotation Data Model is to provide a
standard description model and format to enable annotations to be shared between
systems.  This interoperability may be either for sharing with others,
or the migration of private annotations between devices or platforms.  The shared
annotations must be able to be integrated into existing collections
and reused without loss of significant information.  The model should
cover as many annotation use cases as possible, while keeping the simple
annotations easy and expanding from that baseline to make complex uses possible.
</p>

<p>
The Web Annotation Data Model is a single, consistent model that can be used by all interested parties.
All efforts have been made to keep the implementation costs for both producers
and consumers to a minimum.  A single method of fulfilling a use case
is strongly preferred over multiple methods, unless there are existing
standards that need to be accommodated or there is a significant cost
associated with using only a single method.  While the Data Model is built using Linked Data
fundamentals, the design is intended to allow rich and performant non-graph-based implementations.
As such, inferencing and other graph-based queries are explicitly not a priority for optimization in the
design of the model.

</p>
</section>

<section>
<h3>Serialization of the Model</h3>

<p>
The examples throughout the document are serialized as [[!JSON-LD]] using the Context given in Appendix A of the Annotation Vocabulary [[!annotation-vocab]], which is the preferred serialization format.  The media type of this format is defined in Section 3 of the Annotation Protocol [[!annotation-protocol]] as <code>application/ld+json;profile="http://www.w3.org/ns/anno.jsonld"</code>.
</p>

<p>When the only information that is recorded in the annotation is the <a>IRI</a> of a resource, then that IRI is used as the value of the relationship, as in <a href="#annotations">Example 1</a>.  When there is more information about the resource, the IRI is the value of the <code>id</code> property of the object which is the value of the relationship, as in <a href="#external-web-resources">Example 2</a>.</p>


</section>

<section id="conformance">
    <section>
        <h2>Conformance Requirements Related to Selectors</h2>
        <p>Not all <a href="#selectors">Selectors</a> are relevant for all media types; some combinations are meaningless or not formally defined. An implementation may therefore ignore certain types of Selectors in case the corresponding media types are not handled by that particular implementation.</p>

        <p>The table in <a href="#media_selector"></a> shows the correspondence among the main media types addressed in this specification and Selector types. The meaning of the table elements, and their effect on implementation conformance, is as follows.</p>

        <ul>
            <li>A “✔︎” sign in the table means that the Selector type is relevant for that particular media types. A conforming implementation MUST implement that particular combination <em>if</em> it handles the corresponding media type.</li>

            <li>A “✘” sign in the table means that the Selector type is not relevant for that particular media types. Conforming implementations SHOULD ignore that particular combination.</li>

            <li>A “?” means that it is not possible to specify, in general, whether that particular combination is meaningful (e.g., fragment identifiers are defined for specific media types, i.e., specific text media types other than plain text may have fragments defined but they are not listed in the table). In other cases the usefulness of such combination is not clear (e.g., Data Position selectors for binary images). Conforming implementations MAY implement that particular combination.</li>
        </ul>

    </section>
</section>

<section>
<h3>Terminology</h3>

<dl>

  <dt><dfn data-lt="IRI|IRIs">IRI</dfn></dt>
  <dd>An <a>IRI</a>, or Internationalized Resource Identifier, is an extension to the URI specification to allow characters from Unicode, whereas URIs must be made up of a subset of ASCII characters. There is a mapping algorithm for translating between IRIs and the equivalent encoded URI form. IRIs are defined by [[!rfc3987]].</dd>

  <dt><dfn data-lt="Resource|Resources">Resource</dfn></dt>
  <dd>An item of interest that MAY be identified by an <a>IRI</a>.</dd>

  <dt><dfn data-lt="Web Resource|Web Resources">Web Resource</dfn></dt>
  <dd>A <a>Resource</a> that MUST be identified by an <a>IRI</a>, as described in the Web Architecture [[!webarch]].  Web Resources MAY be dereferencable via their IRI.</dd>

  <dt><dfn data-lt="External Web Resource|External Web Resources">External Web Resource</dfn></dt>
  <dd>A <a>Web Resource</a> which is not part of the representation of the Annotation, such as a web page, image, or video. External Web Resources are dereferencable from their <a>IRI</a>.</dd>

  <dt><dfn data-lt="Property|Properties">Property</dfn></dt>
  <dd>A feature of a <a>Resource</a>, that often has a particular data type.  In the model sections, the term "Property" is used to refer to only those features which are <em>not</em> <a>Relationships</a> and instead have a literal value such as a string, integer or date.  The valid values for a Property are thus any data type other than object, or an array containing members of that data type if more than one is allowed.</dd>

  <dt><dfn data-lt="Relationship|Relationships">Relationship</dfn></dt>
  <dd>In the model sections, the term "Relationship" is used to distinguish those features that refer to other <a>Resources</a>, either by reference to the <a>Resource</a>'s <a>IRI</a> or by including a description of the <a>Resource</a> in the Annotation's representation. The valid values for a Relationship are: a quoted string containing an IRI, an object that has the "id" property, or an array containing either of these if more than one is allowed.</dd>

  <dt><dfn data-lt="Class|Classes">Class</dfn></dt>
  <dd><a>Resources</a> may be divided, conceptually, into groups called "classes"; members of a class are known as <a>Instances</a> of the class. Resources are associated with a particular class through <a>typing</a>. Classes are identified by <a>IRIs</a>, i.e., they are also <a>Web Resources</a> themselves.</dd>

  <dt><dfn data-lt="type|types|typing">Type</dfn></dt>
  <dd>A special <a>Relationship</a> that associates an <a>Instance</a> of a class to the <a>Class</a> it belongs to.</dd>

  <dt><dfn data-lt="Instance|Instances">Instance</dfn></dt>
  <dd>An element of a group of <a>Resources</a> represented by a particular <a>Class</a>.</dd>

</dl>

</section>

</section>

<!-- End Introduction -->

<section>
<h2>Web Annotation Principles</h2>

<p>
The Web Annotation Data Model is defined using the following basic principles:

<ul>
<li>An Annotation is a rooted, directed graph that represents a relationship between resources.</li>
<li>There are two primary types of resource that participate in this relationship, Bodies and Targets.</li>
<li>Annotations have 0 or more Bodies.</li>
<li>Annotations have 1 or more Targets.</li>
<li>The content of the Body resources is related to, and typically "about", the content of the Target resources.</li>
<li>Annotations, Bodies and Targets may have their own properties and relationships, typically including creation and descriptive information.</li>
<li>The intent behind the creation of an Annotation or the inclusion of a particular Body or Target is an important property and represented by a Motivation resource.</li>
</ul>
</p>

<p>
The following principles describe additional distinctions regarding the exact nature of Target and Body:

<ul>
<li>The Target or Body resource may be more specific than the entity identified by the resource's <a>IRI</a> alone.</li>
<li>In particular,
  <ul>
<li>The Target or Body resource may be a specific segment of the resource.</li>
<li>The Target or Body resource may be styled in a specific way.</li>
<li>The Target or Body resource may be a specific state of the resource.</li>
<li>The Target or Body resource may be included in the Annotation to play a specific role.</li>
<li>The Target or Body resource may be any combination of the above.</li>
</ul></li>
<li>The resource with these constraints is a separate resource from the Annotation, Body or Target, and is called a SpecificResource.</li>
<li>The SpecificResource refers to the source resource and the constraints that make it more specific.</li>
<li>The identity of the SpecificResource is separate from the descriptions of the constraints.</li>
<li>The Body resource may be a choice between multiple resources.</li>
</ul>
</p>

<p>
The properties of external resources, such as Bodies and Targets, included in the Annotation document are intended as hints to the client, and are not to be considered authoritative information. This includes properties such as the created time, the creating agent, the modification time, any rights assertions, format, language or text direction of the external resource.
</p>


</section>

<section>
	<h2>Web Annotation Framework</h2>

<section>
<h3>Annotations</h3>

<p>
An Annotation is a Web Resource. Typically, an Annotation has a single Body, which is a comment or other descriptive resource, and a single Target that the Body is somehow "about".  The Annotation likely also has additional descriptive properties. </p>

<p><b>Example Use Case:</b> %%name%% has written a post that makes a comment about a particular web page.  Her client creates an Annotation with the post as the body resource, and the web page as the target resource.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>@context</td><td>Property</td><td>The context that determines the meaning of the JSON as an Annotation.
  <br/>The Annotation MUST have 1 or more <code>@context</code> values and <code>http://www.w3.org/ns/anno.jsonld</code> MUST be one of them. If there is only one value, then it MUST be provided as a string.</td></tr>
<tr><td>id</td><td>Property</td><td>The identity of the Annotation.
<br/>An Annotation MUST have exactly 1 <a>IRI</a> that identifies it.</td></tr>
<tr><td>type</td><td>Relationship</td><td>The type of the Annotation.
  <br/>An Annotation MUST have 1 or more types, and the <code>Annotation</code> class MUST be one of them.</td></tr>
<tr><td>Annotation</td><td>Class</td><td>The class for Web Annotations.
<br/>The <code>Annotation</code> class MUST be associated with an Annotation using <code>type</code>.</td></tr>
<tr><td>body</td><td>Relationship</td><td>The relationship between an Annotation and its Body.
<br/>There SHOULD be 1 or more <code>body</code> relationships associated with an Annotation but there MAY be 0.
</td></tr>
<tr><td>target</td><td>Relationship</td><td>The relationship between an Annotation and its Target.
<br/>There MUST be 1 or more <code>target</code> relationships associated with an Annotation.
</td></tr>
</table>

<h4>Example</h4>

<pre class="example highlight" title="Basic Annotation Model">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/post1",
  "target": "http://example.com/page1"
}
</pre>
</section>

<section>
  <h2>Bodies and Targets</h2>

The Web is distributed, with different systems working together to provide access to content.  Annotations can be used to link those resources together, being referenced as the Body and Target.  The Target resource is always an External Web Resource, but the Body may also be embedded within the Annotation.  External Web Resources may be separately dereferenced to retrieve a representation of their state, whereas the embedded Body does not need to be dereferenced as the representation is included within the Annotation's representation.

<section>
<h3>External Web Resources</h3>

<p>Web Resources are identified with a <a>IRI</a> and have various properties, often including a format or language for the resource's content.  This information may be recorded as part of the Annotation, even if the representation of the resource must be retrieved from the Web.</p>

<p><b>Example Use Case:</b> %%name%% records a long analysis of a patent, and publishes the audio on her website as an mp3.  She then creates an Annotation with the mp3 as the body, and the PDF of the patent as the target.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
  <tr><td>id</td><td>Property</td><td>The <a>IRI</a> that identifies the Body or Target resource.
<br/>Bodies or Targets which are External Web Resources MUST have exactly 1 <code>id</code> with the value of the resource's <a>IRI</a>.
  </td></tr>
<tr><td>format</td><td>Property</td><td>The format of the Web Resource's content.
  <br/>The Body or Target SHOULD have exactly 1 format associated with it, but MAY have 0 or more.  The value of the property SHOULD be the media-type of the format, following the [[!rfc6838]] specification.</td></tr>
  <tr><td>language</td><td>Property</td><td>The language of the Web Resource's content.
  <br/>The Body or Target SHOULD have exactly 1 language associated with it, but MAY have 0 or more, for example if the language cannot be identified or the resource contains a mix of languages.  The value of the property SHOULD be a language code following the [[!bcp47]] specification.</td></tr>
<tr><td>processingLanguage</td><td>Property</td><td>The language to use for text processing algorithms such as line breaking, hyphenation, which font to use, and similar.
<br/>Each Body and Target MAY have exactly 1 <code>processingLanguage</code>. The value of the property SHOULD be a language code following the [[!bcp47]] specification.  If this property is not present and the <code>language</code> property is present with a single value, then the client SHOULD use that language for processing requirements.</td></tr>
<tr><td>textDirection</td><td>Relationship</td><td>The overall base direction of the text in the resource.
<br/>The Body or Target MAY have exactly 1 textDirection associated with it.  The value of the property MUST be one of the directions defined below (<code>ltr</code>, <code>rtl</code>, or <code>auto</code>).
</td></tr>
<tr><td>ltr</td><td>Instance</td><td>The direction that indicates the value of the resource is explicitly directionally isolated left-to-right text.</td></tr>
<tr><td>rtl</td><td>Instance</td><td>The direction that indicates the value of the resource is explicitly directionally isolated right-to-left text.</td></tr>
<tr><td>auto</td><td>Instance</td><td>The direction that indicates the value of the resource is explicitly directionally isolated text, and the direction is to be programmatically determined using the value.</td></tr>
</table>

<div class="note">
The [[iana-media-types]] document provides the official registry of media types that can be used with the <code>format</code> property.  The [[w3c-language-tags]] article provides a good overview of the values that implementers can expect to encounter in the <code>language</code> property.  The notion of text direction and the definitions of <code>auto</code>, <code>ltr</code> and <code>rtl</code> values are taken explicitly from the HTML5 [[html5]] <code>dir</code> attribute.  Please also note that if information provided by the external resource contradicts the information provided by the annotation about it, then the external resource is authoritative and the information from the annotation should be disregarded.
</div>

<h4>Example</h4>

<pre class="example highlight" title="External Web Resources">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": {
    "id": "http://example.org/analysis1.mp3",
    "format": "audio/mpeg",
    "language": "fr"
  },
  "target": {
    "id": "http://example.gov/patent1.pdf",
    "format": "application/pdf",
    "language": ["en", "ar"],
    "textDirection": "ltr",
    "processingLanguage": "en"
  }
}
</pre>
</section>

<section>
<h3>Classes</h3>

<p>It is useful for clients to know the general type of a Web Resource in advance.  If the client cannot render videos, then knowing that the Body is a video will allow it to avoid needlessly downloading a potentially large content stream.  For resources that do not have obvious media types, such as many data formats, it is also useful for a client to know that a resource with the format <code>text/csv</code> should not simply be rendered as plain text, despite the first part of the media type, whereas <code>application/pdf</code> may be able to be rendered by the user agent despite the main type being 'application'.</p>

<p><b>Example Use Case:</b> %%name%% shoots a video of her comment about a website on her phone and uploads it. She associates the video with the website via an Annotation, and her client adds types as a hint to consuming systems.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The type of the Body or Target resource.
  <br/>The Body or Target MAY have 1 or more <code>type</code>s, and if so, the value SHOULD be drawn from the list of classes below, but MAY come from other vocabularies.</td></tr>
<tr><td>Dataset</td><td>Class</td><td>The class for a resource which encodes data in a defined structure.</td></tr>
<tr><td>Image</td><td>Class</td><td>The class for image resources, primarily intended to be seen.</td></tr>
<tr><td>Video</td><td>Class</td><td>The class for video resources, with or without audio.</td></tr>
<tr><td>Sound</td><td>Class</td><td>The class for a resource primarily intended to be heard.</td></tr>
<tr><td>Text</td><td>Class</td><td>The class for a resource primarily intended to be read.</td></tr>
</table>

<h4>Example</h4>

<pre class="example highlight" title="Typing of Body and Target">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": {
    "id": "http://example.org/video1",
    "type": "Video"
  },
  "target": {
    "id": "http://example.org/website1",
    "type": "Text"
  }
}
</pre>
</section>

<section>
<h3>Segments of External Resources</h3>

<p>Many Annotations involve part of an External Web Resource, rather than its entirety. In the Web [[!webarch]], segments of resources are identified using <a>IRIs</a> with a fragment component that at the same time both describes how to extract the segment of interest from the resource, and identifies the extracted content.  For simple Annotations, it is valuable to be able to use these IRIs with a fragment component as the identifier for either Body or Target.
</p>

<p><b>Example Use Case:</b> %%name%% wants to describe a particular region of an image.  She highlights that area in her client and types in the description. Her client then constructs an IRI with an appropriate fragment component as the target.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
  <tr><td>id</td><td>Property</td><td>The IRI that identifies the Body or Target resource.
<br/>Bodies or Targets which are External Web Resources MUST have exactly 1 <code>id</code> with the value of the resource's IRI, and that IRI MAY have a fragment component.
  </td></tr>
</table>

<div class="note">Note that other properties of resources such as <code>type</code>, <code>format</code> and <code>language</code>, plus those described in the <a href="#other-properties">Other Properties</a> section below, can be applied to the segment of the resource, just like for the full resource.</div>

<p>
  It is important to be aware of the consequences of using an IRI with a fragment component, and the restrictions that using them places on implementations.

<ul>
<li>Fragments are defined with respect to individual media types. For example, HTML has a specific set of semantics regarding the meaning of the fragment part of the IRI.</li>
<li>Not every media type has a fragment specification.  For example, Office documents might have a media-type and be published on the web, but not have semantics associated with the fragment part of the IRI.</li>
<li>Even if a media type does have a fragment definition, it is often not possible to describe the segment of interest sufficiently precisely.  For example, fragments for HTML cannot be used to describe an arbitrary range of text.</li>
<li>It is not possible to determine with certainty what is being identified without knowing the media type, as the same fragment string might be possible in different specifications.  For example, the same fragment string could identify either a rectangular area in an image, or a strangely named section of an HTML document.</li>
<li>IRIs with a fragment component are not compatible with other methods of describing the segment more specifically. For example, it is not possible to describe how to retrieve the correct representation, add style information, or associate a role with the resource, using such IRIs. The method to accomplish these requirements is described in the <a href="#fragment-selector">Fragment Selector</a> portion of the <a href="#specific-resources">Specific Resources</a> section.</li>
<li>As IRIs are considered to be opaque strings, annotation systems may not discover annotations with fragment components when searching by means of the IRI without the fragment.  For example, an Annotation with the Target
 <code>http://example.com/image.jpg#xywh=1,1,1,1</code> would not be discovered in a simple search for
 <code>http://example.com/image.jpg</code>, even though it is part of it.</li>
</ul>

For more information regarding the use of IRIs with fragment components, please see the Best Practices for Fragment Identifiers and Media Type Definitions [[!fragid-best-practices]].
</p>

<h4>Example</h4>

<pre class="example highlight" title="IRIs with Fragment Components">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/description1",
  "target": {
    "id": "http://example.com/image1#xywh=100,100,300,300",
    "type": "Image",
    "format": "image/jpeg"
  }
}
</pre>
</section>

<section>
  <h3>Embedded Textual Body</h3>

<p>In many situations, the Body of the Annotation will be in a text format, and created at the same time as the Annotation without a separate IRI. In these cases, the Body's text can be included as part of the Annotation to avoid having to interact with multiple systems.  The Body may also have the features of External Web Resources, including especially the language of the text and the format that it is conveyed in.</p>

<p><b>Example Use Case:</b> %%name%% writes a comment about how much she likes an image on a photo sharing website.  Her client creates an Annotation with the comment embedded within it, and adds that it is in French and formatted using HTML.</p>

<h4>Model</h4>

The fundamental features of a Textual Body are:

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>id</td><td>Property</td><td>The IRI that identifies the Textual Body.
<br/>The Body MAY have exactly 1 IRI that identifies it.</td></tr>
<tr><td>type</td><td>Relationship</td><td>The type of the Textual Body resource.
  <br/>The Body SHOULD have the <code>TextualBody</code> class, and MAY have other classes.</td></tr>
<tr><td>TextualBody</td><td>Class</td><td>A class assigned to the Body for embedding textual resources within the Annotation.
<br/>The Body SHOULD have the <code>TextualBody</code> class.</td></tr>
<tr><td>value</td><td>Property</td><td>The character sequence of the content of the Textual Body.<br/>
There MUST be exactly 1 <code>value</code> property associated with the TextualBody.</td></tr>
</table>

<p>Systems SHOULD assume that Textual Bodies have the <code>Text</code> class, described in <a href="#classes">Classes</a> above, even if it is not explicitly included in the <code>type</code> property. </p>

<p>The properties of External Web Resources, such as <code>language</code> and <code>format</code> also apply to embedded Textual Body resources.</p>

<h4>Example</h4>

<pre class="example highlight" title="Textual Body">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": {
    "type" : "TextualBody",
    "value" : "&lt;p&gt;j'adore !&lt;/p&gt;",
    "format" : "text/html",
    "language" : "fr"
  },
  "target": "http://example.org/photo1"
}
</pre>
</section>

<section>
<h3>String Body</h3>

<p>
The simplest type of Body is a plain text string, without additional information or properties.  This type of Body is useful for the simplest of Annotations only, and is NOT RECOMMENDED for uses where the Body may need to be referred to from outside of the Annotation.
</p>

<p><b>Example Use Case</b> %%name%% wants to create a quick Annotation from a simple, command line client.  She creates the JSON serialization in a text file and sends it to her Annotation server to maintain.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>bodyValue</td><td>Property</td><td>The string value of the Body of the Annotation.
<br/>There MAY be exactly 1 <code>bodyValue</code> for an Annotation, and the value MUST conform to the requirements below.  If the <code>bodyValue</code> property is present, then the <code>body</code> relationship MUST NOT also be present.</td></tr>
</table>

<p>
There are several restrictions on when this form may be used and how it is to be interpreted.
<br/>The string Body:
<ul>
  <li>MUST be a single <code>xsd:string</code> and the data type MUST NOT be expressed in the serialization.</li>
  <li>MUST NOT have a language associated with it.</li>
  <li>MUST be interpreted as if it were the value of the <code>value</code> property of a Textual Body.</li>
  <li>MUST be interpreted as if the Textual Body resource had a <code>format</code> property with the value <code>text/plain</code>.</li>
  <li>MUST NOT have the value of other properties of the Textual Body inferred from similar properties on the Annotation resource.</li>
</ul>
</p>

<p>If any of the interpretations above are not correct, then the <a href="#embedded-textual-body"><code>TextualBody</code> construction</a> MUST be used instead.</p>

<div class="note">Systems MAY rewrite Annotations to instead use the <a href="#embedded-textual-body"><code>TextualBody</code> construction</a>, rather than maintaining the <code>bodyValue</code> form.  The <code>TextualBody</code> construction is preferred, as language and format information are important for clients processing the Annotation.</div>

<h4>Example</h4>

<pre class="example highlight" title="String Body">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "bodyValue": "Comment text",
  "target": "http://example.org/target1"
}
</pre>

Which is equivalent to:

<pre class="example highlight" title="Equivalent Textual Body">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": {
    "type": "TextualBody",
    "value": "Comment text",
    "format": "text/plain"
  },
  "target": "http://example.org/target1"
}
</pre>

</section>

<section>
<h3>Cardinality of Bodies and Targets</h3>

<p>Some Annotations may not have a Body at all, such as a simple highlight or bookmark without any accompanying text.  It is also possible for an Annotation to have multiple Bodies and/or Targets.  In this case, each Body is considered to be equally related to each Target individually, rather than to the set of all of the Targets.</p>

<p><b>Example Use Case:</b> %%name%% highlights a particular region of her ebook in green and, knowing what such a highlight means, she does not give a comment.  Her client associates a stylesheet with the Annotation, and does not create a body at all.</p>

<p><b>Example Use Case:</b> %%name%% associates a tag and a description with two images using a single annotation.</p>

<h4>Model</h4>

<p>The <code>body</code> relationship is omitted when there is no Body for the Annotation.</p>
<p>The <code>body</code> and/or <code>target</code> relationships of the Annotation may be arrays rather than a single object. The values may be either strings containing the IRI of the resource or objects.</p>

<h4>Example</h4>

<pre class="example highlight" title="Annotations without a Body">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "target": "http://example.org/ebook1"
}
</pre>

<pre class="example highlight" title="Multiple Bodies or Targets">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": [
    "http://example.org/description1",
    {
      "type": "TextualBody",
      "value": "tag1"
    }
  ],
  "target": [
    "http://example.org/image1",
    "http://example.org/image2"
  ]
}
</pre>
</section>

<section id="choice-between-bodies">
  <h3>Choice Between Bodies</h3>

  <p>A Choice has an ordered list of resources from which an application should select only one to process or display. The order is given from the most preferable to least preferable, according to the Annotation's creator or publisher.</p>

<p><b>Example Use Case:</b> %%name%% writes up her discussion of a particular website in both French and English.  As the two posts are equivalent, there is no need to display both, and instead she wants French speakers to see the French comment, and everyone else to see the English version.  Her client creates as Choice with the English comment listed first.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>id</td><td>Property</td><td>The IRI that identifies the Choice.
<br/>The Choice MAY have exactly 1 IRI that identifies it.</td></tr>
<tr><td>type</td><td>Relationship</td><td>The type of the resource.
  <br/>The Choice MUST have exactly 1 <code>type</code>, and it MUST be the <code>CHOICE</code> class.</td></tr>
<tr><td>Choice</td><td>Class</td><td>A construction that conveys to a consuming application that it SHOULD select one of the listed resources to display to the user, and not render all of them.</td></tr>
<tr><td>items</td><td>Relationship</td><td>A list of resources to choose from, with the default option listed first.</td></tr>
</table>

<div class="note">Clients MAY use any algorithm to determine which resource to choose, and SHOULD make use of the information present to do so automatically, but MAY present a list and require the user to make the decision.</div>

<h4>Example</h4>

<pre class="example highlight" title="Choice">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": {
    "type": "Choice",
    "items": [
      {
        "id": "http://example.org/note1",
        "language": "en"
      },
      {
        "id": "http://example.org/note2",
        "language": "fr"
      }
    ]
  },
  "target": "http://example.org/website1"
}
</pre>
</section>
</section>  <!-- Bodies and Targets -->

<section>
<h2>Other Properties</h2>

It is often important to have information about the context in which the Annotation and any External Web Resources were created, modified and used.  In particular,

<ul>
  <li>When was the resource created, modified or generated</li>
  <li>Who created, modified or generated the serialized form of the Annotation or other resource, and who is it intended for</li>
  <li>Why was the resource included in the annotation, or the annotation created</li>
  <li>What other identities the resource has</li>
  <li>How can the resource be used, according to its rights and licensing</li>
</ul>

<div class="note">
Beyond the features described in this section, other properties MAY be added features of the Annotation or any resource in the model.  Please see the Extension section of [[!annotation-vocab]] for more information about how to do this.</div>

<section>
<h3>Lifecycle Information</h3>

<p>
  The person, organization or machine responsible for the Annotation or referenced resource deserves credit for their contribution, and the time at which those resources are created is useful for display ordering and filtering out old, potentially irrelevant content. The creator of the Annotation is also useful for determining the trustworthiness of the Annotation. The software used to create and serialize the Annotation, along with when that activity occurred, is useful for both advertising and debugging issues.
</p>

<p><b>Example Use Case:</b> %%name%% writes a review of a restaurant online, and wishes to be associated with that review so that her friends know that it was her review and can trust it.  Her client adds her account's identity, and its own identity, to the Annotation and the appropriate timestamps for when the resources were created.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>

<tr><td>creator</td><td>Relationship</td><td>The agent responsible for creating the resource.  This may be either a human, an organization or a software agent.
<br/>There SHOULD be exactly 1 <code>creator</code> relationship for Annotation and Body, but MAY be 0 or more than 1, as the resource's creator may wish to remain anonymous, or multiple agents may have worked together on it. The relationships MAY be associated with other resources.</td></tr>
<tr><td>created</td><td>Property</td><td>The time at which the resource was created.
<br/>There SHOULD be exactly 1 <code>created</code> property for Annotation and Body, and MUST NOT be more than 1. The property MAY be associated with other resources. The datetime MUST be a <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">xsd:dateTime</a> with the UTC timezone expressed as "Z".</td></tr>
<tr><td>generator</td><td>Relationship</td><td>The agent responsible for generating the serialization of the Annotation.
<br/>There MAY be 0 or more <code>generator</code> relationships per Annotation</td></tr>
<tr><td>generated</td><td>Property</td><td>The time at which the Annotation serialization was generated.
<br/>There MAY be exactly 1 <code>generated</code> property per Annotation, and MUST NOT be more than 1.
The datetime MUST be a <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">xsd:dateTime</a> with the UTC timezone expressed as "Z".</td></tr>
<tr><td>modified</td><td>Property</td><td>The time at which the resource was modified, after creation.
<br/>There MAY be exactly 1 <code>modified</code> property for Annotation and Body, and MUST NOT be more than 1. The property MAY be associated with other resources. The datetime MUST be a <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">xsd:dateTime</a> with the UTC timezone expressed as "Z".</td></tr>
</table>

<h4>Example</h4>

<pre class="example highlight" title="Lifecycle Information">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "creator": "http://example.org/user1",
  "created": "2015-01-28T12:00:00Z",
  "modified": "2015-01-29T09:00:00Z",
  "generator": "http://example.org/client1",
  "generated": "2015-02-04T12:00:00Z",
  "body": {
    "id": "http://example.net/review1",
    "creator": "http://example.net/user2",
    "created": "2014-06-02T17:00:00Z"
  },
  "target": "http://example.com/restaurant1"
}
</pre>
</section>

<section>
<h3>Agents</h3>

<p>
More information about the agents involved in the creation of an Annotation is normally required beyond an IRI that identifies them.  This includes whether they are an individual, a group or a piece of software and properties such as real name, account nickname, and email address.
</p>

<p><b>Example Use Case:</b> %%name%% wants to submit an Annotation to a system that does not manage her identity, and would like a pseudonym to be displayed.  Her client adds this information to the Annotation to send to the service.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>id</td><td>Property</td><td>The IRI that identifies the agent.
<br/>An Agent SHOULD have exactly 1 IRI that identifies it, and MUST NOT have more than 1.</td></tr>
<tr><td>type</td><td>Relationship</td><td>The type of the Agent.
  <br/>An Agent SHOULD have 1 or more classes, from those listed below.</td></tr>
<tr><td>Person</td><td>Class</td><td>The class for a human agent.</td></tr>
<tr><td>Organization</td><td>Class</td><td>The class for an organization, as opposed to an individual.</td></tr>
<tr><td>Software</td><td>Class</td><td>The class for a software agent, such as a user's client or a machine learning system that creates Annotations.</td></tr>
<tr><td>name</td><td>Property</td><td>The name of the agent.
<br/>Each agent SHOULD have exactly 1 <code>name</code> property, and MAY have 0 or more.</td></tr>
<tr><td>nickname</td><td>Property</td><td>The nickname of the agent.
<br/>Each agent SHOULD have exactly 1 <code>nickname</code> property, and MAY have 0.</td></tr>
<tr><td>email</td><td>Relationship</td><td>The email address associated with the agent, using the mailto: IRI scheme [[!rfc6086]].
<br/>Each agent MAY have 1 or more <code>email</code> addresses.</td></tr>
<tr><td>email_sha1</td><td>Property</td><td>The text representation of the result of applying the sha1 algorithm to the email IRI of the agent, including the 'mailto:' prefix and no whitespace.  This allows the mail address to be used as an identifier without publishing the address publicly.<br/>
Each agent MAY have 1 or more values in the <code>email_sha1</code> property.</td></tr>
<tr><td>homepage</td><td>Relationship</td><td>The home page for the agent.<br/>Each agent MAY have 1 or more home pages.</td></tr>

</table>

<h4>Example</h4>

<pre class="example highlight" title="Agents">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "creator": {
    "id": "http://example.org/user1",
    "type": "Person",
    "name": "My Pseudonym",
    "nickname": "pseudo",
    "email_sha1": "58bad08927902ff9307b621c54716dcc5083e339"
  },
  "generator": {
    "id": "http://example.org/client1",
    "type": "Software",
    "name": "Code v2.1",
    "homepage": "http://example.org/client1/homepage1"
  },
  "body": "http://example.net/review1",
  "target": "http://example.com/restaurant1"
}
</pre>
</section>

<section>
<h3>Intended Audience</h3>

<p>Beyond the agents that are associated with the creation and management of the Annotation and other resources, it is also useful to know the audience or class of consuming agent that the resource is intended for.  This allows for the roles (such as teacher versus student) or properties of the class (such as a suggested age range) of the intended audience to be recorded.</p>

<p><b>Example Use Case:</b> %%name%% writes some notes about using a particular textbook to teach a class.  She adds that the intended audience of the Annotation is teachers (who are using the textbook), to distinguish from other Annotations that might have an audience of the students (who are also using the textbook, but to learn from).</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>id</td><td>Property</td><td>The IRI that identifies the Audience.
  <br/>There MAY be exactly 1 IRI given that identifies the Audience.</td></tr>
<tr><td>type</td><td>Relationship</td><td>The type of the Audience, from the schema.org class structure.<br/>The Audience SHOULD have 1 or more <code>type</code>s and they <code>SHOULD</code> come from the schema.org class structure.</td></tr>
<tr><td>audience</td><td>Relationship</td><td>The relationship between an Annotation and its intended Audience.
<br/>There MAY be 0 or more Audiences for each Annotation.</td></tr>
</table>

<p>Further properties that describe the audience are used from <a href="http://schema.org/Audience">schema.org's Audience</a> classes.  The properties and class names MUST be prefixed in the JSON with <code>schema:</code> to ensure that they are uniquely distinguished from any other properties or classes.</p>

<p>
The use of <code>audience</code> does not imply nor enable any access restriction to prevent the annotation from being seen.  Systems SHOULD use the information for filtering the display of Annotations based on their knowledge of the user, and not assume that the Annotation or other resources will require authentication and authorization.
</p>

<h4>Example</h4>

<pre class="example highlight" title="Audience">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "audience": {
    "id": "http://example.edu/roles/teacher",
    "type": "schema:EducationalAudience",
    "schema:educationalRole": "teacher"
  },
  "body": "http://example.net/classnotes1",
  "target": "http://example.com/textbook1"
}
</pre>
</section>

<section>
  <h3>Accessibility of Content</h3>

<p>Access to information is recognized as a basic human right by the United Nations. The Web is able to remove barriers to communication and interaction regardless of various physical impediments. This supports social inclusion, but also increases the potential audience of the information.  For resources that are used as the Body or Target of an Annotation, it is valuable to record the features of that resource that provide easier access for users with various and diverse ranges of ability.</p>

<p><b>Example Use Case:</b> %%name%% has very limited ability to hear sound, and prefers to read captions when interacting with videos. She uses her annotation client to make a comment on such a video, and to help others in the same situation, the client includes that the video has this accessibility feature.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>accessibility</td><td>Property</td><td>One or more strings from an enumerated list of values that each describes an accessibility feature that the resource has.
<br/>There MAY be 0 or more accessibility features listed for each Body or Target resource.</td></tr>
</table>

<p class="note">
The current list of values is referenced from the <a href="http://schema.org/accessibilityFeature">schema.org description</a> of the <code>accessibilityFeature</code> property.
</p>

<h4>Example</h4>
<pre class="example highlight" title="Accessibility">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "motivation": "commenting",
  "body": "http://example.net/comment1",
  "target": {
    "id": "http://example.com/video1",
    "type": "Video",
    "accessibility": "captions"
  }
}
</pre>
</section>


<section>
<h3>Motivation and Purpose</h3>

<p>In many cases it is important to understand the reasons why the Annotation was created, or why the Textual Body was included in the Annotation, not just the times and agents involved.  These reasons are provided by declaring the motivation for the Annotation's creation or the purpose for the inclusion of the Textual Body in the Annotation; the "why" rather than the "who" and "when" described in the previous sections.</p>

<p><b>Example Use Case:</b> %%name%% annotates a resource intending to bookmark it for future reference, and provides a description and a tag to make it easier to find again. Her client adds the right motivations to the Annotation and the Textual Body resources to capture this.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>motivation</td><td>Relationship</td><td>The relationship between an Annotation and a Motivation.
<br/>There SHOULD be exactly 1 <code>motivation</code> for each Annotation, and MAY be 0 or more than 1.</td></tr>
<tr><td>purpose</td><td>Relationship</td><td>The reason for the inclusion of the Textual Body within the Annotation.
<br/>There MAY be 0 or more <code>purpose</code>s associated with a <code>TextualBody</code>.</td></tr>

<tr><td>Motivation</td><td>Class</td><td>The Motivation for an Annotation is a reason for its creation, and might include things like Replying to another annotation, Commenting on a resource, or Linking to a related resource. </td></tr>
<tr><th colspan="3"><strong>Motivations</strong></th></tr>
<tr><td>assessing</td><td>Instance</td><td> The motivation for when the user intends to assess the target resource in some way, rather than simply make a comment about it. For example to write a review or assessment of a book, assess the quality of a dataset, or provide an assessment of a student's work.</td></tr>
<tr><td>bookmarking</td><td>Instance </td><td> The motivation for when the user intends to create a bookmark to the Target or part thereof. For example an Annotation that bookmarks the point in a text where the reader finished reading.</td></tr>
<tr><td>classifying</td><td>Instance </td><td> The motivation for when the user intends to classify the Target as something. For example to classify an image as a portrait.</td></tr>
<tr><td>commenting</td><td>Instance </td><td> The motivation for when the user intends to comment about the Target. For example to provide a commentary about a particular PDF document.</td></tr>
<tr><td>describing</td><td>Instance </td><td> The motivation for when the user intends to describe the Target, as opposed to (for example) a comment about it.  For example describing the above PDF's contents, rather than commenting on their accuracy.</td></tr>
<tr><td>editing</td><td>Instance </td><td> The motivation for when the user intends to request a change or edit to the Target resource. For example an Annotation that requests a typo to be corrected. </td></tr>
<tr><td>highlighting</td><td>Instance </td><td> The motivation for when the user intends to highlight the Target resource or segment of it.  For example to draw attention to the selected text that the annotator disagrees with.</td></tr>
<tr><td>identifying</td><td>Instance</td><td>The motivation for when the user intends to assign an identity to the Target.  For example to associate the IRI that identifies a city with a mention of the city in a web page.</td></tr>
<tr><td>linking</td><td>Instance</td><td>The motivation for when the user intends to link to a resource related to the Target.</td></tr>
<tr><td>moderating</td><td>Instance </td><td> The motivation for when the user intends to assign some value or quality to the Target. For example annotating an Annotation to moderate it up in a trust network or threaded discussion.</td></tr>
<tr><td>questioning</td><td>Instance </td><td> The motivation for when the user intends to ask a question about the Target. For example to ask for assistance with a particular section of text, or question its veracity.</td></tr>
<tr><td>replying</td><td>Instance </td> <td> The motivation for when the user intends to reply to a previous statement, either an Annotation or another resource. For example providing the assistance requested in the above.</td></tr>
<tr><td>tagging</td><td>Instance </td><td> The motivation for when the user intends to associate a tag with the Target.</td></tr>

</table>

<div class="note">
For more information about how Motivations can be inter-related and new Motivations created, please see the Annotation Vocabulary document [[!annotation-vocab]].  <a href="#purpose-for-external-web-resources">Section 4.1</a> describes how to associate a Motivation with and external web resource.
</div>

<h4>Example</h4>

<pre class="example highlight" title="Motivation and Purpose">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "motivation": "bookmarking",
  "body": [
    {
      "type": "TextualBody",
      "value": "readme",
      "purpose": "tagging"
    },
    {
      "type": "TextualBody",
      "value": "A good description of the topic that bears further investigation",
      "purpose": "describing"
    }
  ],
  "target": "http://example.com/page1"
}
</pre>
</section>

<section>
<h3>Rights Information</h3>

<p>It is common practice to associate a license or rights statement with a resource, in order to describe the conditions under which it may be used.  This allows the user to make appropriate use of the resource, as well as allowing some automated systems to confirm that the usage is permitted.  As the Annotation, Bodies, and Targets might be created with different licences or rights, each can be described separately.  The rights of resources other than the Annotation itself are considered informative hints to a consuming client application.</p>

<p><b>Example Use Case:</b> %%name%% writes a review of a product and wishes to be known as the author of the review, however does not mind how the Annotation that relates the review and the product together is used.  She asserts these two separate rights statements with the Annotation and Body individually. She does not know the rights asserted on the target resource, so does not specify any.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>rights</td><td>Relationship</td><td>The relationship between an Annotation, Body or Target and a Web Resource that contains the rights statement or license under which the resource may be used.
<br/>There MAY be at exactly 0 or more <code>rights</code> statements or licenses linked from each resource, and the value MUST be an IRI.</td></tr>
</table>

<h4>Example</h4>

<pre class="example highlight" title="Rights">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "rights": "https://creativecommons.org/publicdomain/zero/1.0/",
  "body": {
    "id": "http://example.net/review1",
    "rights": "http://creativecommons.org/licenses/by-nc/4.0/"
  },
  "target": "http://example.com/product1"
}
</pre>
</section>

<section>
<h3>Other Identities</h3>

<p>In a massively distributed system such as the Web, information is often copied.  In order to track the provenance of the Annotation and other related resources, it is possible to record additional IRIs that also identify the resource.  These may be dereferencable "permalinks", identities assigned by a client offline without any knowledge of the web, or simply the location where the current harvesting system discovered the resource.</p>

<p><b>Example Use Case:</b> %%name%% creates an Annotation and sends it to multiple systems to maintain, one personal and one public.  She wants to ensure that the copies can be aligned, and so she sets a UUID as the canonical IRI, allowing the service to assign an HTTP IRI for it.  A subsequent system then harvests the public copy, maintaining the canonical UUID as discovered, then moves the original HTTP IRI to <code>via</code>, replacing it with an IRI under its control. </p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>canonical</td><td>Relationship</td><td>The relationship between an Annotation, Body or Target and the IRI that SHOULD be used to track its identity, regardless of where it is made accessible.  If this property is set, then systems MUST NOT change or delete it.  Systems SHOULD NOT assign a canonical IRI without prior agreement if one is not present, as the Annotation could already have a canonical IRI elsewhere.
<br/>There MAY be exactly 1 <code>canonical</code> IRI for each resource.</td></tr>
<tr><td>via</td><td>Relationship</td><td>The relationship between an Annotation, Body or Target and the IRI of where that resource was obtained from by the system that is making it available.
<br/>There MAY be 0 or more IRIs provided in <code>via</code> for each resource.</td></tr>
</table>

<h4>Example</h4>

<pre class="example highlight" title="Other Identities">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "canonical": "urn:uuid:dbfb1861-0ecf-41ad-be94-a584e5c4f1df",
  "via": "http://other.example.org/anno1",
  "body": {
    "id": "http://example.net/review1",
    "rights": "http://creativecommons.org/licenses/by/4.0/"
  },
  "target": "http://example.com/product1"
}
</pre>
</section>

</section> <!-- /Metadata -->
</section> <!-- /Annotation -->

<section>
<h2>Specific Resources</h2>

<p>
While it is possible using only the constructions described above to create Annotations that reference parts of resources by using IRIs with a fragment component, there are many situations when this is not sufficient.  For example, even a simple circular region of an image, or a diagonal line across it, are not possible.  Selecting an arbitrary span of text in an HTML page, perhaps the simplest annotation concept, is also not supported by fragments.  Furthermore, there are non-segment use cases that require a client to retrieve a specific state or representation of the resource, to style it in a particular way, to associate a role with the resource that is specific to the Annotation's use of it, or for the Annotation to only apply when the resource is used in a particular context.
</p>

<p>The Web Annotation Data Model uses a new type of resource to capture these Annotation-specific requirements: a SpecificResource.  The SpecificResource is used in between the Annotation and the Body or Target, as appropriate, to capture additional information about how it is used in the Annotation. The descriptions are typically referenced from the SpecificResource as separate entities and can be of various types to capture the different requirements.  For example, if the Target of the Annotation is a circular region of an image, then the SpecificResource is the circular region, it is described by a Selector, and is also associated with the source Image resource.</p>

<p>Specific Resources and Specifiers MAY be External Web Resources with their own IRIs, such as in the example for the <a href="#selectors">Selector</a> construction, however it is RECOMMENDED that they be included in the Annotation's representation to avoid requiring unnecessary network interactions to retrieve all of the information needed to process the Annotation.</p>

<p>
The types of additional specificity that are defined by this document:

<ul>
  <li><a href="#purpose-for-external-web-resources">Purpose:</a> Describe the purpose of including the source resource in the Annotation</li>
  <li><a href="#selectors">Selector:</a> Describe the desired segment of the source resource for the Annotation</li>
  <li><a href="#states">State:</a> Describe the desired representation of the source resource for the Annotation</li>
  <li><a href="#styles">Style:</a> Describe the style in which the source resource should be presented for the Annotation</li>
  <li><a href="#rendering-software">Rendering:</a> Describe the system used by the client for rendering the resource when the annotation was created</li>
  <li><a href="#scope-of-a-resource">Scope:</a> Describe the scope in which the source resource applies for the Annotation</li>
</ul>
</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>id</td><td>Property</td><td>The identity of the Specific Resource.
<br/>A Specific Resource MAY have exactly 1 IRI that identifies it.</td></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the Specific Resource.
  <br/>The Specific Resource SHOULD have the <code>SpecificResource</code> class.</td></tr>
<tr><td>SpecificResource</td><td>Class</td><td>The class for Specific Resources.
<br/>The <code>SpecificResource</code> class SHOULD be associated with a Specific Resource to be clear as to its role as a more specific region or state of another resource.</td></tr>
<tr><td>source</td><td>Relationship</td><td>The relationship between a Specific Resource and the resource that it is a more specific representation of.
<br/>There MUST be exactly 1 <code>source</code> relationship associated with a Specific Resource.  The source resource MAY be described in detail, as defined above, or be just the resource's IRI.
</td></tr>
</table>

<p>The same Specific Resource and Specifier classes are used for both Target and Body. The examples in this section only use one of these, however the same model applies for both.</p>

<section>
  <h3>Purpose for External Web Resources</h3>

<p>As well as Textual Bodies, External Web Resources may also be given a Motivation as to their inclusion within the Annotation.  This is done using the Specific Resource pattern, as the purpose specifies the way in which the resource is used in the context of the Annotation in the same way as a Selector describes the segment or a State describes the representation.</p>

<p><b>Example Use Case:</b> %%name%% wants to tag a photo with an identifier for a city, rather than just type the city's name which could be ambiguous. Her client uses a well-known IRI for the city having done a search for it, and creates a Specific Resource to manage that purpose assignment.</p>


<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>purpose</td><td>Relationship</td><td>The reason for including the Web Resource in the Annotation.
<br/>There MAY be 0 or more Motivations associated with the SpecificResource using <code>purpose</code>.</td></tr>
</table>


<h4>Example</h4>

<pre class="example highlight" title="Resource with Purpose">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": {
    "type": "SpecificResource",
    "purpose": "tagging",
    "source": "http://example.org/city1"
  },
  "target": {
    "id": "http://example.org/photo1",
    "type": "Image"
  }
}
</pre>
</section>

<section>
<h3>Selectors</h3>

<p>Many Annotations refer to part of a resource, rather than all of it, as the Target. We call that part of the resource a Segment (of Interest). A Selector is used to describe how to determine the Segment from within the Source resource.  The nature of the Selector will be dependent on the type of resource, as the methods to describe Segments from various media-types will differ.  Multiple Selectors can be given to describe the same Segment in different ways in order to maximize the chances that it will be discoverable later, and that the consuming user agent will be able to use at least one of the Selectors. </p>

<p><b>Example Use Case:</b> %%name%% wants to associate a selection of text in a web page, with a slice of a dataset.  She selects both using her client, and creates the Annotation with a SpecificResource that has a Selector for each of the Body and the Target.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>selector</td><td>Relationship</td><td>The relationship between a Specific Resource and a Selector.
<br/>There MAY be 0 or more <code>selector</code> relationships associated with a Specific Resource. Multiple Selectors SHOULD select the same content, however some Selectors will not have the same precision as others. Consuming user agents MUST pick one of the described segments, if they are different.
</td></tr>
</table>

<h4>Example</h4>

<pre class="example highlight" title="Selectors">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": {
    "source": "http://example.org/page1",
    "selector": "http://example.org/paraselector1"
  },
  "target": {
    "source": "http://example.com/dataset1",
    "selector": "http://example.org/dataselector1"
  }
}
</pre>

<section>
<h3>Fragment Selector</h3>

<p>As the most well understood mechanism for selecting a Segment is to use the fragment part of an IRI defined by the representation's media type, it is useful to allow this as a description mechanism via a Selector.  This allows existing and future fragment specifications to be used with Specific Resources in a consistent way.  To be clear about which fragment type is being used, the Selector may refer to the specification that defines it.</p>

<p><b>Example Use Case:</b> %%name%% wants to associate part of a video as the description of an image.  She selects the time range within the video and clicks that it is describing the target.  Her client then creates the Annotation using a SpecificResource with a FragmentSelector and the <code>describing</code> Motivation. </p>


<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the Selector.<br/>FragmentSelectors MUST have exactly 1 <code>type</code> and the value MUST be <code>FragmentSelector</code>.</td></tr>
<tr><td>FragmentSelector</td><td>Class</td><td>A resource which describes the Segment through the use of the fragment component of an IRI.</td></tr>
<tr><td>value</td><td>Property</td><td>The contents of the fragment component of an IRI that describes the Segment.<br/>
The FragmentSelector MUST have exactly 1 <code>value</code> property.</td></tr>
<tr><td>conformsTo</td><td>Relationship</td><td>The relationship between the FragmentSelector and the specification that defines the syntax of the IRI fragment in the <code>value</code> property.
  <br/>The Fragment Selector SHOULD have exactly 1 <code>conformsTo</code> link to the specification that defines the syntax of the fragment and MUST NOT have more than 1.</td></tr>
</table>

<p>It is RECOMMENDED to use <code>FragmentSelector</code> as a consistent method compatible with other means of describing SpecificResources, rather than using the IRI with a fragment directly. Consuming applications SHOULD be aware of both.</p>

<p class="informative">
The following IRIs are some of the specifications that define the semantics of fragments, and hence may be used with the <code>conformsTo</code> relationship.  Other IRIs MAY also be used.
<table class="model">
<tr><th>Name</th><th>Fragment Specification</th><th>Description</th></tr>
<tr><td>HTML</td><td>http://tools.ietf.org/rfc/rfc3236</td><td>[[!rfc3236]] Example: <code>namedSection</code> </td></tr>
<tr><td>PDF</td><td>http://tools.ietf.org/rfc/rfc3778</td><td>[[!rfc3778]] Example: <code>page=10&amp;viewrect=50,50,640,480</code></td></tr>
<tr><td>Plain Text</td><td>http://tools.ietf.org/rfc/rfc5147</td><td>[[!rfc5147]] Example: <code>char=0,10</code></td></tr>
<tr><td>XML</td><td>http://tools.ietf.org/rfc/rfc3023</td><td>[[!rfc3023]] Example: <code>xpointer(/a/b/c)</code></td></tr>
<tr><td>RDF/XML</td><td>http://tools.ietf.org/rfc/rfc3870</td><td>[[!rfc3870]] Example: <code>namedResource</code></td></tr>
<tr><td>CSV</td><td>http://tools.ietf.org/rfc/rfc7111</td><td>[[!rfc7111]] Example: <code>row=5-7</code></td></tr>
<tr><td>Media</td><td>http://www.w3.org/TR/media-frags/</td><td>[[!media-frags]] Example: <code>xywh=50,50,640,480</code></td></tr>
<tr><td>SVG</td><td>http://www.w3.org/TR/SVG/</td><td>[[!SVG11]] Example: <code>svgView(viewBox(50,50,640,480))</code></td></tr>
<tr><td>EPUB3</td><td>http://www.idpf.org/epub/linking/cfi/epub-cfi.html</td><td>[[!cfi]] Example: <code>epubcfi(/6/4[chap01ref]!/4[body01]/10[para05]/3:10)</code></td></tr>
</table>
</p>

<div class="note">
The IRI that uses the fragment may be reconstructed by concatenating the <code>source</code>, a <code>#</code>, and the <code>value</code>. For example, the IRI from the example below would be <code>http://example.org/video1#t=30,60</code>.
</div>

<h4>Example</h4>

<pre class="example highlight" title="Fragment Selector">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": {
    "source": "http://example.org/video1",
    "purpose": "describing",
    "selector": {
      "type": "FragmentSelector",
      "conformsTo": "http://www.w3.org/TR/media-frags/",
      "value": "t=30,60"
    }
  },
  "target": "http://example.org/image1"
}
</pre>
</section>


<section>
  <h3>CSS Selector</h3>

<p>One of the most common ways to select elements in the HTML Document Object Model is to use CSS Selectors [[!CSS3-selectors]].  CSS Selectors allow for a wide variety of well supported ways to describe the path to an element in a web page, and thus cover many of the basic use cases for Web Annotation.  Results are not defined for when a CSS Selector is applied to a representation that does not conform to the Document Object Model.</p>

<p>Note that CSS may also be used for <a href="#styles">styling</a> a resource within an annotation. This class is specifically to re-use the CSS Selector mechanism to select a segment of a resource that conforms to the Document Object Model.</p>

<p><b>Example Use Case:</b> %%name%% selects a paragraph in a web page that she wishes to write a note about.  Her client calculates a CSS path that cleanly identifies that element and adds it to the annotation.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the Selector.<br/>CssSelectors MUST have exactly 1 <code>type</code> and the value MUST be <code>CssSelector</code>.</td></tr>
<tr><td>CssSelector</td><td>Class</td><td>The type of the CSS Selector resource.
  <br/>CSS Selectors MUST have this class associated with them.</td></tr>
<tr><td>value</td><td>Property</td><td>The CSS selection path to the Segment.
<br/>There MUST be exactly 1 <code>value</code> associated with a CSS Selector.</td></tr>
</table>

<div class="note">
Implementers SHOULD use only commonly supported features of CSS that directly contribute to selection of an element or content, rather than styling or transformation, in order to maximize interoperability between systems.
</div>

<h4>Example</h4>

<pre class="example highlight" title="CSS Selector">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/note1",
  "target": {
    "source": "http://example.org/page1.html",
    "selector": {
      "type": "CssSelector",
      "value": "#elemid > .elemclass + p"
    }
  }
}
</pre>
</section>

<section>
  <h3>XPath Selector</h3>

<p>Another common method of selecting elements and content within a resource that supports the Document Object Model (DOM), such as documents in XML or HTML, is to use an XPath selection [[!DOM-Level-3-XPath]].  XPath allows a great deal of flexibility when describing the path through the structure to the selected content.  Results are not defined for when an XPath Selector is applied to a representation that does not conform to the DOM.</p>

<div class="note">
Implementers should note that the <a href="https://www.w3.org/TR/html5/syntax.html#optional-tags">HTML5 specification</a> allows parsers to add elements into the DOM that are considered to be missing. XPaths SHOULD be constructed to include these elements, rather than from the element structure in the document.
</div>

<p><b>Example Use Case:</b> %%name%% selects a span within a table in an HTML page and writes a note about the content.  To refer explicitly to this element, her client carefully constructs an XPath to identify it as the target of the Annotation.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the Selector.<br/>XPath Selectors MUST have exactly 1 <code>type</code> and the value MUST be <code>XPathSelector</code>.</td></tr>
<tr><td>XPathSelector</td><td>Class</td><td>The type of the XPath Selector resource.
  <br/>XPath Selectors MUST have this class associated with them.</td></tr>
<tr><td>value</td><td>Property</td><td>The xpath to the selected segment.
<br/>There MUST be exactly 1 <code>value</code> associated with an XPath Selector.</td></tr>
</table>

<div class="note">
Implementers SHOULD use only commonly supported features of XPath that directly contribute to selection of an element or content in order to maximize interoperability between systems.
</div>

<h4>Example</h4>

<pre class="example highlight" title="XPath Selector">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/note1",
  "target": {
    "source": "http://example.org/page1.html",
    "selector": {
      "type": "XPathSelector",
      "value": "/html/body/p[2]/table/tr[2]/td[3]/span"
    }
  }
}
</pre>
</section>

<section>
<h3>Text Quote Selector</h3>

<p>This Selector describes a range of text by copying it, and including some of the text immediately before (a prefix) and after (a suffix) it to distinguish between multiple copies of the same sequence of characters.
</p>
<p>
For example, if the document were again "abcdefghijklmnopqrstuvwxyz", one could select "efg" by a prefix of "abcd", the match of "efg" and a suffix of "hijk".
</p>

<p><b>Example Use Case:</b> %%name%% selects a typo ('anotation') in a web page and adds a comment that it should be replaced with the correct spelling ('annotation').</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the Selector.<br/>Text Quote Selectors MUST have exactly 1 <code>type</code> and the value MUST be <code>TextQuoteSelector</code>.</td></tr>
<tr><td>TextQuoteSelector</td><td>Class</td><td>The class for a Selector that describes a textual segment by means of quoting it, plus passages before or after it.
<br/>The TextQuoteSelector MUST have this class associated with it.</td></tr>
<tr><td>exact</td><td>Property</td><td>A copy of the text which is being selected, after normalization.
<br/>Each TextQuoteSelector MUST have exactly 1 <code>exact</code> property. </td></tr>
<tr><td>prefix</td><td>Property</td><td>A snippet of text that occurs immediately before the text which is being selected.
<br/>Each TextQuoteSelector SHOULD have exactly 1 <code>prefix</code> property, and MUST NOT have more than 1.</td></tr>
<tr><td>suffix</td><td>Property</td><td>The snippet of text that occurs immediately after the text which is being selected.
<br/>Each TextQuoteSelector SHOULD have exactly 1 <code>suffix</code> property, and MUST NOT have more than 1.</td></tr>
</table>

<p>The selection of the text MUST be in terms of unicode code points (the "character number"), not in terms of code units (that number expressed using a selected data type). Selections SHOULD NOT start or end in the middle of a grapheme cluster. The selection MUST be based on the <a href="https://www.w3.org/International/questions/qa-visual-vs-logical">logical order</a> of the text, rather than the visual order, especially for bidirectional text. For more information about the character model of text used on the web, see [[!charmod]].</p>

<p>The text MUST be normalized before recording in the Annotation.  Thus HTML/XML tags SHOULD be removed, and character entities SHOULD be replaced with the character that they encode. Note that this does not affect the state of the content of the document being annotated, only the way that the content is recorded in the Annotation document.</p>

<p>If, after processing the prefix, exact, and suffix, the user agent discovers multiple matching text sequences, then the selection SHOULD be treated as matching all of the matches.</p>

<div class="note">If the content is under copyright or has other rights asserted on its use, then this method of selecting text is potentially dangerous. A user might select the entire text of the document to annotate, which would not be desirable to copy into the Annotation and share. For static texts with access and/or distribution restrictions, the use of the Text Position Selector is perhaps more appropriate.
</div>

<h4>Example</h4>

<pre class="example highlight" title="Text Quote Selector">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/comment1",
  "target": {
    "source": "http://example.org/page1",
    "selector": {
      "type": "TextQuoteSelector",
      "exact": "anotation",
      "prefix": "this is an ",
      "suffix": " that has some"
    }
  }
}
</pre>
</section>

<section>
<h3>Text Position Selector</h3>

<p>
This Selector describes a range of text by recording the start and end positions of the selection in the stream.  Position 0 would be immediately before the first character, position 1 would be immediately before the second character, and so on.  The start character is thus included in the list, but the end character is not.</p>
<p>
For example, if the document was "abcdefghijklmnopqrstuvwxyz", the start was 4, and the end was 7, then the selection would be "efg".
</p>

<p><b>Example Use Case:</b> %%name%% writes a review of an ebook that does not allow its content to be extracted and copied.  Her client describes the selection using its start and end position in the content.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the Selector.<br/>Text Position Selectors MUST have exactly 1 <code>type</code> and the value MUST be <code>TextPositionSelector</code>.</td></tr>
<tr><td>TextPositionSelector</td><td>Class</td><td>The class for a Selector which describes a range of text based on its start and end positions.
<br/>The TextPositionSelector MUST have this class associated with it.</td></tr>
<tr><td>start</td><td>Property</td><td>The starting position of the segment of text. The first character in the full text is character position 0, and the character is included within the segment.
<br/>Each TextPositionSelector MUST have exactly 1 <code>start</code> property, and the value MUST be a non-negative integer.</td></tr>
<tr><td>end</td><td>Property</td><td>The end position of the segment of text. The character is not included within the segment.
<br/>Each TextPositionSelector MUST have exactly 1 <code>end</code> property, and the value MUST be a non-negative integer.</td></tr>

</table>

<p>The text MUST be selected and normalized in the same way as for the Text Quote Selector before counting the number of characters to determine the start and end positions.</p>

<div class="note">
The use of this Selector does not require text to be copied from the Source document into the Annotation graph, unlike the Text Quote Selector, but is very brittle with regards to changes to the resource. Any edits or dynamically transcluded content may change the selection, and thus it is RECOMMENDED that a <a href="#states">State</a> be additionally used to help identify the correct representation.
</div>

<h4>Example</h4>

<pre class="example highlight" title="Text Position Selector">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/review1",
  "target": {
    "source": "http://example.org/ebook1",
    "selector": {
      "type": "TextPositionSelector",
      "start": 412,
      "end": 795
    }
  }
}
</pre>
</section>

<section>
<h3>Data Position Selector</h3>

<p>
Similar to the Text Position Selector, the Data Position Selector uses the same properties but works at the byte in bitstream level rather than the character in text level.</p>

<p><b>Example Use Case:</b> %%name%% writes comments about regions of online disk images for forensic purposes and describing emulation requirements.  Her client generates the start and end positions from the binary stream, rather than the more human readable display she is using.</p>


<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the Selector.<br/>Data Position Selectors MUST have exactly 1 <code>type</code> and the value MUST be <code>DataPositionSelector</code>.</td></tr>
<tr><td>DataPositionSelector</td><td>Class</td><td>The class for a Selector which describes a range of data based on its start and end positions within the byte stream.
<br/>The DataPositionSelector MUST have this class associated with it.</td></tr>
<tr><td>start</td><td>Property</td><td>The starting position of the segment of data. The first byte is character position 0.
<br/>Each DataPositionSelector MUST have exactly 1 <code>start</code> property.</td></tr>
<tr><td>end</td><td>Property</td><td>The end position of the segment of data. The last character is not included within the segment.
<br/>Each DataPositionSelector MUST have exactly 1 <code>end</code> property.</td></tr>
</table>

<h4>Example</h4>

<pre class="example highlight" title="Data Position Selector">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/note1",
  "target": {
    "source": "http://example.org/diskimg1",
    "selector": {
      "type": "DataPositionSelector",
      "start": 4096,
      "end": 4104
    }
  }
}
</pre>
</section>

<section>
<h3>SVG Selector</h3>

<p>An SvgSelector defines an area through the use of the Scalable Vector Graphics [[!SVG11]] standard.  This allows the user to select a non-rectangular area of the content, such as a circle or polygon by describing the region using SVG.  The SVG may be either embedded within the Annotation or referenced as an External Web Resource.</p>

<p>Note that the SvgSelector uses SVG to select an area of a resource. Segments of an SVG representation may also be selected using selectors, including the FragmentSelector or even an SvgSelector.</p>

<p><b>Example Use Case:</b> %%name%% is tagging an old map online with a diagonal region for a historical road.  Her client creates SVG polygon to describe the region, relative to the image content.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the Selector.<br/>SVG Selectors MUST have exactly 1 <code>type</code> and the value MUST include <code>SvgSelector</code>.</td></tr>
<tr><td>SvgSelector</td><td>Class</td><td>The class for a Selector which defines a shape for the selected area using the SVG standard.
<br/>The Selector MUST have this class associated with it.
</td></tr>
<tr><td>value</td><td>Property</td><td>The character sequence of the SVG content.<br/>
There MAY be exactly 1 <code>value</code> property associated with the Selector, and if so the value of the property MUST be well-formed SVG XML.</td></tr>
</table>

<p>The dimensions of the SVG shape or canvas MUST be relative to the dimensions of the Source resource, such that scaling the shape's size to the full size of the image correctly describes the desired area.</p>

<div class="note">
Implementers SHOULD use only commonly supported features of SVG that directly contribute to describing a region, rather than styling or transformation, in order to maximize interoperability between systems. It is NOT RECOMMENDED to include style information within the SVG element, nor Javascript, animation, text or other non-shape oriented information. Clients SHOULD ignore such information if present.
</div>

<h4>Example</h4>

<pre class="example highlight" title="SVG Selector">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/road1",
  "target": {
    "source": "http://example.org/map1",
    "selector": {
      "id": "http://example.org/svg1",
      "type": "SvgSelector"
    }
  }
}
</pre>

<pre class="example highlight" title="SVG Selector, embedded">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/road1",
  "target": {
    "source": "http://example.org/map1",
    "selector": {
      "type": "SvgSelector",
      "value": "&lt;svg:svg&gt; ... &lt;/svg:svg&gt;"
    }
  }
}
</pre>
</section>

<section>
  <h3>Range Selector</h3>

<p>Selections made by users may be extensive and/or cross over internal boundaries in the representation, making it difficult to construct a single selector that robustly describes the correct content.  A Range Selector can be used to identify the beginning and the end of the selection by using other Selectors.  In this way, two points can be accurately identified using the most appropriate selection mechanisms, and then linked together to form the selection.  The selection consists of everything from the beginning of the starting selector through to the beginning of the ending selector, but not including it.</p>

<p><b>Example Use Case:</b> %%name%% wants to comment on two adjacent cells in a table that is part of a web page.  She selects the two cells and her client constructs XPaths to the the first cell, and the cell that immediately follows the second. Her client then creates a Range Selector with the first XPath Selector as the start, and the second XPath selector as the end.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the Selector.<br/>Range Selectors MUST have exactly 1 <code>type</code> and the value MUST be <code>RangeSelector</code>.</td></tr>
<tr><td>RangeSelector</td><td>Class</td><td>The type of the Range Selector resource.
  <br/>Range Selectors MUST have this class associated with them.</td></tr>
<tr><td>startSelector</td><td>Relationship</td><td>The Selector which describes the inclusive starting point of the range.
<br/>There MUST be exactly 1 <code>startSelector</code> associated with a Range Selector.</td></tr>
<tr><td>endSelector</td><td>Relationship</td><td>The Selector which describes the exclusive ending point of the range.
<br/>There MUST be exactly 1 <code>endSelector</code> associated with a Range Selector.  Both <code>startSelector</code> and <code>endSelector</code> SHOULD be of the same class.</td></tr>
</table>

<h4>Example</h4>

<pre class="example highlight" title="Range Selector">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/comment1",
  "target": {
    "source": "http://example.org/page1.html",
    "selector": {
      "type": "RangeSelector",
      "startSelector": {
        "type": "XPathSelector",
        "value": "//table[1]/tr[1]/td[2]"
      },
      "endSelector": {
        "type": "XPathSelector",
        "value": "//table[1]/tr[1]/td[4]"
      }
    }
  }
}
</pre>
</section>

<section>
  <h3>Refinement of Selection</h3>

  <p>It may be easier, more reliable or more accurate to specify the segment of interest of a resource as a selection of a selection, rather than as a selection of the complete resource.  Particularly for resources that contain other resources, such as various packaging formats, this also allows decomposition of the selection mechanisms when the components do not have unique identifiers.  This is accomplished by having selectors chained together, where each refines the results of the previous one.</p>

  <p><b>Example Use Case:</b> %%name%% selects a paragraph of text and then a short phrase within it to comment on.  Her client records the phrase as a TextQuoteSelector that further modifies a FragmentSelector used to identify the paragraph that the phrase is part of.</p>

  <h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>refinedBy</td><td>Relationship</td><td>The relationship between a broader selector and the more specific selector that SHOULD be applied to the results of the first.
  <br/>A Selector MAY be <code>refinedBy</code> 1 or more other Selectors.  If more than 1 is given, then they are considered to be alternatives that will result in the same selection.</td></tr>
</table>

  <h4>Example</h4>

  <pre class="example highlight" title="Refinement of Selection">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/comment1",
  "target": {
    "source": "http://example.org/page1",
    "selector": {
      "type": "FragmentSelector",
      "value": "para5",
      "refinedBy": {
        "type": "TextQuoteSelector",
        "exact": "Selected Text",
        "prefix": "text before the ",
        "suffix": " and text after it"
      }
    }
  }
}
</pre>
</section>

</section> <!-- /Selectors -->

<section>
<h3>States</h3>

<p>A State describes the intended state of a resource as applied to the particular Annotation, and thus provides
 the information needed to retrieve the correct representation of that resource. Web resources change over time, and a State might be used to describe how to recover the intended previous version.  Web resources also have multiple formats, and a State might equally be used to describe how to retrieve that particular format. Multiple States may be given to describe the same representation in order to maximize the chances that the representation will be retrievable by the consuming user agent.</p>

<p><b>Example Use Case:</b> %%name%% makes a comment about a web page that changes frequently. Her client records information to allow other clients to hopefully reconstruct the original target of the annotation.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>state</td><td>Relationship</td><td>The relationship between the SpecificResource and the State.
<br/>There MAY be 0 or more <code>state</code> relationships for each SpecificResource. Multiple States SHOULD describe the same representation, however some States will not have the same precision as others. Consuming user agents MUST pick one of the described representations, if they are different. </td></tr>
</table>

<p>States MUST be processed before processing Selector or Style information.</p>

<h4>Example</h4>

<pre class="example highlight" title="State">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/note1",
  "target": {
    "source": "http://example.org/page1",
    "state": {
      "id": "http://example.org/state1"
    }
  }
}
</pre>

<section>
<h3>Time State</h3>

<p>A Time State resource records the time at which the resource is appropriate for the Annotation, typically the time that the Annotation was created and/or a link to a persistent copy of the current version.  The timestamp for the resource could be resolved via the Memento protocol, described in RFC 7089 [[!rfc7089]].</p>

<p><b>Example Use Case:</b> %%name%% makes a note about the current state of the front page of a news website, and flags that the page is likely to change often.  Her client adds in a State with the current time to describe the version of the page being annotated.</p>


<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the State.<br/>Time States MUST have exactly 1 <code>type</code> and the value MUST be <code>TimeState</code>.</td></tr>
<tr><td>TimeState</td><td>Class</td><td>A description of how to retrieve a representation
of the Source resource that is temporally appropriate for the Annotation.
<br/>The State MUST have this class associated with it.
</td></tr>
<tr><td>sourceDate</td><td>Property</td><td>The timestamp at which the Source resource SHOULD be interpreted for the Annotation.
<br/>There MAY be 0 or more <code>sourceDate</code> properties per TimeState. If there is more than 1, each gives an alternative timestamp at which the Source may be interpreted. The timestamp MUST be expressed in the <code>xsd:dateTime</code> format, and MUST use the UTC timezone expressed as "Z". If <code>sourceDate</code> is provided, then <code>sourceDateStart</code> and <code>sourceDateEnd</code> MUST NOT be provided.</td></tr>
<tr><td>sourceDateStart</td><td>Property</td><td>The timestamp that begins the interval over which the Source resource SHOULD be interpreted for the Annotation.
<br/>There MAY be exactly 1 <code>sourceDateStart</code> property per TimeState. The timestamp MUST be expressed in the <code>xsd:dateTime</code> format, and MUST use the UTC timezone expressed as "Z". If <code>sourceDateStart</code> is provided then <code>sourceDateEnd</code> MUST also be provided.</td></tr>
<tr><td>sourceDateEnd</td><td>Property</td><td>The timestamp that ends the interval over which the Source resource SHOULD be interpreted for the Annotation.
<br/>There MAY be exactly 1 <code>sourceDateEnd</code> property per TimeState. The timestamp MUST be expressed in the <code>xsd:dateTime</code> format, and MUST use the UTC timezone expressed as "Z". If <code>sourceDateEnd</code> is provided then <code>sourceDateStart</code> MUST also be provided.</td></tr>
<tr><td>cached</td><td>Relationship</td><td>A link to a copy of the Source resource's
representation, appropriate for the Annotation.
<br/>There MAY be 0 or more <code>cached</code> relationships per TimeState. If there is more than 1, each gives an alternative copy of the representation.
</td></tr>
</table>


<h4>Example</h4>

<pre class="example highlight" title="Time State">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/note1",
  "target": {
    "source": "http://example.org/page1",
    "state": {
      "type": "TimeState",
      "cached": "http://archive.example.org/copy1",
      "sourceDate": "2015-07-20T13:30:00Z"
    }
  }
}
</pre>
</section>

<section>
<h3>Request Header State</h3>

<p>As there are potentially many representations that can be delivered from a resource with a single IRI, and a
Specific Resource may only apply to one of them, it is important to be able to record the HTTP Request headers
that need to be sent to retrieve the correct representation.  The HttpRequestState resource maintains a copy
of the headers to be replayed when obtaining the representation. </p>

<p><b>Example Use Case:</b> %%name%% retrieves a PDF representation of a web resource that can deliver HTML, PDF or plain text and then writes a description about it.  She signals that her description is only about the PDF representation.  Her client then includes a State to describe how to retrieve the target representation.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the State.<br/>Request Header States MUST have exactly 1 <code>type</code> and the value MUST be <code>HttpRequestState</code>.</td></tr>
<tr><td>HttpRequestState</td><td>Class</td><td>A description of how to retrieve an appropriate representation of the Source resource for the Annotation, based on the HTTP Request headers to send on the request.
<br/>The State MUST have this class associated with it.</td></tr>
<tr><td>value</td><td>Property</td><td>The HTTP request headers to send as a single, complete string.
<br/>An HttpRequestState MUST have exactly 1 <code>value</code> property.</td></tr>
</table>

<div class="note">
The representation retrieved from the server by the original annotator's client might not be completely determined by request headers alone.  For example, the IP address of the client might also determine the language of the representation, based on the language of the country the user was present in at the time.  If the server returns a <code>Content-Location</code> header, then the client might instead use it as the <code>target</code> of the Annotation, rather than the IRI that was requested.
</div>

<h4>Example</h4>

<pre class="example highlight" title="HTTP Request State">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/description1",
  "target": {
    "source": "http://example.org/resource1",
    "state": {
      "type": "HttpRequestState",
      "value": "Accept: application/pdf"
    }
  }
}
</pre>
</section>

<section>
  <h3>Refinement of State</h3>

  <p>Similar to the <a href="#refinement-of-selection">refinement of selection</a>, it may be easier, more reliable or more accurate to specify the appropriate state of the resource as a hierarchy of atomic State resources.  This is particularly appropriate for representing the combination of a State that reflects an internal transformation along with the results of a State that describes an external request. This decomposition is accomplished by having the states chained together in the same way as Selectors.</p>

<p>Further, given that the State(s) will likely result in a specific representation, there may be specific Selectors that are appropriate for describing the segment of the representation.  In order to accommodate this, States may also be refined by Selectors.</p>

  <p><b>Example Use Case:</b> %%name%% writes a comment about a travel e-book which has many versions available over time, and is available in different formats.  She is particularly commenting on a specific version and format, so her client adds both a TimeState to capture the time and an HttpRequestState to capture the format, and then a particular FragmentSelector that is appropriate to that format.</p>

  <h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>refinedBy</td><td>Relationship</td><td>The relationship between a broader State and either a more specific State or a Selector that SHOULD be applied to the results of the first.
  <br/>Each State MAY be <code>refinedBy</code> 1 or more other States or Selectors.  If more than 1 is given, then they are considered to be alternatives that will result in the same result.</td></tr>
</table>

  <h4>Example</h4>

  <pre class="example highlight" title="Refinement of States">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/comment1",
  "target": {
    "source": "http://example.org/ebook1",
    "state": {
      "type": "TimeState",
      "sourceDate": "2016-02-01T12:05:23Z",
      "refinedBy": {
        "type": "HttpRequestState",
        "value": "Accept: application/pdf",
        "refinedBy": {
          "type": "FragmentSelector",
          "value": "page=10",
          "conformsTo": "http://tools.ietf.org/rfc/rfc3778"
        }
      }
    }
  }
}
</pre>
</section>

</section> <!-- /States -->

<section>
<h3>Styles</h3>

<p>The interpretation of a particular Annotation, or the Annotation's Body, may rely on the rendering style of the Annotation being consistent across implementations.  For Annotations on binary content such as Images or Video, the background color of the Target may not be accessible to the annotation client, and the default coloring may be difficult to perceive, such as a black rectangle rendered as the target area on an image of the night sky. Rendering information is recorded using CSS stylesheets and references to classes defined in those stylesheets.</p>

<p><b>Example Use Case:</b> %%name%% highlights two paragraphs in a document, and selects in her client that one should be highlighted in red and the other in yellow.  She then makes a comment that the yellow part contradicts the red part. Her client records that she selected the red and yellow coloration of the targets. </p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>type</td><td>Relationship</td><td>The class of the Style.<br/>CSS Stylesheets MAY have a <code>type</code> and if included the value MUST be <code>CssStylesheet</code>.</td></tr>
<tr><td>CssStylesheet</td><td>Class</td><td>A resource which describes styles for resources participating in the Annotation using CSS.
<br/>The class MAY be associated with the stylesheet resource.</td></tr>
<tr><td>stylesheet</td><td>Relationship</td><td>The relationship between an <b>Annotation</b> and the Style.
<br/>There MAY be 0 or 1 <code>stylesheet</code> relationships for each Annotation.</td></tr>
<tr><td>styleClass</td><td>Property</td><td>The name of the class used in the CSS description that SHOULD be applied to the Specific Resource.<br/>
There MAY be 0 or more <code>styleClass</code> properties on a Specific Resource.</td></tr>
</table>

<p>The CSS Stylesheet is associated with the Annotation itself, and the content provides the rendering hints about the Annotation's constituent resources. It MAY have its own dereferenceable IRI that provides the information, or it may be embedded within the Annotation. This is to avoid having single line stylesheets each associated with different resources, and instead to allow reference to a single IRI that governs the full set of styles for a particular implementation.</p>

<p>Publishing systems MUST NOT assume that they will be processed; they are only provided as hints rather than requirements.</p>

<p>When rendering a Specific Resource, consuming applications SHOULD check to see if it has a <code>styleClass</code> property.  If it does, then the application SHOULD attempt to locate the appropriate selector in the CSS document, and then apply the css-value block.  If a Specific Resource has a <code>styleClass</code> value, but no such class is described by a <code>stylesheet</code> attached to the Annotation, then the <code>styleClass</code> MUST be ignored.</p>

<h4>Example</h4>

<pre class="example highlight" title="CSS Style">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "stylesheet": "http://example.org/style1",
  "body": "http://example.org/comment1",
  "target": {
    "source": "http://example.org/document1",
    "styleClass": "red"
  }
}
</pre>

<pre class="example highlight" title="CSS Style, embedded">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "stylesheet": {
    "type": "CssStylesheet",
    "value": ".red { color: red }"
  },
  "body": "http://example.org/body1",
  "target": {
    "source": "http://example.org/target1",
    "styleClass": "red"
  }
}
</pre>
</section>

<section>
  <h3>Rendering Software</h3>
  <p>It may be valuable to know the software that was used to process and/or render the Target resource when the annotation was created. This information can be used by later systems to potentially recreate the environment to ensure that the annotation can be more easily and more accurately reconnected with the appropriate part of the Target's representation. This life cycle information is associated with the Specific Resource, as it is very likely to change between Annotations for the same Target, and thus cannot be associated with the Target resource directly.</p>

<p><b>Example Use Case:</b> %%name%% is using a browser based client to render a PDF of a scholarly article.  Her browser uses a particular library to render the PDF as HTML.  She annotates a paragraph in the view that she sees, the HTML rendering, and her client records that the library that was used for rendering in the annotation, along with her comment and the target PDF.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>renderedVia</td><td>Relationship</td><td>
The relationship between the Specific Resource that represents the Target in the annotation, and the piece of software or other system that was used to render the Target when the annotation was created.
<br/>There MAY be 0 or more <code>renderedVia</code> relationships for each Specific Resource.
</td></tr>
</table>

<div class="note">Other properties may be associated with the rendering system, including such things as schema:softwareVersion, accessibility functions, labels, references to the actual code, and so forth.  These extensions are beyond the scope of this specification, but please see the Extensions section of [[!annotation-vocab]].</div>

<h4>Example</h4>

<pre class="example highlight" title="Rendering Software">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/comment1",
  "target": {
    "source": "http://example.edu/article.pdf",
    "selector": "http://example.org/selectors/html-selector1",
    "renderedVia": {
      "id": "http://example.com/pdf-to-html-library",
      "type": "Software",
      "schema:softwareVersion": "2.5"
    }
  }
}
</pre>

</section>

<section>
	<h3>Scope of a Resource</h3>
	<p>It is sometimes important for an Annotation to capture the context in which it was made, in terms of the resources that the annotator was viewing or using at the time.  This does not imply an assertion that the annotation is only valid for the image in the context of that page, it just records that the page was being viewed.</p>

<p><b>Example Use Case:</b> %%name%% makes a comment about an image in a particular web page to say that it is not the right organization's logo.  Her client includes the page that the image is being rendered in, however the annotation is associated with the image resource itself.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>scope</td><td>Relationship</td><td>The relationship between a Specific Resource and the resource that provides the scope or context for it in this Annotation.
  <br/>There MAY be 0 or more <code>scope</code> relationships for each Specific Resource.
</td></tr>
</table>

<h4>Example</h4>

<pre class="example highlight" title="Scope">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "body": "http://example.org/note1",
  "target": {
    "source": "http://example.org/image1",
    "scope": "http://example.org/page1"
  }
}
</pre>
</section>
</section>  <!-- /Specific Resources -->

<section>
  <h2>Collections</h2>

  <p>It is often useful to be able to collect Annotations together into a list, called an Annotation Collection.  This list, which is always ordered, serves as a means to refer to the Annotations that are contained within it, and to maintain any information about the Collection itself.</p>

  <p>The Collection model is divided into two sections: the Annotation Collection that manages the identity of the list and its description, and Annotation Pages that list the Annotations which are members of the Collection.</p>

  <p><b>Example Use Case:</b> %%name%% works for a publishing house and has transformed the author's commentary on their steampunk novel into a set of annotations for sale. The company wishes to have them available as an add-on for customers that have already bought the novel, and also in a bundle for new sales.</p>

<section>
	<h3>Annotation Collection</h3>

	<p>As Annotation Collections might get very large, the model distinguishes between the Collection itself and sequence of component pages that in turn list the Annotations.  The Collection maintains information about itself, including creation or descriptive information to aid with discovery and understanding of the Collection, and also references to at least the first Page of Annotations.  By starting with the first Annotation in the first Page, and traversing the Pages to the last Annotation of the last Page, all Annotations in the Collection will have been discovered.</p>

<p>Annotations MAY be within multiple Collections at the same time, and the Collection MAY be created or maintained by agents other than those that create or maintain the included Annotations.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>@context</td><td>Property</td><td>The context that determines the meaning of the JSON as an Annotation Collection.
  <br/>The Collection MUST have 1 or more <code>@context</code> values and <code>http://www.w3.org/ns/anno.jsonld</code> MUST be one of them.</td></tr>
<tr><td>id</td><td>Property</td><td>The identity of the Collection.<br/>The Collection MUST have exactly 1 IRI that identifies it.</td></tr>
<tr><td>type</td><td>Property</td><td>The type of the Collection.<br/>The Collection MUST have 1 or more types, and the <code>AnnotationCollection</code> class MUST be one of them.</td></tr>
<tr><td>AnnotationCollection</td><td>Class</td><td>The class for ordered Collections of Annotations.<br/>This class MUST be associated with the Collection using <code>type</code>.</td></tr>
<tr><td>label</td><td>Property</td><td>A human readable label intended as the name of the Collection.<br/>Collections SHOULD have 1 or more <code>label</code>s, and the value MUST be a string.</td></tr>
<tr><td>total</td><td>Property</td><td>The total number of Annotations in the Collection.<br/>Collections SHOULD have exactly 1 <code>total</code>, and if present it MUST be an <code>xsd:nonNegativeInteger</code>. </td></tr>
<tr><td>first</td><td>Relationship</td><td>The first page of Annotations that are included within the Collection.<br/>A Collection that has a total number of Annotations greater than 0 MUST have exactly 1 <code>first</code> page of Annotations. The first Page MAY be embedded within the representation of the Collection, or it MAY be given as an IRI.</td></tr>
<tr><td>last</td><td>Relationship</td><td>The last page of Annotations that are included within the Collection.<br/>A Collection that has a total number of Annotations greater than 0 SHOULD have a reference to the IRI of the <code>last</code> page of Annotations.</td></tr>
</table>

<p>Other properties MAY be added to the Collection to describe its use, intellectual property rights, provenance and any other features that are considered useful.  These properties SHOULD come from those described in this specification if possible, but MAY come from any appropriate vocabulary.</p>

<h4>Example</h4>

<pre class="example highlight" title="Annotation Collection">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/collection1",
  "type": "AnnotationCollection",
  "label": "Steampunk Annotations",
  "creator": "http://example.com/publisher",
  "total": 42023,
  "first": "http://example.org/page1",
  "last": "http://example.org/page42"
}
</pre>
</section>

<section>
  <h3>Annotation Page</h3>

  <p>An Annotation Page is part of an Annotation Collection, and has an ordered list of some or all of the Annotations that are within the Collection. Each Collection may have multiple pages, and these are traversed by following the <code>next</code> and <code>prev</code> links between the pages.</p>

<h4>Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>@context</td><td>Property</td><td>The context that determines the meaning of the JSON as an Annotation Collection Page.
  <br/>If the Page is NOT embedded within a Collection, it MUST have 1 or more <code>@context</code> values and <code>http://www.w3.org/ns/anno.jsonld</code> MUST be one of them. If it is embedded, then it SHOULD NOT have an <code>@context</code> property.</td></tr>
<tr><td>id</td><td>Property</td><td>The identity of the Page.<br/>The Page MUST have exactly 1 IRI that provides its identity.</td></tr>
<tr><td>type</td><td>Property</td><td>The type of the Page.<br/>The Page MUST have 1 or more types, and the <code>AnnotationPage</code> class MUST be one of them.</td></tr>
<tr><td>AnnotationPage</td><td>Class</td><td>The class of Annotation Pages.<br/>This class MUST be associated with the Page using <code>type</code>.</td></tr>
<tr><td>partOf</td><td>Relationship</td><td>The relationship between the Page and the Annotation Collection that it is part of.<br/>Each Page SHOULD have a exactly 1 <code>partOf</code> relationship, with the value being either the IRI of the Collection or an object with some or all of the Collections properties, including at least its <code>id</code>.</td></tr>
<tr><td>items</td><td>Relationship</td><td>The list of Annotations that are the members of the Page.<br/>Each Page MUST have an array of 1 or more Annotations as the value of <code>items</code>.</td></tr>
<tr><td>next</td><td>Relationship</td><td>A reference to the next Page in the sequence of pages that make up the Collection.<br/>If the current page is not the last page in the Collection, it MUST have a reference to the IRI of the page that follows it.</td></tr>
<tr><td>prev</td><td>Relationship</td><td>A reference to the previous Page in the sequence of pages that make up the Collection.<br/>If the current page is not the first page in the Collection, it SHOULD have a reference to the IRI of the page that it follows.</td></tr>
<tr><td>startIndex</td><td>Property</td><td>The relative position of the first Annotation in the <code>items</code> list, relative to the Annotation Collection. The first entry in the first page is considered to be entry 0.<br/>Each Page SHOULD have exactly 1 <code>startIndex</code>, and MUST NOT have more than 1.  The value MUST be an <code>xsd:nonNegativeInteger</code>.</td></tr>
</table>

<h4>Example</h4>

<pre class="example highlight" title="Annotation Page">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/page1",
  "type": "AnnotationPage",
  "partOf": {
    "id": "http://example.org/collection1",
    "label": "Steampunk Annotations",
    "total": 42023
  },
  "next": "http://example.org/page2",
  "startIndex": 0,
  "items": [
    {
      "id": "http://example.org/anno1",
      "type": "Annotation",
      "body": "http://example.net/comment1",
      "target": "http://example.com/book/chapter1"
    },
    {
      "id": "http://example.org/anno2",
      "type": "Annotation",
      "body": "http://example.net/comment2",
      "target": "http://example.com/book/chapter2"
    }
  ]
}
</pre>

<pre class="example highlight" title="Annotation Collection with Embedded Page">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/collection1",
  "type": "AnnotationCollection",
  "label": "Two Annotations",
  "total": 2,
  "first": {
    "id": "http://example.org/page1",
    "type": "AnnotationPage",
    "startIndex": 0,
    "items": [
      {
        "id": "http://example.org/anno1",
        "type": "Annotation",
        "body": "http://example.net/comment1",
        "target": "http://example.com/book/chapter1"
      },
      {
        "id": "http://example.org/anno2",
        "type": "Annotation",
        "body": "http://example.net/comment2",
        "target": "http://example.com/book/chapter2"
      }
    ]
  }
}
</pre>

</section>
</section> <!-- /Lists -->

<section id="media_selector" class="appendix">
    <h2>Correspondence Among Media Types and Selectors</h2>

    <p>The table below shows the relationships among major media types and selector types.  It is relevant to the <a href="#conformance"></a> section of this document.
    </p>

    <table id="media_table" class="model">
      <thead>
        <tr>
          <td> </td>
          <th>Fragment</th>
          <th>CSS</th>
          <th>XPath</th>
          <th>Text Quote</th>
          <th>Text Position</th>
          <th>Data Position</th>
          <th>Svg</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th>HTML (text/html)</th>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>CSV (text/csv)</th>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>Plain Text (text/plain)</th>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>Other text files (text/*) </th>
          <td>?</td>
          <td>✘</td>
          <td>✘</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>EPUB2, EPUB3 (application/epub+zip)</th>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>PDF (application/pdf) </th>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>XML (application/xml, application/*+xml) </th>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>SVG (image/svg+xml)</th>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✘</td>
          <td>✔︎</td>
        </tr>
        <tr>
          <th>Image, other than SVG (image/gif, image/jpeg, image/png,
            image/tiff)</th>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
          <td>✘</td>
          <td>✘</td>
          <td>?</td>
          <td>✔︎</td>
        </tr>
        <tr>
          <th>Video (video/*)</th>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
          <td>✘</td>
          <td>✘</td>
          <td>?</td>
          <td>✔︎</td>
        </tr>
        <tr>
          <th>Binary Data Files</th>
          <td>?</td>
          <td>✘</td>
          <td>✘</td>
          <td>✘</td>
          <td>✘</td>
          <td>✔︎</td>
          <td>✘</td>
        </tr>
      </tbody>
    </table>

<section class="informative">
    <h2>Additional Media Types/Selector Combination</h2>

    <p>The table below contains some other, possible combinations of media types and selector types, which MAY be implemented but are not mandated by this specification. Some of these combinations may also form the basis for defining new, implementation-specific selector extensions.</p>

    <table class="model">
      <caption>Additional relationships among other media types and selector types</caption>
      <thead>
        <tr>
          <td> </td>
          <th>Fragment</th>
          <th>CSS</th>
          <th>XPath</th>
          <th>Text Quote</th>
          <th>Text Position</th>
          <th>Data Position</th>
          <th>Svg</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th>CSS (text/css)</th>
          <td>✘</td>
          <td>✘</td>
          <td>✘</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>TSV (text/tab-separated-values)</th>
          <td>✔︎<sup>✝</sup></td>
          <td>✘</td>
          <td>✘</td>
          <td>✔︎</td>
          <td>✔︎</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>RDF/Turtle (text/turtle)</th>
          <td>✔︎<sup>✝</sup></td>
          <td>✘</td>
          <td>✘</td>
          <td>?</td>
          <td>?</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>JSON (application/json, application/*+json)</th>
          <td>✘</td>
          <td>✘</td>
          <td>✘</td>
          <td>✔︎</td>
          <td>?</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
        <tr>
          <th>Programming languages (application/javascript, python files, etc.)</th>
          <td>✘</td>
          <td>✘</td>
          <td>✘</td>
          <td>✔︎</td>
          <td>?</td>
          <td>✘</td>
          <td>✘</td>
        </tr>
      </tbody>
      <tfoot>
          <tr>
              <td colspan="8" style="font-size:70%">
                  <sup>✝</sup>Fragments are not formally defined through IETF, though there are well-known connections to existing fragments or practices
              </td>
          </tr>
      </tfoot>
    </table>
</section>
</section>

<section class="appendix informative">
  <h3>Complete Example</h3>

<p><b>Entirely Contrived Example Use Case:</b> %%name%% wants to associate a comment that she wrote in English within the annotation or an external mp3 of the same content in German by someone else, plus a tag, with a range of characters from a particular element in an XML representation of a document as it was at a certain point in time, and for it to be displayed in a particular way.</p>

<pre class="example highlight" title="Complete Example">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "motivation": "commenting",
  "creator": {
    "id": "http://example.org/user1",
    "type": "Person",
    "name": "A. Person",
    "nickname": "user1"
  },
  "created": "2015-10-13T13:00:00Z",
  "generator": {
    "id": "http://example.org/client1",
    "type": "Software",
    "name": "Code v2.1",
    "homepage": "http://example.org/homepage1"
  },
  "generated": "2015-10-14T15:13:28Z",
  "stylesheet": {
    "id": "http://example.org/stylesheet1",
    "type": "CssStylesheet"
  },
  "body": [
    {
      "type": "TextualBody",
      "purpose": "tagging",
      "value": "love"
    },
    {
      "type": "Choice",
      "items": [
        {
          "type": "TextualBody",
          "purpose": "describing",
          "value": "I really love this particular bit of text in this XML. No really.",
          "format": "text/plain",
          "language": "en",
          "creator": "http://example.org/user1"
        },
        {
          "type": "SpecificResource",
          "purpose": "describing",
          "source": {
            "id": "http://example.org/comment1",
            "type": "Audio",
            "format": "audio/mpeg",
            "language": "de",
            "creator": {
              "id": "http://example.org/user2",
              "type": "Person"
            }
          }
        }
      ]
    }
  ],
  "target": {
    "type": "SpecificResource",
    "styleClass": "mystyle",
    "source": "http://example.com/document1",
    "state": [
      {
        "type": "HttpRequestState",
        "value": "Accept: application/xml",
        "refinedBy": {
          "type": "TimeState",
          "sourceDate": "2015-09-25T12:00:00Z"
        }
      }
    ],
    "selector": {
      "type": "FragmentSelector",
      "value": "xpointer(/doc/body/section[2]/para[1])",
      "refinedBy": {
        "type": "TextPositionSelector",
        "start": 6,
        "end": 27
      }
    }
  }
}
</pre>
</section>

<section class="appendix informative">
  <h3>Index of JSON Keys</h3>

<table class="model">
  <tr><th>Key</th><th>Usage</th></tr>
<tr><td>accessibility</td><td><a href="#accessibility-of-content">Body, Target</a></td></tr>
<tr><td>audience</td><td><a href="#intended-audience">Audience</a></td></tr>
<tr><td>body</td><td><a href="#annotations">Annotation</a></td></tr>
<tr><td>bodyValue</td><td><a href="#string-body">Annotation</a></td></tr>
<tr><td>cached</td><td><a href="#time-state">Time State</a></td></tr>
<tr><td>canonical</td><td><a href="#other-identities">Annotation, Body, Target</a></td></tr>
<tr><td>conformsTo</td><td><a href="#fragment-selector">Fragment Selector</a></td></tr>
<tr><td>created</td><td><a href="#lifecycle-information">Annotation, Body</a></td></tr>
<tr><td>creator</td><td><a href="#lifecycle-information">Annotation, Body</a></td></tr>
<tr><td>email</td><td><a href="#agents">Agent</a></td></tr>
<tr><td>email_sha1</td><td><a href="#agents">Agent</a></td></tr>
<tr><td>end</td><td><a href="#text-position-selector">Text Position Selector</a>, <a href="#data-position-selector">Data Position Selector</a></td></tr>
<tr><td>endSelector</td><td><a href="#range-selector">Range Selector</a></td></tr>
<tr><td>exact</td><td><a href="#text-quote-selector">Text Quote Selector</a></td></tr>
<tr><td>first</td><td><a href="#annotation-collection">Annotation Collection</a></td></tr>
<tr><td>format</td><td><a href="#external-web-resources">Body, Target</a>, <a href="#svg-selector">SVG Selector</a></td></tr>
<tr><td>generated</td><td><a href="#lifecycle-information">Annotation</a></td></tr>
<tr><td>generator</td><td><a href="#lifecycle-information">Annotation</a></td></tr>
<tr><td>homepage</td><td><a href="#agents">Agents</a></td></tr>
<tr><td class="top_cell">id</td><td>Note: Every object MAY have an <code>id</code>.<br/><a href="#annotations">Annotation</a>, <a href="#external-web-resources">Body, Target</a>, <a href="#segments-of-external-resources">Segments of External Resources</a>, <a href="#embedded-textual-body">Embedded Textual Body</a>, <a href="#agents">Agent</a>, <a href="#intended-audience">Audience</a>, <a href="#specific-resources">Specific Resource</a></td></tr>
<tr><td>items</td><td><a href="#choice-between-bodies">Choice</a>, <a href="#annotation-page">Annotation Page</a></td></tr>
<tr><td>label</td><td><a href="#annotation-collection">Annotation Collection</a></td></tr>
<tr><td>language</td><td><a href="#external-web-resources">Body, Target</a></td></tr>
<tr><td>last</td><td><a href="#annotation-collection">Annotation Collection</a></td></tr>
<tr><td>modified</td><td><a href="#lifecycle-information">Annotation, Body</a></td></tr>
<tr><td>motivation</td><td><a href="#motivation-and-purpose">Annotation</a></td></tr>
<tr><td>name</td><td><a href="#agents">Agent</a></td></tr>
<tr><td>nickname</td><td><a href="#agents">Agent</a></td></tr>
<tr><td>next</td><td><a href="#annotation-page">Annotation Page</a></td></tr>
<tr><td>partOf</td><td><a href="#annotation-page">Annotation Page</a></td></tr>
<tr><td>prefix</td><td><a href="#text-quote-selector">Text Quote Selector</a></td></tr>
<tr><td>prev</td><td><a href="#annotation-page">Annotation Page</a></td></tr>
<tr><td>purpose</td><td><a href="#motivation-and-purpose">Textual Body</a>, <a href="#purpose-for-external-web-resources">Specific Resource</a></td></tr>
<tr><td>renderedVia</td><td><a href="#rendering-software">Specific Resource</a></td></tr>
<tr><td>rights</td><td><a href="#rights-information">Annotation, Body, Target</a></td></tr>
<tr><td>refinedBy</td><td><a href="#refinement-of-selection">Selector</a>, <a href="#refinement-of-state">State</a></td></tr>
<tr><td>scope</td><td><a href="#scope-of-a-resource">Specific Resource</a></td></tr>
<tr><td>selector</td><td><a href="#selectors">Specific Resource</a></td></tr>
<tr><td>source</td><td><a href="#specific-resources">Specific Resource</a></td></tr>
<tr><td>sourceDate</td><td><a href="#time-state">Time State</a></td></tr>
<tr><td>sourceDateEnd</td><td><a href="#time-state">Time State</a></td></tr>
<tr><td>sourceDateStart</td><td><a href="#time-state">Time State</a></td></tr>
<tr><td>start</td><td><a href="#text-position-selector">Text Position Selector</a>, <a href="#data-position-selector">Data Position Selector</a></td></tr>
<tr><td>startIndex</td><td><a href="#annotation-page">Annotation Page</a></td></tr>
<tr><td>startSelector</td><td><a href="#range-selector">Range Selector</a></td></tr>
<tr><td>state</td><td><a href="#states">Specific Resource</a></td></tr>
<tr><td>styleClass</td><td><a href="#styles">Specific Resource</a></td></tr>
<tr><td>stylesheet</td><td><a href="#styles">Annotation</a></td></tr>
<tr><td>suffix</td><td><a href="#text-quote-selector">Text Quote Selector</a></td></tr>
<tr><td>target</td><td><a href="#annotations">Annotation</a></td></tr>
<tr><td>textDirection</td><td><a href="#external-web-resources">Body, Target</a></td></tr>
<tr><td>total</td><td><a href="#annotation-collection">Annotation Collection</a></td></tr>
<tr><td class="top_cell">type</td><td>Note: Every object MAY have a <code>type</code>.<br/> <a href="#annotations">Annotation</a>, <a href="#classes">Body, Target</a>, <a href="#embedded-textual-body">Embedded Textual Body</a>, <a href="#agents">Agent</a>, <a href="#intended-audience">Audience</a>, <a href="#specific-resources">Specific Resource</a>, <a href="#fragment-selector">Fragment Selector</a>, <a href="#css-selector">CSS Selector</a>, <a href="#xpath-selector">XPath Selector</a>, <a href="#text-quote-selector">Text Quote Selector</a>, <a href="#text-position-selector">Text Position Selector</a>, <a href="#data-position-selector">Data Position Selector</a>, <a href="#svg-selector">SVG Selector</a>, <a href="#time-state">Time State</a>, <a href="#request-header-state">Request Header State</a>, <a href="#styles">CSS Stylesheet</a></td></tr>
<tr><td>value</td><td> <a href="#embedded-textual-body">Textual Body</a>, <a href="#fragment-selector">Fragment Selector</a>, <a href="#css-selector">CSS Selector</a>, <a href="#xpath-selector">XPath Selector</a>, <a href="#svg-selector">SVG Selector</a>, <a href="#request-header-state">Request Header State</a>, <a href="#styles">CSS Stylesheet</a></td></tr>
<tr><td>via</td><td><a href="#other-identities">Annotation, Body, Target</a></td></tr>
</table>
</section>

<section class="appendix informative">

<h3>Sets of Bodies and Targets</h3>

<p>
While it is possible to annotate multiple targets, the meaning of that annotation is that each Body applies independently to each of the Targets.  This might not be the intent of the annotator, such as when all of the targets are required for the annotation to be correctly understood.  In order to allow annotators to capture these requirements, a resource similar to Choice could be used, such as a Composite (unordered) or List (ordered).
</p>

<p>The technical implementation of this pattern is not difficult, as it is practically identical to Choice, however the implementation of a user interface that can manage a human user's interactions such that the client can recognize the distinctions has proven to be very challenging.  As such, the pattern is noted in this appendix for future consideration.</p>

<p><b>Example Use Case:</b> %%name%% comments on a set of web pages as, together, providing evidence towards her research hypothesis. Her client creates a Composite, as there is no inherent order to the set of web pages.</p>

<p><b>Example Use Case:</b> %%name%% tags a list of pages within a book as being important. As the pages have an order in the book, her client creates a List to maintain that order.</p>

<p><b>Example Use Case:</b> %%name%% annotates a set of images to classify them as portraits.  As the classification applies to each image independently, her client creates a Independents resource to group them.</p>

<h4>Proposed Model</h4>

<table class="model">
<tr><th>Term</th><th>Type</th><th>Description</th></tr>
<tr><td>id</td><td>Property</td><td>The IRI that identifies the set.
<br/>The set resource MAY have exactly 1 IRI that identifies it.</td></tr>
<tr><td>type</td><td>Relationship</td><td>The type of the resource.
  <br/>The set MUST have exactly 1 <code>type</code> class, taken from the options below.</td></tr>
<tr><td>Composite</td><td>Class</td><td>A set of resources, all of which are required for the Annotation to be correctly interpreted.</td></tr>
<tr><td>List</td><td>Class</td><td>An ordered list of resources, all of which are required in order for the Annotation to be correctly interpreted.</td></tr>
<tr><td>Independents</td><td>Class</td><td>A set of resources, each of which is being annotated separately with the same interpretation as having multiple bodies or targets directly associated with the Annotation. </td></tr>
<tr><td>items</td><td>Relationship</td><td>The list of resources in the <code>Composite</code>, <code>List</code>, or <code>Independents</code>.</td></tr>
</table>

<h4>Examples</h4>

<pre class="example highlight" title="Composite">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "motivation": "commenting",
  "body": {
    "type": "TextualBody",
    "value": "These pages together provide evidence of the conspiracy"
  },
  "target": {
    "type": "Composite",
    "items": [
      "http://example.com/page1",
      "http://example.org/page6",
      "http://example.net/page4"
    ]
  }
}
</pre>

<pre class="example highlight" title="List">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "motivation": "tagging",
  "body": {
    "type": "TextualBody",
    "value": "important"
  },
  "target": {
    "type": "List",
    "items": [
      "http://example.com/book/page1",
      "http://example.com/book/page2",
      "http://example.com/book/page3",
      "http://example.com/book/page4"
    ]
  }
}
</pre>

<pre class="example highlight" title="Independents">
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno%%anno%%",
  "type": "Annotation",
  "motivation": "classifying",
  "body": "http://example.org/vocab/art/portrait",
  "target": {
    "type": "Independents",
    "items": [
      "http://example.com/image1",
      "http://example.net/image2",
      "http://example.com/image4",
      "http://example.org/image9"
    ]
  }
}
</pre>
</section>


<section class="appendix informative">
<h3>Acknowledgments</h3>

<p>The Web Annotation Working Group gratefully acknowledges the contributions of the <a href="http://www.w3.org/community/openannotation/">Open Annotation Community Group</a>.  The <a href="http://www.openannotation.org/spec/core">output</a> of the Community Group was fundamental to the current data model.  In particular the editors would like to thank Herbert Van de Sompel of Los Alamos National Laboratory for his editorial contributions throughout the Community Group process.
</p>

<p>The following people have been instrumental in providing thoughts, feedback, reviews, content, criticism and input in the creation of this specification:

<div style="margin-left: 3em">
Vladimir Alexiev, Art Barstow, Tim Berners-Lee, Chris Birk, Dan Brickley, Sarven Capadisli, Paolo Ciccarese, Tim Cole, Ray Denenberg, TB Dinesh, Sergiu Gordea, Benjamin Goering, Amy Guy, Ivan Herman, Frederick Hirsch, Antoine Isaac, Jacob Jett, Takeshi Kanai, Gregg Kellogg, Andreas Kuckartz, Randall Leeds, Hugo Manguinhas, Shane McCarron, Ben De Meester, Luc Moreau, Addison Phillips, Davis Salisbury, Robert Sanderson, Felix Sasaki, Doug Schepers, Tzviya Siegman, Stian Soiland-Reyes, Manu Sporny, Nick Stenning, Jon Stroop, Lutz Suhrbier, Kyrce Swenson, Raphaël Troncy, Simeon Warner, Erik Wilde, Dan Whaley, Benjamin Young
</div>
</p>
</section>

<section class="appendix informative">
<h3>Candidate Recommendation Exit Criteria</h3>

<p>For this specification to be advanced to Proposed Recommendation, there must be at least two independent implementations of each feature described below. Each feature may be implemented by a different set of products, and there is no requirement that any single product implement every feature.</p>

<b>Features</b>

<p>
For the purposes of evaluating exit criteria, the following are considered as features:
</p>

<ul>
<li>The Annotation class and required properties.</li>
<li>The Agent class and required properties, as related to an Annotation.</li>
<li>The Agent class and required properties, as related to a resource used as the Body of an Annotation.</li>
<li>Embedded TextualBody class and required properties.</li>
<li>External web resources, used as the Body of an Annotation.</li>
<li>A Choice of resources, used as the Body of an Annotation.</li>
<li>The SpecificResource class and required properties, used as the Body of an Annotation.</li>
<li>External web resources, used as the Target of an Annotation.</li>
<li>The SpecificResource class and required properties, used as the Target of an Annotation.</li>
<li>The AnnotationCollection class and required properties.</li>
<li>The AnnotationPage class and required properties.</li>
</ul>

<p>
Software that does not alter its behavior in the presence or lack of a given feature is not deemed to implement that feature for the purposes of exiting the Candidate recommendation phase.
</p>

</section>

<section class="appendix informative changelog">
<h2>Changes from Previous Versions</h2>

<section>
  <h3>Changes from the Proposed Recommendation of 2017-01-17</h3>
  <p>No significant changes.</p>
</section>

<section>
  <h3>Changes from the Candidate Recommendation of 2016-11-22</h3>
  <ul>
    <li>Removed unnecessary appendix</li>
    <li>Updated SVG reference to 1.1</li>
  </ul>
</section>

<section>
    <h3>Changes from the Candidate Recommendation of 2016-09-06</h3>

    <ul>
    <li>Move Composite, List and Independents classes to an informative appendix. (These classes were marked as "at Risk" in earlier versions.)</li>
    <li>Remove the use of Choice with Targets, and associating Agents with Targets.</li>
    <li>Clarify the possibility of embedding Collection information in a Page using partOf.</li>
    <li>Improve description of multiple rights statements about resources.</li>
    <li>Improve description of textDirection and note that value definitions are explicitly from HTML5, as well as the property.</li>
    <li>Link to the media type in protocol from the introduction.</li>
    <li>Clarified that processingLanguage should also have a BCP47 formatted value.</li>
    <li>Clarified that TextualBody can be the source of a Specific Resource, and the target of an Annotation.</li>
    <li>Add informative principle that features of externally referenced resources described in an Annotation are not intended to be authoritative, and the remote resource is the source of truth about itself.</li>
    <li>Clarified the scope of the purpose property with respect to TextualBody resources.</li>
    </ul>
</section>

<section>
    <h3>Changes from the Candidate Recommendation of 2016-07-05</h3>

    <ul>
    <li>Added CR Exit Criteria</li>
    </ul>
</section>

<section>
    <h3>Changes from the Working Draft of 2016-03-31</h3>

<p>Significant technical changes in this specification from the <a href="https://www.w3.org/TR/2016/WD-annotation-model-20160331/">Working Draft Published of 2016-03-31</a> are:</p>

<ul>
<li>Addition of conformance section and media table</li>
<li>Remove Content class as unnecessary, and reuse <code>value</code> in place of the previous distinct <code>text</code> property.</li>
<li>Rename <code>bodyText</code> to <code>bodyValue</code> following from the removal of the <code>text</code> property.</li>
<li>Simplification of <code>SvgSelector</code> and <code>CssStylesheet</code>, following from the removal of <code>Content</code>.</li>
<li>Add accessibility section.</li>
<li>Clarify normalization requirements for text based selectors, and add <code>textDirection</code> and <code>procesingLanguage</code> properties.</li>
<li>Add Independents class to mirror the use of of multiple bodies or targets. Independents, and the re-introduced Composite and List, marked at risk.</li>
<li>Revert to the use of xsd:dateTime for dates.</li>
<li>Clarify the semantics of multiple selectors, states.</li>
<li>Use less ambiguous <code>nickname</code> instead of <code>account</code> for <code>foaf:nick</code>.</li>
<li>Remove role requirement for interpretation of <code>bodyValue</code>.</li>
</ul>

</section>

<section>

  <h3>Changes from the Open Annotation Draft</h3>

<p>
Significant technical changes in this specification from the <a href="http://www.openannotation.org/spec/core/">Open Annotation Community Group's draft</a> are:</p>
<ul>
  <li>Use intuitive, memorable and developer-friendly names for the JSON-LD keys. (<a href="#annotations">text</a>)</li>
<li>Replace the ContentAsText construction which was not taken through the standardization process. (<a href="#embedded-textual-body">text</a>)</li>
<li>Allow a string literal as the body via bodyText. (<a href="#string-body">text</a>)</li>
<li>Allow an ordered list of options for Choice (<a href="#choice-between-bodies">text</a>).</li>
<li>Add additional core lifecycle metadata for resources, including <a href="#rights-information">rights information</a> and <a href="#intended-audience">intended audience</a>. (<a href="#lifecycle-information">text</a>)</li>
<li>Align identity equivalence with other standards. (<a href="#other-identities">text</a>)</li>
<li>Allow association of Motivation as roles/purposes on a per body or target basis, including alignment of Tags and Semantic Tags. (<a href="#purpose-for-external-web-resources">text</a>)</li>
<li>Introduce <a href="#css-selector">CSS Selector</a>, <a href="#xpath-selector">XPath Selector</a> and <a href="#range-selector">Range Selector</a> from implementation experience. </li>
<li>Use structure rather than resources for multiple specifiers. (<a href="#refinement-of-selection">text</a>)</li>
<li>Add the capability to describe rendering software. (<a href="#rendering-software">text</a>)</li>
<li>Add <a href="#annotation-collection">Collections of Annotations</a> as a defined pattern.</li>
<li>Separate the ontology [[annotation-vocab]] from the model and JSON serialization.</li>
<li>Deprecate embedded graphs as an explicit part of the model, instead just include or reference a serialized graph.</li>
</ul>

</section>

</section>


</body>
</html>