From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001
From: Daniel Baumann Fill the textarea below with JSON output from your annotation client
+implementation that supports the following criteria: Specifically, the following assertions will be evaluated: Fill the textarea below with JSON output from your annotation client
+implementation that supports the following criteria: Specifically, the following assertions will be evaluated: Fill the textarea below with JSON output from your annotation client
+implementation that supports the following criteria: Specifically, the following assertions will be evaluated: Fill the textarea below with JSON output from your annotation client
+implementation that supports the following criteria: Specifically, the following assertions will be evaluated: Fill the textarea below with JSON output from your annotation client
+implementation that supports the following criteria: Specifically, the following assertions will be evaluated: Fill the textarea below with JSON output from your annotation client
+implementation that supports the following criteria: Specifically, the following assertions will be evaluated: Fill the textarea below with JSON output from your annotation client
+implementation that supports the following criteria: Specifically, the following assertions will be evaluated: /,
+ replace: ''
+ },
+ { type: 'output',
+ regex: /<\/p>$/,
+ replace: ''
+ }
+ ];
+ });
+
+
+ this.markdown = new showdown.Converter({ extensions: [ 'strip' ] }) ;
+
+ var pending = [] ;
+
+ // set up in case DOM finishes loading early
+ pending.push(new Promise(function(resolve) {
+ on_event(document, "DOMContentLoaded", function() {
+ resolve(true);
+ }.bind(this));
+ }.bind(this)));
+
+ // create an ajv object that will stay around so that caching
+ // of schema that are compiled just works
+ this.ajv = new Ajv({allErrors: true, validateSchema: false}) ;
+
+ // determine the base URI for the test collection. This is
+ // the top level folder in the test "document.location"
+
+ var l = document.location;
+ var p = l.pathname;
+ this.TestDir = p.substr(0, 1+p.lastIndexOf('/'));
+ this.Base = p.substr(0, 1+p.indexOf('/', 1));
+
+ // if we are under runner, then there are props in the parent window
+ //
+ // if "output" is set in that, then pause at the end of running so the output
+ // can be analyzed. @@@TODO@@@
+ if (window && window.opener && window.opener.testharness_properties) {
+ this.Properties = window.opener.testharness_properties;
+ }
+
+ this.Params = params;
+
+ // if there is a list of definitions in the params,
+ // include them
+ if (this.Params.schemaDefs) {
+ var defPromise = new Promise(function(resolve, reject) {
+ var promisedSchema = this.Params.schemaDefs.map(function(item) {
+ return this.loadDefinition(item);
+ }.bind(this));
+
+ // Once all the loadAssertion promises resolve...
+ Promise.all(promisedSchema)
+ .then(function (schemaContents) {
+ this.ajv.addSchema(schemaContents);
+ resolve(true);
+ }.bind(this))
+ .catch(function(err) {
+ reject(err);
+ }.bind(this));
+ }.bind(this));
+ // these schema need to load up too
+ pending.push(defPromise) ;
+ }
+
+ // start by loading the test (it might be inline, but
+ // loadTest deals with that
+ pending.push(this.loadTest(params)
+ .then(function(test) {
+ // if the test is NOT an object, turn it into one
+ if (typeof test === 'string') {
+ test = JSON.parse(test) ;
+ }
+
+ this.Test = test;
+
+ // Test should have information that we can put in the template
+
+ if (test.description) {
+ this.DescriptionText = test.description;
+ }
+
+ if (test.hasOwnProperty("skipFailures") && Array.isArray(test.skipFailures) ) {
+ this.SkipFailures = test.skipFailures;
+ }
+
+ if (test.content) {
+ // we have content
+ if (typeof test.content === "string") {
+ // the test content is a string - meaning it is a reference to a file of content
+ var cPromise = new Promise(function(resolve, reject) {
+ this.loadDefinition(test.content)
+ .then(function(content) {
+ if (typeof content === 'string') {
+ content = JSON.parse(content) ;
+ }
+ test.content = content;
+ resolve(true);
+ }.bind(this))
+ .catch(function(err) {
+ reject("Loading " + test.content + ": " + JSON.stringify(err));
+ });
+
+ }.bind(this));
+ pending.push(cPromise);
+ }
+ }
+
+ return new Promise(function(resolve, reject) {
+ if (test.assertions &&
+ typeof test.assertions === "object") {
+ // we have at least one assertion
+ // get the inline contents and the references to external files
+ var assertFiles = this._assertionRefs(test.assertions);
+
+ var promisedAsserts = assertFiles.map(function(item) {
+ return this.loadAssertion(item);
+ }.bind(this));
+
+ // Once all the loadAssertion promises resolve...
+ Promise.all(promisedAsserts)
+ .then(function (assertContents) {
+ // assertContents has assertions in document order
+
+ var typeMap = {
+ 'must' : "[MANDATORY] ",
+ 'may' : "[OPTIONAL] ",
+ 'should' : "[RECOMMENDED] "
+ };
+
+ var assertIdx = 0;
+
+ // populate the display of assertions that are being exercised
+ // returns the list of top level assertions to walk through
+
+ var buildList = function(assertions, level) {
+ if (level === undefined) {
+ level = 1;
+ }
+
+ // accumulate the assertions - but only when level is 0
+ var list = [] ;
+
+ var type = "";
+ if (assertions) {
+ if (typeof assertions === "object" && assertions.hasOwnProperty('assertions')) {
+ // this is a conditionObject
+ if (level === 0) {
+ list.push(assertContents[assertIdx]);
+ }
+ type = assertContents[assertIdx].hasOwnProperty('assertionType') ?
+ assertContents[assertIdx].assertionType : "must" ;
+
+ // ensure type defaults to must
+ if (!typeMap.hasOwnProperty(type)) {
+ type = "must";
+ }
+
+ this.AssertionText += " "),i+="
+{
+ "@context": "https://www.w3.org/ns/JSONtest-v1.jsonld",
+ "name": "Verify annotation conforms to the model",
+ "description": "Supply an example annotation that conforms to the basic structure.",
+ "ref": "https://www.w3.org/TR/annotation-model/#model",
+ "testType": "manual",
+ "assertions": [
+ "common/has_context.json",
+ "common/has_id.json",
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Verify annotation has target",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "errorMessage": "The object was missing a required 'target' property",
+ "type": "object",
+ "properties": {
+ "target": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "anyOf": [
+ {
+ "type": "string"
+ }
+ ]
+ }
+ ],
+ "not": {"type": "object"}
+ }
+ },
+ "required": ["target"]
+ }
+ ]
+}
+
+
+External references are used when the "assertion" is a common one that needs to
+be checked on many different test cases (e.g., that there is an @context in the
+supplied annotation).
+
+NOTE: The title property of an assertionObject can contain markdown. This can
+help improve readability of the rendered assertions and debugging output.
+
+NOTE: The content property does not yet have a defined use. One potential use would
+be to act as a pointer to a URI that can supply annotations from an implementation.
+In that case the URI would take a parameter with the test name as a way of telling
+the end point what test is running so it can deliver the right content.
+
+### Assertion Lists ###
+
+The `assertion` list is an ordered list of assertions that will be evaluated
+against the submitted content. The list is *required*, and MUST have at least
+one entry. Entries in the list have the following types:
+
+* AssertionObject
+
+An in-line Object as defined in the section [Assertion
+Objects](#assertionObjects).
+* URI
+
+A relative or absolute URI that references a AssertionObject in a .json file.
+If the URI is relative but contains no slashes, then it is considered to be
+in the current directory. If the URI is relative, contains slashes, but
+**does not start with a slash** then it is considered relative to the top of
+the tree of the current test collection (e.g., `annotation-model`).
+* List @@@ATRISK@@@
+
+A nested Assertion List. While nested Assertion Lists are optional, if one
+is present it MUST have at least one entry. Entries are as in this list.
+Assertion Lists can be nested to any depth (but don't do that - it would be
+too hard to maintain).
+
+
+Assertion Objects
+-----------------
+
+In this collection of tests, Assertion Objects can be contained inline in the
+`.test` files or contained in external files with the suffix `.json`. The
+vocabularly and structure is as defined in [JSON Schema
+v4](http://json-schema.org/documentation.html) augmented with some additional
+properties defined in this section.
+
+In general each JSON Schema definition provided in this test suite should be as
+minimal as possible. This promotes clarity and increases the likelihood that
+it is correct. While it is ---possible--- to create JSON Schema files that
+enforce many different requirements on a data model, it increases the
+complexity and can also reduce the atomicity of tests / sub-tests (because a
+ test ends up testing more than one thing). Please try to avoid creating
+complex JSON Schema. (A notable exception is the situation where multiple
+ properties of a structure are interdependent.)
+
+Tools such as [the JSON Schema Creator](http://jsonschema.net/) may be helpful
+in creating schema snippets that can be integrated into JSONtest Assertion
+Objects. Remember that the JSON Schema you create should be as permissive as
+possible to address the various shapes that a give property might take (e.g., a
+ 'foo' might be a string or an object that contains sub-properties that express
+ the string, or an array of 1 or more objects with those sub-properties).
+
+In addition to the validation keys defined in JSON Schema v4, Schema files in
+this collection are also permitted to use the following keywords:
+
+|Keyword | Values | Meaning |
+|---------------|-----------------|---------|
+|onUnexpectedResult | `failAndContinue`, `failAndSkip`, `failAndAbort`, `passAndContinue`, `passAndSkip`, `passAndAbort` | Action to take when the result is not as expected. Default is `failAndContinue` |
+|assertionType | `must`, `may`, `should` | Informs the system about the severity of a failure. The default is `must` |
+|assertionFile | URI | An external file that contains an assertion SCHEMA. When this value is supplied, and local properties will override the ones loaded from the external file.
+|errorMessage | string | A human readable explanation of what it means if the test fails. |
+|expectedResult | `valid`, `invalid` | Tells the framework whether validating against this schema is expected to succeed or fail. The default is `valid` |
+
+
+### Example Assertion Object ###
+
+
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Verify annotation has @context",
+ "type": "object",
+ "expectedResult" : "valid",
+ "properties": {
+ "@context": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "anyOf": [
+ {
+ "type": "string"
+ }
+ ]
+ }
+ ],
+ "not": {"type": "object"}
+ }
+ },
+ "required": ["@context"]
+}
+
+
+Note that in the case where a feature is *optional* the JSON Schema MUST be
+crafted such that if the attribute is permitted to be missing from the content
+(so that the result is `true`), but when the attribute is present in the
+content it conforms to any requirements.
+
+
+
+Condition Objects
+-----------------
+
+A Condition Object is a sub-class of an Assertion Object. It allows the
+specification of the evaluation strategy for the assertions referenced by the
+object. An object is a Condition Object IFF it has a `assertions` property. In
+this case, there MUST NOT be an `assertionFile` property.
+
+
+|Keyword | Values | Meaning |
+|---------------|-----------------|---------|
+|compareWith | `and`, `or` | How should the result of any referenced assertions be compared. Defaults to `and`. Note that this implies there is also an assertions property with a nested list of assertions to compare. |
+|assertions | a list of assertions as in a Test Case above. This is required if there is a compareWith property |
+
+
+An example of a test that would pass if there were an `@context` OR there were an `@id`:
+
+
+{
+ "@context": "https://www.w3.org/ns/JSONtest-v1.jsonld",
+ "name": "A test that has an 'or' clause",
+ "description": "A complex test that uses or-ing among a list of assertions",
+ "ref": "https://www.w3.org/TR/annotation-model/#model",
+ "testType": "manual",
+ "assertions": [
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "must have context or id",
+ "description": "A more complex example that allows one of many options to pass",
+ "assertions": [
+ { "title": "Condition Object",
+ "description": "A pseudo-test that will get a result from the aggregate of its children",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "errorMessage": "Error: None of the various options were present",
+ "compareWith": "or",
+ "assertions": [
+ "common/has_context.json",
+ "common/has_id.json"
+ ]
+ }
+ ]
+ }
+ ]
+}
+
+
+
+Command Line Tools
+------------------
+
+### Building the Test Files ###
+
+The actual .html test case files are generated using the script
+tools/make_tests.py. This script will search the directory heriarchy looking for
+files ending on `.test` and creating `.html` files from them using the template in
+the tools folder. If you want to regenerate the examples too, supply the
+`--examples` option to the script.
+
+Note that when submitting tests to the repository, the `.html` versions must be
+included.
+
+### Testing the Tests ###
+
+### Driving Tests with Input Files ###
+
+Complex Examples
+----------------
+
+This section is a collection of more complex examples to illustrate the
+expressive power of the [Assertion List](#assertionLists) structure. These can
+be used as templates for creating actual `.test` files.
+
+### Including and Overriding an Assertion ###
+
+Assertions can be contained in external `.json` files. It is possible for an
+object in an Assertion List to include the external file and override one or
+more of its properties:
+
+
+{
+ "@context": "https://www.w3.org/ns/JSONtest-v1.jsonld",
+ "name": "Permit no target property",
+ "description": "Ensure there is no 'target' property when there is a 'randomName' property in the Annotation",
+ "assertions": [
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Verify annotation has randomName",
+ "type": "object",
+ "properties": {
+ "randomName": {
+ "type": "string"
+ }
+ },
+ "required": ["randomName"]
+ },
+ { "assertionFile" : "common/target.json",
+ "title" : "Require target to be missing",
+ "expectedResult" : "invalid",
+ "errorMessage" : "The target MUST not be present when 'randomName' is also present",
+ }
+ ]
+}
+
+
+### Nested Assertion Collections with Skip ###
+
+Assertion Lists can be nested within Assertion Lists. This feature, combined
+with the `onUnexpectedResult` property, makes it possible to skip a collection
+of tests when an assertion in the list is not satisfied:
+
+
+{
+ "@context": "https://www.w3.org/ns/JSONtest-v1.jsonld",
+ "name": "If there is no 'target' property, skip some tests",
+ "description": "When 'target' is not present, other properties related to 'target' are not required",
+ "assertions": [
+ "common/context.json",
+ [
+ { "assertionFile" : "common/target.json",
+ "errorMessage" : "Target was not present so skip the rest of this section",
+ "onUnexpectedResult" : "failAndSkip"
+ },
+ "sometest.json",
+ "sometest2.json",
+ "sometest3.json"
+ ]
+ ]
+} ;
+
+
+### Assertion that finds a specific @context Value ###
+
+Sometimes you want a property to be flexible, but to have one and only one of a
+specific value. This is especially true with, for example, @context in JSON-LD.
+One way you might do this is:
+
+
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Verify a specific @context",
+ "type": "object",
+ "expectedResult" : "valid",
+ "properties": {
+ "@context": {
+ "anyOf": [
+ {
+ "type": "string"
+ "enum": [ "http://www.w3.org/ns/anno.jsonld" ]
+ },
+ {
+ "type": "array",
+ "minitems": "1",
+ "uniqueItems": true,
+ "additionalItems": true,
+ "items" : [
+ { "type": "string",
+ "enum": [ "http://www.w3.org/ns/anno.jsonld" ]
+ }
+ ]
+ }
+ ],
+ "not": {"type": "object"}
+ }
+ },
+ "required": ["@context"]
+}
+
+
diff --git a/testing/web-platform/tests/annotation-model/META.yml b/testing/web-platform/tests/annotation-model/META.yml
new file mode 100644
index 0000000000..b1ced95891
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/META.yml
@@ -0,0 +1,4 @@
+spec: https://www.w3.org/TR/annotation-model/
+suggested_reviewers:
+ - halindrome
+ - bigbluehat
diff --git a/testing/web-platform/tests/annotation-model/README.md b/testing/web-platform/tests/annotation-model/README.md
new file mode 100644
index 0000000000..5eea9be2cb
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/README.md
@@ -0,0 +1,81 @@
+Annotation-model: Tests for the Web Annotation Data Model
+=========================================================
+
+The [Web Annotation Data Model](https://www.w3.org/TR/annotation-model)
+specification presents a JSON-oriented collection of terms and structure that
+permit the sharing of annotations about other content.
+
+The purpose of these tests is to help validate that each of the structural
+requirements expressed in the Data Model specification are properly supported
+by implementations.
+
+The general approach for this testing is to enable both manual and automated
+testing. However, since the specification has no actual user interface
+requirements, there is no general automation mechanism that can be presented
+for clients. Instead, the automation mechanism is one where client
+implementors could take advantage of the plumbing we provide here to push their
+data into the tests and collect the results of the testing. This assumes
+knowledge of the requirements of each test / collection of tests so that the
+input data is relevant. Each test or test collection contains information
+sufficient for the task.
+
+Running Tests
+-------------
+
+In the case of this test collection, we will be initially creating manual
+tests. These will automatically determine pass or fail and generate output for
+the main WPT window. The plan is to minimize the number of such tests to
+ease the burden on the testers while still exercising all the features.
+
+The workflow for running these tests is something like:
+
+1. Start up the test driver window and select the annotation-model tests -
+ click "Start"
+2. A window pops up that shows a test - the description of which tells the
+ tester what input is expected. The window contains a textarea into which
+ the input can be typed / pasted, along with a button to click to start
+ testing that input.
+3. The tester (presumably in another window) brings up their annotation client
+ and uses it to generate an annotation that supplies the requested structure.
+ They then copy / paste that into the aforementioned textarea and select the
+ button.
+4. The test runs. Success or failure is determined and reported to the test
+ driver window, which then cycles to the next test in the sequence.
+5. Repeat steps 2-4 until done.
+6. Download the JSON format report of test results, which can then be visually
+ inspected, reported on using various tools, or passed on to W3C for
+ evaluation and collection in the Implementation Report via github.
+
+**Remember that while these tests are written to help exercise implementations,
+their other (important) purpose is to increase confidence that there are
+interoperable implementations.** So, implementers are our audience, but these
+tests are not meant to be a comprehensive collection of tests for a client that
+might implement the Recommendation. The bulk of the tests are manual because
+there are no UI requirements in the Recommendation that would make it possible
+to effectively stimulate every client portably.
+
+Having said that, because the structure of these "manual" tests is very rigid,
+it is possible for an implementer who understands test automation to use an
+open source tool such as [Selenium](http://www.seleniumhq.org/) to run these
+"manual" tests against their implementation - exercising their implementation
+against content they provide to create annotations and feed the data into our
+test input field and run the test.
+
+Capturing and Reporting Results
+-------------------------------
+
+As tests are run against implementations, if the results of testing are
+submitted to [test-results](https://github.com/w3c/test-results/) then they will
+be automatically included in documents generated by
+[wptreport](https://www.github.com/w3c/wptreport). The same tool can be used
+locally to view reports about recorded results.
+
+
+Automating Test Execution
+-------------------------
+
+Writing Tests
+-------------
+
+If you are interested in writing tests for this environment, see the
+associated [CONTRIBUTING](CONTRIBUTING.md) document.
diff --git a/testing/web-platform/tests/annotation-model/TODO b/testing/web-platform/tests/annotation-model/TODO
new file mode 100644
index 0000000000..d2855cc9f4
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/TODO
@@ -0,0 +1,13 @@
+Things still to be developed:
+
+Script to run .jsonld files in tools/tests against .test files
+
+Script to batch run submitted .jsonld files from an implementation against .test
+files
+
+Websocket communication to runner tests with a corresponding listener that an
+implementation could use to auto-submit jsonld into the "manual" tests
+
+Add a Skip option to tools/runner
+
+Add a tuple mode for evaluating RDF declaratively as well.
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.1-annotationContextValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationContextValidated.json
new file mode 100644
index 0000000000..b5c165f3c4
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationContextValidated.json
@@ -0,0 +1,20 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.1-annotationContextValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation is missing @context key or 'http://www.w3.org/ns/anno.jsonld' is not a value of @context.",
+ "title": "Implements **_@context_ key** and '**http://www.w3.org/ns/anno.jsonld**' is **a value of _@context_** - [model 3.1](https://www.w3.org/TR/annotation-model/#annotations)",
+ "description": "True when the Annotation has @context key and 'http://www.w3.org/ns/anno.jsonld' is an @context value (Section 3.1)",
+ "type": "object",
+ "required": [ "@context" ],
+ "properties": {
+ "@context": {
+ "oneOf": [
+ { "$ref": "annotations.json#/definitions/contextValueFound" },
+ { "$ref": "annotations.json#/definitions/contextValueInArrayFound" }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.1-annotationIdValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationIdValidated.json
new file mode 100644
index 0000000000..5c31fa9104
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationIdValidated.json
@@ -0,0 +1,11 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.1-annotationIdValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation is missing id key or its value is not a single string of format uri.",
+ "title": "Implements **Annotation _id_ key** which has a **single value** that is a **string of format uri** - [model 3.1](https://www.w3.org/TR/annotation-model/#annotations)",
+ "description": "True when the Annotation has a single id that is a string of format uri (Section 3.1)",
+ "$ref": "id.json#/definitions/idValueFound"
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.1-annotationTypeValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationTypeValidated.json
new file mode 100644
index 0000000000..a2a6c84b4a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationTypeValidated.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.1-annotationTypeValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation is missing type key or 'Annotation' is not a value of type.",
+ "title": "Implements **Annotation _type_ key** and '**Annotation**' is **a value of _type_** - [model 3.1](https://www.w3.org/TR/annotation-model/#annotations)",
+ "allOf": [
+ { "$ref": "annotations.json#/definitions/annotationTypeValueFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.1-bodyKeyFound.json b/testing/web-platform/tests/annotation-model/annotations/3.1-bodyKeyFound.json
new file mode 100644
index 0000000000..8c9ba13f8a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.1-bodyKeyFound.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.1-bodyKeyFound.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Should have a body.",
+ "title": "Implements **_body_ key** - [model 3.1](https://www.w3.org/TR/annotation-model/#annotations)",
+ "description": "True when the Annotation has a body key (Section 3.1)",
+ "type": "object",
+ "required": ["body" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.1-targetKeyFound.json b/testing/web-platform/tests/annotation-model/annotations/3.1-targetKeyFound.json
new file mode 100644
index 0000000000..b1bb0e2141
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.1-targetKeyFound.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.1-targetKeyFound.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "Error: Annotation is missing target key.",
+ "title": "Implements **_target_ key** - [model 3.1](https://www.w3.org/TR/annotation-model/#annotations)",
+ "description": "True when the Annotation has a target key (Section 3.1)",
+ "type": "object",
+ "required": ["target" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.2-bodyObjectsRecognized.json b/testing/web-platform/tests/annotation-model/annotations/3.2-bodyObjectsRecognized.json
new file mode 100644
index 0000000000..29a068da33
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.2-bodyObjectsRecognized.json
@@ -0,0 +1,22 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2-bodyObjectsRecognized.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: One or more Bodies of the Annotation is not one of a string of format uri, an External Web Resource, a Choice or Set, a Specific Resource.",
+ "title": "If present, each **_body_** is one of a **string of format uri**, an **External Web Resource**, an **Embedded Textual Body**, a **Choice** or **Set**, or a **Specific Resource** - [model 3.2](https://www.w3.org/TR/annotation-model/#bodies-and-targets), [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)",
+ "description": "True when all Bodies are one of a string of format uri, an External Web Resource, a Choice or Set, a Specific Resource (Sections 3.2, Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {"oneOf": [
+ { "$ref": "bodyTarget.json#/definitions/bodyResourcesFound" },
+ { "type" : ["array"],
+ "items": { "$ref": "bodyTarget.json#/definitions/bodyResourcesFound" }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.2-targetObjectsRecognized.json b/testing/web-platform/tests/annotation-model/annotations/3.2-targetObjectsRecognized.json
new file mode 100644
index 0000000000..ce2dc22dd6
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.2-targetObjectsRecognized.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2-targetObjectsRecognized.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: One or more Targets of the Annotation is not one of a string of format uri, an External Web Resource, a Choice or Set, a Specific Resource.",
+ "title": "Each **_target_** is one of a **string of format uri**, an **External Web Resource**, a **Choice** or **Set**, or a **Specific Resource** - [model 3.2](https://www.w3.org/TR/annotation-model/#bodies-and-targets), [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)",
+ "description": "True when all Target(s) are one of a string of format uri, an External Web Resource, a Choice or Set, a Specific Resource (Sections 3.2, Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {"oneOf": [
+ { "$ref": "bodyTarget.json#/definitions/targetResourcesFound" },
+ { "type" : ["array"],
+ "items": { "$ref": "bodyTarget.json#/definitions/targetResourcesFound" }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueImplemented.json
new file mode 100644
index 0000000000..bce28da0b5
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.1-bodyValueImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "bodyValue key not found. Annotation May have exactly one bodyValue (if no body also included).",
+ "title": "Implements **_bodyValue_ key** which has a **single value** that is a **string** [model 3.2.5](https://www.w3.org/TR/annotation-model/#string-body)",
+ "description": "True when the Annotation implements a bodyValue key (Section 3.2.5)",
+ "allOf":
+ [
+ { "$ref": "annotations.json#/definitions/bodyValueFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueValidated.json
new file mode 100644
index 0000000000..d36ee8c60a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueValidated.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.5-bodyValueValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation has multiple bodyValue key values or a single bodyValue key value that is not of type string.",
+ "title": "If present the **_bodyValue_ key** has a **single value** that is a **string** - [model 3.2.5](https://www.w3.org/TR/annotation-model/#string-body)",
+ "description": "True when no Annotation bodyValue or the Annotation bodyValue key value is a single string (Section 3.2.5)",
+ "allOf": [
+ { "$ref": "annotations.json#/definitions/bodyValueValidIfPresent" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.2.5-notBodyBodyValue.json b/testing/web-platform/tests/annotation-model/annotations/3.2.5-notBodyBodyValue.json
new file mode 100644
index 0000000000..f47d6f5754
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.2.5-notBodyBodyValue.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.5-notBodyBodyValue.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: body and bodyValue are exclusive keys; a single annotation cannot have both.",
+ "title": "Annotation has a **_body_ key**, or a **_bodyValue_ key**, or **neither**, but **NEVER both** - [model 3.2.5](https://www.w3.org/TR/annotation-model/#string-body)",
+ "description": "True when the Annotation does not have both body key and bodyValue key (Section 3.2.5)",
+ "type": "object",
+ "not":
+ { "required": [ "body", "bodyValue"] }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedImplemented.json
new file mode 100644
index 0000000000..eaab005ad4
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-annotationCreatedImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Valid Annotation-level created key not found. Annotation should have exactly one created key value.",
+ "title": "Implements Annotation-level **_created_ key** which has a **single value** that is a **string of format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when the Annotation implements exactly one created key value (Section 3.3.1)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/createdPropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedValidated.json
new file mode 100644
index 0000000000..5b7435d4d3
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedValidated.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-annotationCreatedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation has multiple created key values or a single created key value that is not of format date-time.",
+ "title": "If present the Annotation-level **_created_ key** has a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no Annotation created key present or when created key has a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatorImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatorImplemented.json
new file mode 100644
index 0000000000..ffe70598de
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatorImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-annotationCreatorImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "creator key not found. Annotation may have zero or more creators.",
+ "title": "Implements **_creator_ key** which has one or more values, each of which is a **string of format uri** or an **object** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when the Annotation implements creator key (Section 3.3.1)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/creatorPropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedImplemented.json
new file mode 100644
index 0000000000..0820ae4b33
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-annotationGeneratedImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Valid Annotation-level generated key not found. Annotation may have zero or exactly one generated key value.",
+ "title": "Implements Annotation-level **_generated_ key** which has a **single value** that is a **string of format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when the Annotation implements exactly one generated key value (Section 3.3.1)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/generatedPropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedValidated.json
new file mode 100644
index 0000000000..29a51a7f13
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedValidated.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-annotationGeneratedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation has multiple generated key values or a single generated key value that is not of format date-time.",
+ "title": "If present the Annotation-level **_generated_ key** has a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no Annotation generated key present or when generated key has a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "otherProperties.json#/definitions/generatedValidIfPresent" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratorImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratorImplemented.json
new file mode 100644
index 0000000000..adc1dd58f5
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratorImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-annotationGeneratorImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "generator key not found. Annotation may have zero or more generators.",
+ "title": "Implements **_generator_ key** which has one or more values, each of which is a **string of format uri** or an **object** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information).",
+ "description": "True when the Annotation implements generator key (Section 3.3.1)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/generatorPropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedImplemented.json
new file mode 100644
index 0000000000..3bd8d4cef8
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-annotationModifiedImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Valid Annotation-level modified key not found. Annotation may have zero or exactly one modified key value.",
+ "title": "Implements Annotation-level **_modified_ key** which has a **single value** that is a **string of format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when the Annotation implements exactly one modified key value (Section 3.3.1)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/modifiedPropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedValidated.json
new file mode 100644
index 0000000000..cc7980afaf
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedValidated.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-annotationModifiedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation has multiple modified key values or a single modified key value that is not of format date-time.",
+ "title": "If present the Annotation-level **_modified_ key** has a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no Annotation modified key present or when modified key has a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationSingleCreatorImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationSingleCreatorImplemented.json
new file mode 100644
index 0000000000..b0bd901d9f
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationSingleCreatorImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-annotationSingleCreatorImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation SHOULD have a creator key with a single value.",
+ "title": "Implements Annotation-level **_creator_ key** with a **single value** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": " (Section 3.3.1)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-singleAnnotationCreatorImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-singleAnnotationCreatorImplemented.json
new file mode 100644
index 0000000000..b7da822a69
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-singleAnnotationCreatorImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-singleAnnotationCreatorImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": " Annotation should have exactly one creator.",
+ "title": "Annotation implements creator key with single value.",
+ "description": "True when the Annotation implements creator key with single value (Section 3.3.1)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmailImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmailImplemented.json
new file mode 100644
index 0000000000..6d41632ec2
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmailImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationCreatorAgentEmailImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email for Annotation Creator (Agent) not found. Agents may have one or more email values.",
+ "title": "Implements Annotation-level creator (Agent) **_email_ key** with one or more values, each of which is a **mailto: uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email values for Annotation Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentEmailFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmailFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmail_sha1Implemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmail_sha1Implemented.json
new file mode 100644
index 0000000000..78aa363a52
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmail_sha1Implemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationCreatorAgentEmail_sha1Implemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email_sha1 for Annotation Creator (Agent) not found. Agents may have one or more email_sha1 values.",
+ "title": "Implements Annotation-level creator (Agent) **email_sha1 key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email_sha1 values for Annotation Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentHomepageImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentHomepageImplemented.json
new file mode 100644
index 0000000000..ff000a8261
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentHomepageImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationCreatorAgentHomepageImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Homepage for Annotation Creator (Agent) not found. Agents may have one or more homepage values.",
+ "title": "Implements Annotation-level creator (Agent) **_homepage_ key** with one or more values, each of which is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more homepage values for Annotation Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentHomepageFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentHomepageFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentIdImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentIdImplemented.json
new file mode 100644
index 0000000000..0a2ee9c9ae
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentIdImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationCreatorAgentIdImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Id for Annotation Creator (Agent) not found or more than 1 found. Agents should have exactly one id of format uri.",
+ "title": "Implements Annotation-level creator (Agent) **_id_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Annotation Creator (Agent) has exactly one id (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "id.json#/definitions/idValueFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "id.json#/definitions/idValueFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNameImplemented.json
new file mode 100644
index 0000000000..d30cd043d1
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNameImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationCreatorAgentNameImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Name for Annotation Creator (Agent) not found. Agents may have one or more name values.",
+ "title": "Implements Annotation-level creator (Agent) **_name_ key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more name values for Annotation Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentNameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentNameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNicknameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNicknameImplemented.json
new file mode 100644
index 0000000000..782d3a66c2
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNicknameImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationCreatorAgentNicknameImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Nickname for Annotation Creator (Agent) not found. Agents should have exactly one nickname value.",
+ "title": "Implements Annotation-level creator (Agent) **_nickname_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when exactly one nickname for Annotation Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentSingleNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentSingleNameImplemented.json
new file mode 100644
index 0000000000..6d52e89832
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentSingleNameImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationCreatorAgentSingleNameImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Single name for Annotation Creator (Agent) not found. Agents should have exactly one name value.",
+ "title": "Implements Annotation-level creator (Agent) **_name_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when exactly one name for Annotation Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentSingularNameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentSingularNameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentTypeImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentTypeImplemented.json
new file mode 100644
index 0000000000..5c8bb76231
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentTypeImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationCreatorAgentTypeImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Type (Person, Organization, Software) for Annotation Creator (Agent) not found. Agents should have one or more type values.",
+ "title": "Implements Annotation-level creator (Agent) **_type_ key** with one or more values from **model-recommended list (Person, Organization, Software)** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Annotation Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentTypeFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentTypeFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmailImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmailImplemented.json
new file mode 100644
index 0000000000..1f61984356
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmailImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationGeneratorAgentEmailImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email for Annotation Generator (Agent) not found. Agents may have one or more email values.",
+ "title": "Implements Annotation-level generator (Agent) **_email_ key** with one or more values, each of which is a **mailto: uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email values for Annotation Generator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "generator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentEmailFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmailFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["generator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmail_sha1Implemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmail_sha1Implemented.json
new file mode 100644
index 0000000000..f864f24ae7
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmail_sha1Implemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationGeneratorAgentEmail_sha1Implemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email_sha1 for Annotation Generator (Agent) not found. Agents may have one or more email_sha1 values.",
+ "title": "Implements Annotation-level generator (Agent) **email_sha1 key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email_sha1 values for Annotation Generator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "generator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" } } }
+ }
+ ]
+ }
+ },
+ "required": ["generator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentHomepageImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentHomepageImplemented.json
new file mode 100644
index 0000000000..664f5a5cf1
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentHomepageImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationGeneratorAgentHomepageImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Homepage for Annotation Generator (Agent) not found. Agents may have one or more homepage values.",
+ "title": "Implements Annotation-level generator (Agent) **_homepage_ key** with one or more values, each of which is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more homepage values for Annotation Generator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "generator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentHomepageFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentHomepageFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["generator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentIdImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentIdImplemented.json
new file mode 100644
index 0000000000..59a70dbb47
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentIdImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationGeneratorAgentIdImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Id for Annotation Generator (Agent) not found or more than 1 found. Agents should have exactly one id of format uri.",
+ "title": "Implements Annotation-level generator (Agent) **_id_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Annotation Generator (Agent) has exactly one id (Section 3.3.2)",
+ "properties":
+ { "generator":
+ { "oneOf":
+ [
+ { "$ref": "id.json#/definitions/idValueFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "id.json#/definitions/idValueFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["generator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNameImplemented.json
new file mode 100644
index 0000000000..eeb8722b36
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNameImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationGeneratorAgentNameImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Name for Annotation Generator (Agent) not found. Agents may have one or more name values.",
+ "title": "Implements Annotation-level generator (Agent) **_name_ key** with one or more values. [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more name values for Annotation Generator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "generator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentNameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentNameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["generator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNicknameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNicknameImplemented.json
new file mode 100644
index 0000000000..ae8e235dea
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNicknameImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationGeneratorAgentNicknameImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Nickname for Annotation Generator (Agent) not found. Agents should have exactly one nickname value.",
+ "title": "Implements Annotation-level generator (Agent) **_nickname_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when exactly one nickname for Annotation Generator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "generator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["generator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentSingleNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentSingleNameImplemented.json
new file mode 100644
index 0000000000..a657e5cac1
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentSingleNameImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationGeneratorAgentSingleNameImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Single name for Annotation Generator (Agent) not found. Agents should have exactly one name value.",
+ "title": "Implements Annotation-level generator (Agent) **_name_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when exactly one name for Annotation Generator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "generator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentSingularNameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentSingularNameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["generator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentTypeImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentTypeImplemented.json
new file mode 100644
index 0000000000..4d12fbd07e
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentTypeImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-annotationGeneratorAgentTypeImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Type (Person, Organization, Software) for Annotation Generator (Agent) not found. Agents should have one or more type values.",
+ "title": "Implements Annotation-level generator (Agent) **_type_ key** with one or more values from **model-recommended list (Person, Organization, Software)** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Annotation Generator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "generator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentTypeFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentTypeFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["generator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.3-annotationAudienceImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.3-annotationAudienceImplemented.json
new file mode 100644
index 0000000000..164a45d999
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.3-annotationAudienceImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.3-annotationAudienceImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "audience key not found. An Annotation may have one or more audience values.",
+ "title": "Implements **_audience_ key** which has one or more values with each audience instance described using **[schema.org/Audience](http://schema.org/Audience) classes and properties** - [model 3.3.3](https://www.w3.org/TR/annotation-model/#intended-audience)",
+ "description": "True when the Annotation has an audience key (Section 3.3.3)",
+ "allOf":
+ [
+ {"$ref": "otherProperties.json#/definitions/audiencePropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationMotivationImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationMotivationImplemented.json
new file mode 100644
index 0000000000..3933df5bb6
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationMotivationImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.5-annotationMotivationImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "motivation key with value from model motivation list not found. Annotation may have zero or more motivations with values drawn from model ontology.",
+ "title": "Implements **_motivation_ key** which has one or more values, each of which is from the **model's list of Motivations** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)",
+ "description": "True when the Annotation implements motivation key with value(s) drawn from model motivation ontology (Section 3.3.5)",
+ "allOf":
+ [
+ { "$ref": "annotations.json#/definitions/motivationPropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationSingleMotivationImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationSingleMotivationImplemented.json
new file mode 100644
index 0000000000..1f6358a083
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationSingleMotivationImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.5-annotationSingleMotivationImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": " Annotation SHOULD have a motivation key with a single value from model motivation ontology.",
+ "title": "Implements **_motivation_ key** with a **single value** that is from the **model's list of Motivations** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)",
+ "description": "True when the Annotation has motivation key with a single value from model motivation ontology (Section 3.3.5)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "annotations.json#/definitions/singleMotivationPropertyFound" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsImplemented.json
new file mode 100644
index 0000000000..a2e2a99370
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.6-annotationRightsImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotatoin-level rights key having string value(s) of format uri not found. Annotation may have zero or more rights key values.",
+ "title": "Implements Annotation-level **_rights_** key which has one or more values, each of which is a **string of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)",
+ "description": "True when the Annotation implements rights key with with string(s) of format uri value(s) (Section 3.3.6)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/rightsPropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsValidated.json
new file mode 100644
index 0000000000..40c025f689
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsValidated.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.6-annotationRightsValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation has one or more values for the rights key are not strings of format uri.",
+ "title": "If present the Annotation-level **_rights_ key** has values that are all **strings of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)",
+ "description": "True when no Annotation rights key present or when all values of rights key are strings of format uri (Section 3.3.6)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalImplemented.json
new file mode 100644
index 0000000000..1f58d84b0a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-annotationCanonicalImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "canonical key having a single string value of format uri not found. Annotation may have canonical key with exactly one value.",
+ "title": "Implements Annotation-level **_canonical_ key** which has a single value that is a **string of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)",
+ "description": "True when the Annotation implements canonical key with with single string of format uri value (Section 3.3.7)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/canonicalPropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalValidated.json
new file mode 100644
index 0000000000..db1a9c27f0
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalValidated.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-annotationCanonicalValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation has more than one value for canonical key or value for canonical key is not of format uri.",
+ "title": "If present the Annotation-level **_canonical_ key** has a **single value** that is a **string of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)",
+ "description": "True when no Annotation canonical key present or when value of canonical key is singular and of format uri (Section 3.3.7)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaImplemented.json
new file mode 100644
index 0000000000..f25cfb0270
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-annotationViaImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation-level via key with string(s) of format uri as value(s) not found. Annotation may have via key with one or more values.",
+ "title": "Implements Annotation-level **_via_ key** which has one or more values, each of which is a **string of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)",
+ "description": "True when the Annotation implements via key with with string(s) of format uri as value(s) (Section 3.3.7)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/viaPropertyFound"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaValidated.json
new file mode 100644
index 0000000000..b7787b5a67
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaValidated.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-annotationViaValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation values for via key are not of format uri.",
+ "title": "If present the Annotation-level **_via_ key** has values that are all **strings of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)",
+ "description": "True when no Annotation via key present or when all values of via key are strings of format uri (Section 3.3.7)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/4.4-annotationStylesheetImplemented.json b/testing/web-platform/tests/annotation-model/annotations/4.4-annotationStylesheetImplemented.json
new file mode 100644
index 0000000000..d5a264732d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/4.4-annotationStylesheetImplemented.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.4-annotationStylesheetImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "stylesheet key with exactly one value not found. Annotation may have stylesheet key with exactly one value.",
+ "title": "Implements **_stylesheet_ key** which has a **single value** that is an **object or string of format uri**. [model 4.4](https://www.w3.org/TR/annotation-model/#styles)",
+ "description": "True when the Annotation implements stylesheet key with exactly one value (object or string of format uri)(Section 4.4)",
+ "allOf":
+ [
+ { "$ref": "annotations.json#/definitions/stylesheetDetected"}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/annotationMusts-manual.html b/testing/web-platform/tests/annotation-model/annotations/annotationMusts-manual.html
new file mode 100644
index 0000000000..6116e4e776
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/annotationMusts-manual.html
@@ -0,0 +1,48 @@
+
+
+
+
Note: Implementation of optional Annotation keys (features), optional constraints on key values, and optional keys and constraints on Agents involved in an Annotation checked by other tests.",
+ "testType": "manual",
+ "ref": "https://www.w3.org/TR/annotation-model/",
+ "assertions": [
+ "annotations/3.1-annotationContextValidated.json",
+ "annotations/3.1-annotationIdValidated.json",
+ "annotations/3.1-annotationTypeValidated.json",
+ "annotations/3.1-targetKeyFound.json",
+ "annotations/3.2-targetObjectsRecognized.json",
+ "annotations/3.2.5-notBodyBodyValue.json",
+ "annotations/3.2-bodyObjectsRecognized.json",
+ "annotations/3.2.5-bodyValueValidated.json",
+ "annotations/3.3.1-annotationCreatedValidated.json",
+ "annotations/3.3.1-annotationModifiedValidated.json",
+ "annotations/3.3.1-annotationGeneratedValidated.json",
+ "annotations/3.3.6-annotationRightsValidated.json",
+ "annotations/3.3.7-annotationCanonicalValidated.json",
+ "annotations/3.3.7-annotationViaValidated.json",
+ "annotations/bodiesTargets/3.2.1-bodyTextDirectionValidated.json",
+ "annotations/bodiesTargets/3.3.1-bodyCreatedValidated.json",
+ "annotations/bodiesTargets/3.3.1-bodyModifiedValidated.json",
+ "annotations/bodiesTargets/3.3.6-bodyRightsValidated.json",
+ "annotations/bodiesTargets/3.3.7-bodyCanonicalValidated.json",
+ "annotations/bodiesTargets/3.3.7-bodyViaValidated.json",
+ "annotations/bodiesTargets/3.2.7-bodyEWRNoItems.json",
+ "annotations/bodiesTargets/3.3.5-bodyEWRNoPurpose.json",
+ "annotations/bodiesTargets/3.2.4-bodyChoiceSetNoValue.json",
+ "annotations/bodiesTargets/4-bodyChoiceSetNoSource.json",
+ "annotations/bodiesTargets/3.3.5-bodyChoiceSetNoPurpose.json",
+ "annotations/bodiesTargets/3.2.7-bodyEmbeddedTextualNoItems.json",
+ "annotations/bodiesTargets/4-bodyEmbeddedTextualNoSource.json",
+ "annotations/bodiesTargets/3.2.7-bodySpecificResourceNoItems.json",
+ "annotations/bodiesTargets/4-bodySpecificResourceNoValue.json",
+ "annotations/bodiesTargets/3.2.1-targTextDirectionValidated.json",
+ "annotations/bodiesTargets/3.3.1-targCreatedValidated.json",
+ "annotations/bodiesTargets/3.3.1-targModifiedValidated.json",
+ "annotations/bodiesTargets/3.3.6-targRightsValidated.json",
+ "annotations/bodiesTargets/3.3.7-targCanonicalValidated.json",
+ "annotations/bodiesTargets/3.3.7-targViaValidated.json",
+ "annotations/bodiesTargets/3.2.7-targEWRNoItems.json",
+ "annotations/bodiesTargets/3.3.5-targEWRNoPurpose.json",
+ "annotations/bodiesTargets/3.2.4-targChoiceSetNoValue.json",
+ "annotations/bodiesTargets/4-targChoiceSetNoSource.json",
+ "annotations/bodiesTargets/3.3.5-targChoiceSetNoPurpose.json",
+ "annotations/bodiesTargets/3.2.7-targSpecificResourceNoItems.json",
+ "annotations/bodiesTargets/4-targSpecificResourceNoValue.json",
+ "annotations/bodiesTargets/3.2.4-targNoTypeTextualBody.json",
+ "annotations/specificResource/4.2-selectorValidIfPresent.json",
+ "annotations/specificResource/4.3-stateValidIfPresent.json",
+ "annotations/specificResource/4.3.3-refinedByValidated.json",
+ "annotations/specificResource/4.4-styleClassValidIfPresent.json",
+ "annotations/specificResource/4.2-fragmentCssXPathSelectorValid.json",
+ "annotations/specificResource/4.2.4-textQuoteSelectorValid.json",
+ "annotations/specificResource/4.2-TextDataPositionSelectorValid.json",
+ "annotations/specificResource/4.2.7-svgSelectorValid.json",
+ "annotations/specificResource/4.2.8-rangeSelectorValid.json",
+ "annotations/specificResource/4.3.1-timeStateValid.json",
+ "annotations/specificResource/4.3.2-httpRequestStateValid.json"
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/annotationOptionals-manual.html b/testing/web-platform/tests/annotation-model/annotations/annotationOptionals-manual.html
new file mode 100644
index 0000000000..5d73034b48
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/annotationOptionals-manual.html
@@ -0,0 +1,48 @@
+
+
+
+
Note: failing an assertion indicates that a recommended or optional feature has not been implemented or has not been implemented correctly.",
+ "testType": "manual",
+ "skipFailures": [ "should", "may" ],
+ "ref": "https://www.w3.org/TR/annotation-model/#other-properties",
+ "assertions": [
+ "annotations/3.3.1-annotationSingleCreatorImplemented.json",
+ "annotations/3.3.1-annotationCreatedImplemented.json",
+ "annotations/3.3.5-annotationSingleMotivationImplemented.json",
+ "annotations/3.2.5-bodyValueImplemented.json",
+ "annotations/3.3.1-annotationGeneratedImplemented.json",
+ "annotations/3.3.1-annotationModifiedImplemented.json",
+ "annotations/3.3.3-annotationAudienceImplemented.json",
+ "annotations/3.3.5-annotationMotivationImplemented.json",
+ "annotations/3.3.6-annotationRightsImplemented.json",
+ "annotations/3.3.7-annotationCanonicalImplemented.json",
+ "annotations/3.3.7-annotationViaImplemented.json",
+ "annotations/4.4-annotationStylesheetImplemented.json",
+ "annotations/3.1-bodyKeyFound.json",
+ "annotations/bodiesTargets/3.2.1-bodySingleFormat.json",
+ "annotations/bodiesTargets/3.2.1-bodySingleLanguage.json",
+ "annotations/bodiesTargets/3.3.1-bodySingleCreator.json",
+ "annotations/bodiesTargets/3.3.1-bodyCreated.json",
+ "annotations/bodiesTargets/3.2.1-bodyFormat.json",
+ "annotations/bodiesTargets/3.2.1-bodyLanguage.json",
+ "annotations/bodiesTargets/3.2.2-bodyType.json",
+ "annotations/bodiesTargets/3.2.1-bodyProcessingLanguage.json",
+ "annotations/bodiesTargets/3.2.1-bodyTextDirection.json",
+ "annotations/bodiesTargets/3.3.1-bodyModified.json",
+ "annotations/bodiesTargets/3.3.3-bodyAudience.json",
+ "annotations/bodiesTargets/3.3.4-bodyAccessibility.json",
+ "annotations/bodiesTargets/3.3.5-bodyPurpose.json",
+ "annotations/bodiesTargets/3.3.6-bodyRights.json",
+ "annotations/bodiesTargets/3.3.7-bodyCanonical.json",
+ "annotations/bodiesTargets/3.3.7-bodyVia.json",
+ "annotations/bodiesTargets/3.2.1-bodyEWR.json",
+ "annotations/bodiesTargets/3.2.4-bodyETB.json",
+ "annotations/bodiesTargets/3.2.4-bodyETBTypeTextualBody.json",
+ "annotations/bodiesTargets/3.2.4-bodyETBTypeText.json",
+ "annotations/bodiesTargets/3.2.7-bodyChoice.json",
+ "annotations/bodiesTargets/3.2.1-targSingleFormat.json",
+ "annotations/bodiesTargets/3.2.1-targSingleLanguage.json",
+ "annotations/bodiesTargets/3.3.1-targSingleCreator.json",
+ "annotations/bodiesTargets/3.3.1-targCreated.json",
+ "annotations/bodiesTargets/3.2.1-targFormat.json",
+ "annotations/bodiesTargets/3.2.1-targLanguage.json",
+ "annotations/bodiesTargets/3.2.2-targType.json",
+ "annotations/bodiesTargets/3.2.1-targProcessingLanguage.json",
+ "annotations/bodiesTargets/3.2.1-targTextDirection.json",
+ "annotations/bodiesTargets/3.3.1-targModified.json",
+ "annotations/bodiesTargets/3.3.3-targAudience.json",
+ "annotations/bodiesTargets/3.3.4-targAccessibility.json",
+ "annotations/bodiesTargets/3.3.5-targPurpose.json",
+ "annotations/bodiesTargets/3.3.6-targRights.json",
+ "annotations/bodiesTargets/3.3.7-targCanonical.json",
+ "annotations/bodiesTargets/3.3.7-targVia.json",
+ "annotations/bodiesTargets/3.2.1-targEWR.json",
+ "annotations/bodiesTargets/3.2.7-targChoice.json",
+ "annotations/bodiesTargets/4-bodySpecificResource.json",
+ "annotations/bodiesTargets/4-targSpecificResource.json",
+ "annotations/specificResource/4.3.3-refinedBy.json",
+ "annotations/specificResource/4.4-styleClass.json",
+ "annotations/specificResource/4.5-renderedVia.json",
+ "annotations/specificResource/4.6-scope.json",
+ "annotations/specificResource/4.2-selectorFound.json",
+ "annotations/specificResource/4.2.1-fragmentSelector.json",
+ "annotations/specificResource/4.2.1-conformsTo.json",
+ "annotations/specificResource/4.2.2-cssSelector.json",
+ "annotations/specificResource/4.2.3-xpathSelector.json",
+ "annotations/specificResource/4.2.4-textQuoteSelector.json",
+ "annotations/specificResource/4.2.4-prefix.json",
+ "annotations/specificResource/4.2.4-suffix.json",
+ "annotations/specificResource/4.2.5-textPositionSelector.json",
+ "annotations/specificResource/4.2.6-dataPositionSelector.json",
+ "annotations/specificResource/4.2.7-svgSelector.json",
+ "annotations/specificResource/4.2.8-rangeSelector.json",
+ "annotations/specificResource/4.3-stateFound.json",
+ "annotations/specificResource/4.3.1-timeState.json",
+ "annotations/specificResource/4.3.2-requestHeaderState.json",
+ "annotations/specificResource/4.3.1-cached.json"
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/annotationsAgentOptionals-manual.html b/testing/web-platform/tests/annotation-model/annotations/annotationsAgentOptionals-manual.html
new file mode 100644
index 0000000000..3aadc2139a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/annotationsAgentOptionals-manual.html
@@ -0,0 +1,48 @@
+
+
+
+
Note: failing an assertion indicates that a recommended or optional feature has not been implemented or has not been implemented correctly.",
+ "testType": "manual",
+ "skipFailures": [ "should", "may" ],
+ "ref": "https://www.w3.org/TR/annotation-model/#other-properties",
+ "assertions":
+ [
+ "annotations/3.3.1-annotationCreatorImplemented.json",
+ "annotations/3.3.2-annotationCreatorAgentIdImplemented.json",
+ "annotations/3.3.2-annotationCreatorAgentTypeImplemented.json",
+ "annotations/3.3.2-annotationCreatorAgentNicknameImplemented.json",
+ "annotations/3.3.2-annotationCreatorAgentSingleNameImplemented.json",
+ "annotations/3.3.2-annotationCreatorAgentNameImplemented.json",
+ "annotations/3.3.2-annotationCreatorAgentEmailImplemented.json",
+ "annotations/3.3.2-annotationCreatorAgentEmail_sha1Implemented.json",
+ "annotations/3.3.2-annotationCreatorAgentHomepageImplemented.json",
+ "annotations/3.3.1-annotationGeneratorImplemented.json",
+ "annotations/3.3.2-annotationGeneratorAgentIdImplemented.json",
+ "annotations/3.3.2-annotationGeneratorAgentTypeImplemented.json",
+ "annotations/3.3.2-annotationGeneratorAgentNicknameImplemented.json",
+ "annotations/3.3.2-annotationGeneratorAgentSingleNameImplemented.json",
+ "annotations/3.3.2-annotationGeneratorAgentNameImplemented.json",
+ "annotations/3.3.2-annotationGeneratorAgentEmailImplemented.json",
+ "annotations/3.3.2-annotationGeneratorAgentEmail_sha1Implemented.json",
+ "annotations/3.3.2-annotationGeneratorAgentHomepageImplemented.json",
+ "annotations/bodiesTargets/3.3.1-bodyCreator.json",
+ "annotations/bodiesTargets/3.3.2-bodyCreatorAgentIdImplemented.json",
+ "annotations/bodiesTargets/3.3.2-bodyCreatorAgentTypeImplemented.json",
+ "annotations/bodiesTargets/3.3.2-bodyCreatorAgentNicknameImplemented.json",
+ "annotations/bodiesTargets/3.3.2-bodyCreatorAgentSingleNameImplemented.json",
+ "annotations/bodiesTargets/3.3.2-bodyCreatorAgentNameImplemented.json",
+ "annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmailImplemented.json",
+ "annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmail_sha1Implemented.json",
+ "annotations/bodiesTargets/3.3.2-bodyCreatorAgentHomepageImplemented.json",
+ "annotations/bodiesTargets/3.3.1-targCreator.json",
+ "annotations/bodiesTargets/3.3.2-targCreatorAgentIdImplemented.json",
+ "annotations/bodiesTargets/3.3.2-targCreatorAgentTypeImplemented.json",
+ "annotations/bodiesTargets/3.3.2-targCreatorAgentNicknameImplemented.json",
+ "annotations/bodiesTargets/3.3.2-targCreatorAgentSingleNameImplemented.json",
+ "annotations/bodiesTargets/3.3.2-targCreatorAgentNameImplemented.json",
+ "annotations/bodiesTargets/3.3.2-targCreatorAgentEmailImplemented.json",
+ "annotations/bodiesTargets/3.3.2-targCreatorAgentEmail_sha1Implemented.json",
+ "annotations/bodiesTargets/3.3.2-targCreatorAgentHomepageImplemented.json"
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyEWR.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyEWR.json
new file mode 100644
index 0000000000..e22585b905
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyEWR.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-bodyEWR.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "An External Web Resource body may be used as an Annotation Body.",
+ "title": "Implements **External Web Resource** with **_id_ key** as a body of the Annotation [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more External Web Resources as Annotation body(ies). (Section 3.2.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" },
+ { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" } } } },
+ { "$ref": "bodyTarget.json#/definitions/sourceEwrDetected" },
+ { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrDetected" } } } },
+ { "$ref": "bodyTarget.json#/definitions/itemEwrDetected" },
+ { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrDetected" } } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyFormat.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyFormat.json
new file mode 100644
index 0000000000..c7fc143053
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyFormat.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-bodyFormat.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a body may include format key with one or more values that are each a media type.",
+ "title": "Implements **body _format_ key** with one or more values each of which is a **media type** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more bodies, one or more of which include format key with one or more values that are each a media type. (Section 3.2.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/formatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/formatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyLanguage.json
new file mode 100644
index 0000000000..e117bf6a48
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyLanguage.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-bodyLanguage.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a body may include language key with one or more values that are each a language code.",
+ "title": "Implements **body _language_ key** with one or more values each of which is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more bodies, one or more of which include language key with one or more values that are each a language code. (Section 3.2.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/languagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceLanguagePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/languagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceLanguagePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyProcessingLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyProcessingLanguage.json
new file mode 100644
index 0000000000..41d52466ac
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyProcessingLanguage.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-bodyProcessingLanguage.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Body may include processingLanguage key with a single value that is a language code.",
+ "title": "Implements **body _processingLanguage_ key** with a **single value** that is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more Bodies, one or more of which include single processingLanguage key with a language code as value. (Section 3.2.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/processingLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemProcessingLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceProcessingLanguagePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/processingLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemProcessingLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceProcessingLanguagePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleFormat.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleFormat.json
new file mode 100644
index 0000000000..c524ee58e5
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleFormat.json
@@ -0,0 +1,39 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-bodySingleFormat.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Body should include format key with a single value that is a media type.",
+ "title": "Implements **body _format_ key** with a **single value** that is a **media type** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more bodies, one or more of which include single format key with a media type as value. (Section 3.2.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/singleFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemSingleFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceSingleFormatPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/singleFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemSingleFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceSingleFormatPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": ["body"]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleLanguage.json
new file mode 100644
index 0000000000..6606e1f82a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleLanguage.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-bodySingleLanguage.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Body should include language key with a single value that is a language code.",
+ "title": "Implements **body _language_ key** with a **single value** that is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or moreBodies, one or more of which include single language key with a language code as value. (Section 3.2.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/singleLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemSingleLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceSingleLanguagePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/singleLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemSingleLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceSingleLanguagePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirection.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirection.json
new file mode 100644
index 0000000000..ab8e831b4a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirection.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-bodyTextDirection.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Body may include textDirection key with a single value that is one of ltr, rtl, or auto.",
+ "title": "Implements **body _textDirection_ key** with a **single value** that is is **one of ltr, rtl, or auto** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more Bodies, one or more of which include single textDirection key with one of ltr, rtl, or auto as value. (Section 3.2.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/textDirectionPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemTextDirectionPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceTextDirectionPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/textDirectionPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemTextDirectionPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceTextDirectionPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirectionValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirectionValidated.json
new file mode 100644
index 0000000000..26ff83635c
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirectionValidated.json
@@ -0,0 +1,44 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-bodyTextDirectionValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A body or body/source has multiple textDirection key values for a body or source, or a single textDirection key with a value that is not one of ltr, rtl, auto.",
+ "title": "If present as a body or body/source property, the **_textDirection_ key** has a **single value** which is **one of 'ltr', 'rtl', 'auto'** - [model 3.2.1](https://www.w3.org/TR/annotation-model/#external-web-resources)",
+ "description": "True when no body-level or body/source-level (SR body) textDirection key present or when all textDirection keys have a single value that is one of ltr, rtl, auto (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "bodyTarget.json#/definitions/textDirectionValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithTextDirection" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "bodyTarget.json#/definitions/textDirectionValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithTextDirection" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targEWR.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targEWR.json
new file mode 100644
index 0000000000..f605d5c1c0
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targEWR.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-targEWR.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "An External Web Resource target may be used as an Annotation Target.",
+ "title": "Implements **External Web Resource** with **_id_ key** as a target of the Annotation [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more External Web Resources as Annotation target(ies). (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" },
+ { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" } } } },
+ { "$ref": "bodyTarget.json#/definitions/sourceEwrDetected" },
+ { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrDetected" } } } },
+ { "$ref": "bodyTarget.json#/definitions/itemEwrDetected" },
+ { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrDetected" } } } }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targFormat.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targFormat.json
new file mode 100644
index 0000000000..2bc0a64578
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targFormat.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-targFormat.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target may include format key with one or more values that are each a media type.",
+ "title": "Implements **target _format_ key** with one or more values each of which is a **media type** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more targets, one or more of which include format key with one or more values that are each a media type. (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/formatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/formatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targLanguage.json
new file mode 100644
index 0000000000..2f92b3eedc
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targLanguage.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-targLanguage.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target may include language key with one or more values that are each a language code.",
+ "title": "Implements **target _language_ key** with one or more values each of which is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more targets, one or more of which include language key with one or more values that are each a language code. (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/languagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceLanguagePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/languagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceLanguagePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targProcessingLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targProcessingLanguage.json
new file mode 100644
index 0000000000..6c3f2966bf
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targProcessingLanguage.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-targProcessingLanguage.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Target may include processingLanguage key with a single value that is a language code.",
+ "title": "Implements **target _processingLanguage_ key** with a **single value** that is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more Targets, one or more of which include single processingLanguage key with a language code as value. (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/processingLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemProcessingLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceProcessingLanguagePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/processingLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemProcessingLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceProcessingLanguagePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleFormat.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleFormat.json
new file mode 100644
index 0000000000..520dd512b7
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleFormat.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-targSingleFormat.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Target should include format key with a single value that is a media type.",
+ "title": "Implements **target _format_ key** with a **single value** that is a **media type** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more targets, one or more of which include single format key with a media type as value. (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/singleFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemSingleFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceSingleFormatPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/singleFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemSingleFormatPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceSingleFormatPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleLanguage.json
new file mode 100644
index 0000000000..ac19b45ba5
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleLanguage.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-targSingleLanguage.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Target should include language key with a single value that is a language code.",
+ "title": "Implements **target _language_ key** with a **single value** that is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or moreTargets, one or more of which include single language key with a language code as value. (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/singleLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemSingleLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceSingleLanguagePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/singleLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemSingleLanguagePropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceSingleLanguagePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirection.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirection.json
new file mode 100644
index 0000000000..5da8a6273a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirection.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-targTextDirection.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Target may include textDirection key with a single value that is one of ltr, rtl, or auto.",
+ "title": "Implements **target _textDirection_ key** with a **single value** that is is **one of ltr, rtl, or auto** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more Targets, one or more of which include single textDirection key with one of ltr, rtl, or auto as value. (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/textDirectionPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemTextDirectionPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceTextDirectionPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/textDirectionPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemTextDirectionPropertyFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceTextDirectionPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirectionValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirectionValidated.json
new file mode 100644
index 0000000000..6f12b3ed55
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirectionValidated.json
@@ -0,0 +1,44 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-targTextDirectionValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A target or target/source has multiple textDirection key values for a target or source, or a single textDirection key with a value that is not one of ltr, rtl, auto.",
+ "title": "If present as a target or target/source property, the **_textDirection_ key** has a **single value** which is **one of 'ltr', 'rtl', 'auto'** - [model 3.2.1](https://www.w3.org/TR/annotation-model/#external-web-resources)",
+ "description": "True when no target-level or target/source-level (SR target) textDirection key present or when all textDirection keys have a single value that is one of ltr, rtl, auto (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "bodyTarget.json#/definitions/textDirectionValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithTextDirection" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "bodyTarget.json#/definitions/textDirectionValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithTextDirection" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-bodyType.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-bodyType.json
new file mode 100644
index 0000000000..25b0e48ab7
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-bodyType.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.2-bodyType.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Body may include type key with one or more values that are each drawn from the model's list of resource classes.",
+ "title": "Implements **body _type_ key** with one or more values each of which is drawn from the **model's list of resource classes** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more Bodies, one or more of which include type key with one or more values that are each drawn from the model's list of resource classes. (Section 3.2.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceRecognizedTypeFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-targType.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-targType.json
new file mode 100644
index 0000000000..10ccd9d50d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-targType.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.2-targType.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Target may include type key with one or more values that are each drawn from the model's list of resource classes.",
+ "title": "Implements **target _type_ key** with one or more values each of which is drawn from the **model's list of resource classes** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more Targets, one or more of which include type key with one or more values that are each drawn from the model's list of resource classes. (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceRecognizedTypeFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyChoiceSetNoValue.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyChoiceSetNoValue.json
new file mode 100644
index 0000000000..95c0aafa93
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyChoiceSetNoValue.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.4-bodyChoiceSetNoValue.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "A Choice or Set body cannot include a value key. value key is only valid with Embedded Textual Bodies.",
+ "title": "If a **Choice or Set** is a body, it does NOT have a **_value_ key** - [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-body)",
+ "description": "True when no Choice or Set bodies or when none of the Choice or Set bodies include the value key. (Section 3.3.4)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "allOf": [
+ { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithValue" } },
+ { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithValue" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETB.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETB.json
new file mode 100644
index 0000000000..bc40dcf5a0
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETB.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.4-bodyETB.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "An Embedded Textual Body may be used as an Annotation Body.",
+ "title": "Implements **Embedded Textual Body** with **_value_ key** as a body of the Annotation [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-body)",
+ "description": "True when Annotation includes one or more Embedded Textual Bodies as Annotation body(ies). (Section 3.2.4)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/textualBodyFound" },
+ { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/textualBodyFound" } } } },
+ { "$ref": "bodyTarget.json#/definitions/itemETBDetected" },
+ { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemETBDetected" } } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeText.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeText.json
new file mode 100644
index 0000000000..cddadf0c25
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeText.json
@@ -0,0 +1,39 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.4-bodyETBTypeText.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of an Embedded Textual Body should include type key which includes the value of Text.",
+ "title": "Implements **Embedded Textual Body _type_ key** which includes a value of **Text** [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-body)",
+ "description": "True when Annotation includes one or more Embedded Textual Bodies (incl. as part of body Choice or Set), one or more of which includes a type key which includes a value of Text. (Section 3.2.4)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf":
+ [
+ { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeIncludesText" },
+ { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeIncludesText" }
+ ]
+ },
+ { "not":
+ {
+ "items":
+ { "not":
+ { "anyOf":
+ [
+ { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeIncludesText" },
+ { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeIncludesText" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeTextualBody.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeTextualBody.json
new file mode 100644
index 0000000000..9ccc041240
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeTextualBody.json
@@ -0,0 +1,39 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.4-bodyETBTypeTextualBody.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of an Embedded Textual Body should include type key which includes the value of TextualBody.",
+ "title": "Implements **Embedded Textual Body _type_ key** which includes a value of **TextualBody** [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-body)",
+ "description": "True when Annotation includes one or more Embedded Textual Bodies (incl. as part of body Choice or Set), one or more of which includes a type key which includes a value of TextualBody. (Section 3.2.4)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf":
+ [
+ { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeIncludesTextualBody" },
+ { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeIncludesTextualBody" }
+ ]
+ },
+ { "not":
+ {
+ "items":
+ { "not":
+ { "anyOf":
+ [
+ { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeIncludesTextualBody" },
+ { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeIncludesTextualBody" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targChoiceSetNoValue.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targChoiceSetNoValue.json
new file mode 100644
index 0000000000..7525d5bb5d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targChoiceSetNoValue.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.4-targChoiceSetNoValue.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "A Choice or Set target cannot include a value key. value key is only valid with Embedded Textual Bodies.",
+ "title": "If a **Choice or Set** is a target, it does NOT have a **_value_ key** - [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-targ)",
+ "description": "True when no Choice or Set targets or when none of the Choice or Set targets include the value key. (Section 3.3.4)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "allOf": [
+ { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithValue" } },
+ { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithValue" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targNoTypeTextualBody.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targNoTypeTextualBody.json
new file mode 100644
index 0000000000..8e875951b9
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targNoTypeTextualBody.json
@@ -0,0 +1,32 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.4-targNoTypeTextualBody.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "The description of a target resource MUST NOT include type key which includes the value of TextualBody.",
+ "title": "Neither **target** Resources nor target Choice or Set items have a **_type_ key** which includes a value of **TextualBody** [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-body)",
+ "description": "True when none of target(s), target source(s), target item(s) have a type key which includes a value of TextualBody. (Section 3.2.4)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "allOf": [
+ { "not": { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeInclTextualBodyWithoutId" } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeInclTextualBodyWithoutId" } },
+ {
+ "items":
+ { "not":
+ { "anyOf":
+ [
+ { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeInclTextualBodyWithoutId" },
+ { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeInclTextualBodyWithoutId" }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyChoice.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyChoice.json
new file mode 100644
index 0000000000..dcbc7f22af
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyChoice.json
@@ -0,0 +1,29 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.7-bodyChoice.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "A Choice resource may be used as an Annotation Body (not found).",
+ "title": "Implements **Choice** with **_type_ and _items_ keys** as a body of the Annotation [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-bodies-and-targets)",
+ "description": "True when Annotation includes one or more Choice resources as Annotation body(ies). (Section 3.2.7)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "$ref": "choiceSet.json#/definitions/choiceDetected" },
+ { "not":
+ {
+ "items":
+ { "not":
+ { "$ref": "choiceSet.json#/definitions/choiceDetected" }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEWRNoItems.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEWRNoItems.json
new file mode 100644
index 0000000000..f8d79f0f58
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEWRNoItems.json
@@ -0,0 +1,25 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.7-bodyEWRNoItems.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "The description of an External Web Resource body cannot include an items key. items key is only valid with Choice or Set.",
+ "title": "If an **External Web Resource** is a body, it does NOT have an **_items_ key** - [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-bodies-and-targets)",
+ "description": "True when no External Web Resource bodies or when none of the External Web Recource bodies include the items key. (Section 3.2.7)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "allOf": [
+ { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithItems" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithItems" } } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithItems" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithItems" } } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithItems" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithItems" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEmbeddedTextualNoItems.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEmbeddedTextualNoItems.json
new file mode 100644
index 0000000000..30f88aa536
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEmbeddedTextualNoItems.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.7-bodyEmbeddedTextualNoItems.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "An Embedded Textual body cannot include an items key. items key is only valid with Choice or Set.",
+ "title": "If an **Embedded Textual Body** is a body, it does NOT have an **_items_ key** - [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-bodies-and-targets)",
+ "description": "True when no Embedded Textual bodies or when none of the Embedded Textual bodies include the items key. (Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "allOf": [
+ { "not": { "$ref": "bodyTarget.json#/definitions/embeddedTextualBodyWithItems" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/embeddedTextualBodyWithItems" } } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/itemETBWithItems" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemETBWithItems" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodySpecificResourceNoItems.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodySpecificResourceNoItems.json
new file mode 100644
index 0000000000..188c93b08f
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodySpecificResourceNoItems.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.7-bodySpecificResourceNoItems.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "An Specific Resource body cannot include an items key. items key is only valid with Choice or Set.",
+ "title": "If a **Specific Resource** is a body, it does NOT have an **_items_ key** - [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-bodies-and-targets)",
+ "description": "True when no Specific Resource bodies or when none of the Specific Resource bodies include the items key. (Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "allOf": [
+ { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithItems" } },
+ { "items": { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithItems" } } },
+ { "not": { "$ref": "specificResource.json#/definitions/itemSRWithItems" } },
+ { "items": { "not": { "$ref": "specificResource.json#/definitions/itemSRWithItems" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targChoice.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targChoice.json
new file mode 100644
index 0000000000..5a49f2f912
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targChoice.json
@@ -0,0 +1,29 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.7-targChoice.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "A Choice resource may be used as an Annotation Target (not found).",
+ "title": "Implements **Choice** with **_type_ and _items_ keys** as a target of the Annotation [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-targets-and-targets)",
+ "description": "True when Annotation includes one or more Choice resources as Annotation target(ies). (Section 3.2.7)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "$ref": "choiceSet.json#/definitions/choiceDetected" },
+ { "not":
+ {
+ "items":
+ { "not":
+ { "$ref": "choiceSet.json#/definitions/choiceDetected" }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targEWRNoItems.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targEWRNoItems.json
new file mode 100644
index 0000000000..c16696e049
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targEWRNoItems.json
@@ -0,0 +1,25 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.7-targEWRNoItems.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "The description of an External Web Resource target cannot include an items key. items key is only valid with Choice or Set.",
+ "title": "If an **External Web Resource** is a target, it does NOT have an **_items_ key** - [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-targets-and-targets)",
+ "description": "True when no External Web Resource targets (incl. as source or item) or when none of the External Web Recource targets include the items key. (Section 3.2.7)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "allOf": [
+ { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithItems" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithItems" } } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithItems" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithItems" } } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithItems" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithItems" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targSpecificResourceNoItems.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targSpecificResourceNoItems.json
new file mode 100644
index 0000000000..c9ef6c8df1
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targSpecificResourceNoItems.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.7-targSpecificResourceNoItems.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "An Specific Resource target cannot include an items key. items key is only valid with Choice or Set.",
+ "title": "If a **Specific Resource Target** is a target, it does NOT have an **_items_ key** - [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-targets-and-targets)",
+ "description": "True when no Specific Resource targets or when none of the Specific Resource targets include the items key. (Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "allOf": [
+ { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithItems" } },
+ { "items": { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithItems" } } },
+ { "not": { "$ref": "specificResource.json#/definitions/itemSRWithItems" } },
+ { "items": { "not": { "$ref": "specificResource.json#/definitions/itemSRWithItems" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreated.json
new file mode 100644
index 0000000000..daee465790
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreated.json
@@ -0,0 +1,39 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-bodyCreated.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a body should include created key with a single value that is of format date-time.",
+ "title": "Implements **body _created_ key** with a **single value** that is of **format date-time** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when Annotation includes one or more bodies, one or more of which include created key with a single value of date-time format. (Section 3.3.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/createdPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatedPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/createdPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatedPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreatedValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreatedValidated.json
new file mode 100644
index 0000000000..a47db94aa0
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreatedValidated.json
@@ -0,0 +1,43 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-bodyCreatedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A body or body/source has multiple created key values for a body or source, or a single created key value that is not of format date-time.",
+ "title": "If present all body-level or body/source-level **_created_ keys** have a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no body-level or body/source-level (SR body) created key present or when all created keys have a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithCreated" }
+ ]
+ },
+ {
+ "type": "array",
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithCreated" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreator.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreator.json
new file mode 100644
index 0000000000..4c0e49affe
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreator.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-bodyCreator.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a body may include creator key with one or more values.",
+ "title": "Implements **body _creator_ key** with one or more values - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when Annotation includes one or more bodies, one or more of which include creator key with one or more values. (Section 3.3.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModified.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModified.json
new file mode 100644
index 0000000000..a0a59ac4fd
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModified.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-bodyModified.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a body may include modified key with a single value that is of format date-time.",
+ "title": "Implements **body _modified_ key** with a **single value** that is of **format date-time** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when Annotation includes one or more bodies, one or more of which include modified key with a single value of format date-time. (Section 3.3.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/modifiedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemModifiedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceModifiedPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/modifiedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemModifiedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceModifiedPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModifiedValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModifiedValidated.json
new file mode 100644
index 0000000000..e632ee5406
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModifiedValidated.json
@@ -0,0 +1,44 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-bodyModifiedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A body or body/source has multiple modified key values for a body or source, or a single modified key value that is not of format date-time.",
+ "title": "If present all body-level or body/source-level **_modified_ keys** have a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no body-level or body/source-level (SR body) modified key present or when all modified keys have a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithModified" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithModified" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodySingleCreator.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodySingleCreator.json
new file mode 100644
index 0000000000..d037a18916
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodySingleCreator.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-bodySingleCreator.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a body should include creator key with a single value.",
+ "title": "Implements **body _creator_ key** with a **single value** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when Annotation includes one or more bodies, one or more of which includes creator key with a single value. (Section 3.3.1)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemSingleCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceSingleCreatorPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemSingleCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceSingleCreatorPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreated.json
new file mode 100644
index 0000000000..85a3da6e4c
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreated.json
@@ -0,0 +1,39 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-targCreated.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target should include created key with a single value that is of format date-time.",
+ "title": "Implements **target _created_ key** with a **single value** that is of **format date-time** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when Annotation includes one or more targets, one or more of which include created key with a single value of date-time format. (Section 3.3.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/createdPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatedPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/createdPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatedPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreatedValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreatedValidated.json
new file mode 100644
index 0000000000..504c1bfd8a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreatedValidated.json
@@ -0,0 +1,43 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-targCreatedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A target or target/source has multiple created key values for a target or source, or a single created key value that is not of format date-time.",
+ "title": "If present all target-level or target/source-level **_created_ keys** have a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no target-level or target/source-level (SR target) created key present or when all created keys have a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithCreated" }
+ ]
+ },
+ {
+ "type": "array",
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithCreated" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreator.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreator.json
new file mode 100644
index 0000000000..d4f2e44b23
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreator.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-targCreator.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target may include creator key with one or more values.",
+ "title": "Implements **target _creator_ key** with one or more values - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when Annotation includes one or more targets, one or more of which include creator key with one or more values. (Section 3.3.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModified.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModified.json
new file mode 100644
index 0000000000..7c8fb0cdb8
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModified.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-targModified.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target may include modified key with a single value that is of format date-time.",
+ "title": "Implements **target _modified_ key** with a **single value** that is of **format date-time** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when Annotation includes one or more targets, one or more of which include modified key with a single value of format date-time. (Section 3.3.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/modifiedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemModifiedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceModifiedPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/modifiedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemModifiedPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceModifiedPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModifiedValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModifiedValidated.json
new file mode 100644
index 0000000000..7e3ec735e0
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModifiedValidated.json
@@ -0,0 +1,44 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-targModifiedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A target or target/source has multiple modified key values for a target or source, or a single modified key value that is not of format date-time.",
+ "title": "If present all target-level or target/source-level **_modified_ keys** have a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no target-level or target/source-level (SR target) modified key present or when all modified keys have a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithModified" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithModified" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targSingleCreator.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targSingleCreator.json
new file mode 100644
index 0000000000..91b9aed2ee
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targSingleCreator.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-targSingleCreator.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target should include creator key with a single value.",
+ "title": "Implements **target _creator_ key** with a **single value** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when Annotation includes one or more targets, one or more of which includes creator key with a single value. (Section 3.3.1)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemSingleCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceSingleCreatorPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemSingleCreatorPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceSingleCreatorPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmailImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmailImplemented.json
new file mode 100644
index 0000000000..d116346a0c
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmailImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-bodyCreatorAgentEmailImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email for Body Creator (Agent) not found. Agents may have one or more email values.",
+ "title": "Implements Body-level creator (Agent) **_email_ key** with one or more values, each of which is a **mailto: uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email values for Body Creator (Agent) is implemented (Section 3.3.2)",
+ "required": [ "body" ],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmailFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmailFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmailFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmailFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmailFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmailFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmail_sha1Implemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmail_sha1Implemented.json
new file mode 100644
index 0000000000..eb4852ad5a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmail_sha1Implemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-bodyCreatorAgentEmail_sha1Implemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email_sha1 for Body Creator (Agent) not found. Agents may have one or more email_sha1 values.",
+ "title": "Implements Body-level creator (Agent) **email_sha1 key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email_sha1 values for Body Creator (Agent) is implemented (Section 3.3.2)",
+ "required": [ "body" ],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmail_sha1Found" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmail_sha1Found" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmail_sha1Found" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmail_sha1Found" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmail_sha1Found" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmail_sha1Found" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentHomepageImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentHomepageImplemented.json
new file mode 100644
index 0000000000..9c83d6d75d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentHomepageImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-bodyCreatorAgentHomepageImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Homepage for Body Creator (Agent) not found. Agents may have one or more homepage values.",
+ "title": "Implements Body-level creator (Agent) **_homepage_ key** with one or more values, each of which is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more homepage values for Body Creator (Agent) is implemented (Section 3.3.2)",
+ "required": [ "body" ],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithHomepageFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithHomepageFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithHomepageFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithHomepageFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithHomepageFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithHomepageFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentIdImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentIdImplemented.json
new file mode 100644
index 0000000000..777a499ae2
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentIdImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-bodyCreatorAgentIdImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Id for Body Creator (Agent) not found or more than 1 found. Agents should have exactly one id of format uri.",
+ "title": "Implements Body-level creator (Agent) **_id_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Body Creator (Agent) has exactly one id (Section 3.3.2)",
+ "required": [ "body" ],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithIdFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithIdFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithIdFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithIdFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithIdFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithIdFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNameImplemented.json
new file mode 100644
index 0000000000..babb04d65b
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNameImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-bodyCreatorAgentNameImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Name for Body Creator (Agent) not found. Agents may have one or more name values.",
+ "title": "Implements Body-level creator (Agent) **_name_ key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more name values for Body Creator (Agent) is implemented (Section 3.3.2)",
+ "required": [ "body" ],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithNameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithNameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithNameFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithNameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithNameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithNameFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNicknameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNicknameImplemented.json
new file mode 100644
index 0000000000..252ec08855
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNicknameImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-bodyCreatorAgentNicknameImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Nickname for Body Creator (Agent) not found. Agents should have exactly one nickname value.",
+ "title": "Implements Body-level creator (Agent) **_nickname_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when exactly one nickname for Body Creator (Agent) is implemented (Section 3.3.2)",
+ "required": [ "body" ],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNicknameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNicknameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNicknameFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNicknameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNicknameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNicknameFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentSingleNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentSingleNameImplemented.json
new file mode 100644
index 0000000000..ac0b0f9ad0
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentSingleNameImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-bodyCreatorAgentSingleNameImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Single name for Body Creator (Agent) not found. Agents should have exactly one name value.",
+ "title": "Implements Body-level creator (Agent) **_name_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when exactly one name for Body Creator (Agent) is implemented (Section 3.3.2)",
+ "required": [ "body" ],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNameFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNameFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentTypeImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentTypeImplemented.json
new file mode 100644
index 0000000000..8392a3a689
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentTypeImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-bodyCreatorAgentTypeImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Type (Person, Organization, Software) for Body Creator (Agent) not found. Agents should have one or more type values.",
+ "title": "Implements Body-level creator (Agent) **_type_ key** with one or more values from **model-recommended list (Person, Organization, Software)** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Body Creator (Agent) is implemented (Section 3.3.2)",
+ "required": [ "body" ],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithTypeFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithTypeFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithTypeFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithTypeFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithTypeFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithTypeFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmailImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmailImplemented.json
new file mode 100644
index 0000000000..daccf45e02
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmailImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-targCreatorAgentEmailImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email for Target Creator (Agent) not found. Agents may have one or more email values.",
+ "title": "Implements Target-level creator (Agent) **_email_ key** with one or more values, each of which is a **mailto: uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email values for Target Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmailFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmailFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmailFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmailFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmailFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmailFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmail_sha1Implemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmail_sha1Implemented.json
new file mode 100644
index 0000000000..103ef83bda
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmail_sha1Implemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-targCreatorAgentEmail_sha1Implemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email_sha1 for Target Creator (Agent) not found. Agents may have one or more email_sha1 values.",
+ "title": "Implements Target-level creator (Agent) **email_sha1 key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email_sha1 values for Target Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmail_sha1Found" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmail_sha1Found" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmail_sha1Found" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmail_sha1Found" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmail_sha1Found" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmail_sha1Found" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentHomepageImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentHomepageImplemented.json
new file mode 100644
index 0000000000..da8ac7fd78
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentHomepageImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-targCreatorAgentHomepageImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Homepage for Target Creator (Agent) not found. Agents may have one or more homepage values.",
+ "title": "Implements Target-level creator (Agent) **_homepage_ key** with one or more values, each of which is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more homepage values for Target Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithHomepageFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithHomepageFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithHomepageFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithHomepageFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithHomepageFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithHomepageFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentIdImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentIdImplemented.json
new file mode 100644
index 0000000000..8728b848dd
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentIdImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-targCreatorAgentIdImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Id for Target Creator (Agent) not found or more than 1 found. Agents should have exactly one id of format uri.",
+ "title": "Implements Target-level creator (Agent) **_id_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Target Creator (Agent) has exactly one id (Section 3.3.2)",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithIdFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithIdFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithIdFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithIdFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithIdFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithIdFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNameImplemented.json
new file mode 100644
index 0000000000..9cd9990d14
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNameImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-targCreatorAgentNameImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Name for Target Creator (Agent) not found. Agents may have one or more name values.",
+ "title": "Implements Target-level creator (Agent) **_name_ key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more name values for Target Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithNameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithNameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithNameFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithNameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithNameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithNameFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNicknameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNicknameImplemented.json
new file mode 100644
index 0000000000..17b69bff08
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNicknameImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-targCreatorAgentNicknameImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Nickname for Target Creator (Agent) not found. Agents should have exactly one nickname value.",
+ "title": "Implements Target-level creator (Agent) **_nickname_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when exactly one nickname for Target Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNicknameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNicknameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNicknameFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNicknameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNicknameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNicknameFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentSingleNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentSingleNameImplemented.json
new file mode 100644
index 0000000000..5604f4a4b9
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentSingleNameImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-targCreatorAgentSingleNameImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Single name for Target Creator (Agent) not found. Agents should have exactly one name value.",
+ "title": "Implements Target-level creator (Agent) **_name_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when exactly one name for Target Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNameFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNameFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNameFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNameFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentTypeImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentTypeImplemented.json
new file mode 100644
index 0000000000..f26238616b
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentTypeImplemented.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-targCreatorAgentTypeImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Type (Person, Organization, Software) for Target Creator (Agent) not found. Agents should have one or more type values.",
+ "title": "Implements Target-level creator (Agent) **_type_ key** with one or more values from **model-recommended list (Person, Organization, Software)** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Target Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithTypeFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithTypeFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithTypeFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/creatorAgentWithTypeFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithTypeFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithTypeFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-bodyAudience.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-bodyAudience.json
new file mode 100644
index 0000000000..8572c2257f
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-bodyAudience.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.3-bodyAudience.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a body may include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.",
+ "title": "Implements **body _audience_ key** which has one or more values with each audience instance described using **[schema.org/Audience](http://schema.org/Audience) classes and properties** - [model 3.3.3](https://www.w3.org/TR/annotation-model/#intended-audience)",
+ "description": "True when Annotation includes one or more bodies, one or more of which include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.. (Section 3.3.3)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-targAudience.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-targAudience.json
new file mode 100644
index 0000000000..5b2ba6fa97
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-targAudience.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.3-targAudience.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target may include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.",
+ "title": "Implements **target _audience_ key** which has one or more values with each audience instance described using **[schema.org/Audience](http://schema.org/Audience) classes and properties** - [model 3.3.3](https://www.w3.org/TR/annotation-model/#intended-audience)",
+ "description": "True when Annotation includes one or more targets, one or more of which include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.. (Section 3.3.3)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-bodyAccessibility.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-bodyAccessibility.json
new file mode 100644
index 0000000000..3d4d42cd9d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-bodyAccessibility.json
@@ -0,0 +1,39 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.4-bodyAccessibility.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Body may include accessibility key which has one or more values.",
+ "title": "Implements **body _accessibility_ key** which has one or more values - [model 3.3.4](#https://www.w3.org/TR/annotation-model/#accessibility-of-content)",
+ "description": "True when Annotation includes one or more Bodies, one or more of which include accessibility key which has one or more values. (Section 3.3.4)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/accessibilityPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemAccessibilityPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceAccessibilityPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/accessibilityPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemAccessibilityPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceAccessibilityPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-targAccessibility.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-targAccessibility.json
new file mode 100644
index 0000000000..0f345a16f2
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-targAccessibility.json
@@ -0,0 +1,39 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.4-targAccessibility.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Target may include accessibility key which has one or more values.",
+ "title": "Implements **target _accessibility_ key** which has one or more values - [model 3.3.4](#https://www.w3.org/TR/annotation-model/#accessibility-of-content)",
+ "description": "True when Annotation includes one or more Targets, one or more of which include accessibility key which has one or more values. (Section 3.3.4)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/accessibilityPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemAccessibilityPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceAccessibilityPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/accessibilityPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemAccessibilityPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceAccessibilityPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyChoiceSetNoPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyChoiceSetNoPurpose.json
new file mode 100644
index 0000000000..bb2a56b535
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyChoiceSetNoPurpose.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.5-bodyChoiceSetNoPurpose.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "A Choice or Set body cannot include an purpose key. purpose key is only valid with Specific Resources and Embedded Textual Bodies.",
+ "title": "If a **Choice or Set** is a body, it does NOT have a **_purpose_ key** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)",
+ "description": "True when no Choice or Set bodies or when none of the Choice or Set bodies include the purpose key. (Section 3.3.5)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "allOf": [
+ { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithPurpose" } },
+ { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithPurpose" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyEWRNoPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyEWRNoPurpose.json
new file mode 100644
index 0000000000..5e5fc0e0d6
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyEWRNoPurpose.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.5-bodyEWRNoPurpose.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "The description of an External Web Resource body cannot include an purpose key. purpose key is only valid with Specific Resources and Embedded Textual Bodies.",
+ "title": "If an **External Web Resource** is a body, it does NOT have an **_purpose_ key** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)",
+ "description": "True when no External Web Resource bodies or when none of the External Web Recource bodies include the purpose key. (Section 3.3.5)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "allOf": [
+ { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithPurpose" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithPurpose" } } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithPurpose" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithPurpose" } } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithPurpose" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithPurpose" } } }
+ ] }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyPurpose.json
new file mode 100644
index 0000000000..eb62c492c4
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyPurpose.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.5-bodyPurpose.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Body may include purpose key with one or more values that are each drawn from model's list of Motivations.",
+ "title": "Implements **body _purpose_ key** with one or more values are each drawn from **model's list of Motivations** [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)",
+ "description": "True when Annotation includes one or more Bodies, one or more of which include purpose key with one or more values that are each drawn from model's list of Motivations. (Section 3.3.5)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/purposePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemPurposePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/purposePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemPurposePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targChoiceSetNoPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targChoiceSetNoPurpose.json
new file mode 100644
index 0000000000..f74e9b8412
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targChoiceSetNoPurpose.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.5-targChoiceSetNoPurpose.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "A Choice or Set target cannot include an purpose key. purpose key is only valid with Specific Resources and Embedded Textual Bodies.",
+ "title": "If a **Choice or Set** is a target, it does NOT have a **_purpose_ key** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)",
+ "description": "True when no Choice or Set targets or when none of the Choice or Set targets include the purpose key. (Section 3.3.5)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "allOf": [
+ { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithPurpose" } },
+ { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithPurpose" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targEWRNoPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targEWRNoPurpose.json
new file mode 100644
index 0000000000..3e2e2e5e93
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targEWRNoPurpose.json
@@ -0,0 +1,25 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.5-targEWRNoPurpose.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "The description of an External Web Resource target cannot include an purpose key. purpose key is only valid with Specific Resources and Embedded Textual Bodies.",
+ "title": "If an **External Web Resource** is a target, it does NOT have an **_purpose_ key** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)",
+ "description": "True when no External Web Resource targets or when none of the External Web Recource targets include the purpose key. (Section 3.3.5)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "allOf": [
+ { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithPurpose" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithPurpose" } } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithPurpose" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithPurpose" } } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithPurpose" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithPurpose" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targPurpose.json
new file mode 100644
index 0000000000..68c861a5c7
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targPurpose.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.5-targPurpose.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Target may include purpose key with one or more values that are each drawn from model's list of Motivations.",
+ "title": "Implements **target _purpose_ key** with one or more values are each drawn from **model's list of Motivations** [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)",
+ "description": "True when Annotation includes one or more Targets, one or more of which include purpose key with one or more values that are each drawn from model's list of Motivations. (Section 3.3.5)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/purposePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemPurposePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/purposePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemPurposePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRights.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRights.json
new file mode 100644
index 0000000000..2c254fe011
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRights.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-bodyRights.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a body may include rights key with one or more values each of format uri.",
+ "title": "Implements **body _rights_ key** which has one or more values, each of which is a **string of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)",
+ "description": "True when Annotation includes one or more Bodies, one or more of which include rights key with one or more values that are each of format uri. (Section 3.3.6)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/rightsPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemRightsPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceRightsPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/rightsPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemRightsPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceRightsPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRightsValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRightsValidated.json
new file mode 100644
index 0000000000..7f63268c6c
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRightsValidated.json
@@ -0,0 +1,44 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.6-bodyRightsValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A body or body/source has one or more rights key values that are not of format uri.",
+ "title": "If present all body-level or body/source-level **_rights_ key values** are strings of **format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)",
+ "description": "True when no body-level or body/source-level (SR body) rights key present or when all rights key values are strings of format uri (Section 3.3.6)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithRights" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithRights" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRights.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRights.json
new file mode 100644
index 0000000000..31de4f809d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRights.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.1-targRights.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target may include rights key with one or more values each of format uri.",
+ "title": "Implements **target _rights_ key** which has one or more values, each of which is a **string of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)",
+ "description": "True when Annotation includes one or more Targets, one or more of which include rights key with one or more values that are each of format uri. (Section 3.3.6)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/rightsPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemRightsPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceRightsPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/rightsPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemRightsPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceRightsPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRightsValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRightsValidated.json
new file mode 100644
index 0000000000..d4e564f97e
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRightsValidated.json
@@ -0,0 +1,44 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.6-targRightsValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A target or target/source has one or more rights key values that are not of format uri.",
+ "title": "If present all target-level or target/source-level **_rights_ key values** are strings of **format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)",
+ "description": "True when no target-level or target/source-level (SR target) rights key present or when all rights key values are strings of format uri (Section 3.3.6)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithRights" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithRights" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonical.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonical.json
new file mode 100644
index 0000000000..7d4376ae0b
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonical.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-bodyCanonical.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a body rresource may include canonical key with a single value that is of format uri.",
+ "title": "Implements **body _canonical_ key** with a **single value** that is of **format uri** [model 3.3.7](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more bodies, one or more of which include canonical key with a single value of format uri. (Section 3.3.7)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/canonicalPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCanonicalPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCanonicalPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/canonicalPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCanonicalPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCanonicalPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonicalValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonicalValidated.json
new file mode 100644
index 0000000000..b783df471d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonicalValidated.json
@@ -0,0 +1,44 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-bodyCanonicalValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A body or body/source has multiple canonical key values for a body or source, or a single canonical key value that is not of format uri.",
+ "title": "If present all body-level or body/source-level **_canonical_ keys** have a **single value** which is a string of **format uri** - [model 3.3.](https://www.w3.org/TR/annotation-model/#other-identities)",
+ "description": "True when no body-level or body/source-level (SR body) canonical key present or when all canonical keys have a single value which is a string of format uri (Section 3.3.7)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithCanonical" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithCanonical" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyVia.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyVia.json
new file mode 100644
index 0000000000..9219009030
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyVia.json
@@ -0,0 +1,28 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-bodyVia.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a body resource may include via key with one or more values that are each of format uri.",
+ "title": "Implements **body _via_ key** which has one or more values, each of which is a **string of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)",
+ "description": "True when Annotation includes one or more bodies, one or more of which include via key with one or more values that are each of format uri. (Section 3.3.7)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "$ref": "otherProperties.json#/definitions/viaPropertyFound" },
+ { "not":
+ { "items":
+ { "not":
+ { "$ref": "otherProperties.json#/definitions/viaPropertyFound" }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyViaValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyViaValidated.json
new file mode 100644
index 0000000000..1e9bef0a05
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyViaValidated.json
@@ -0,0 +1,43 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-bodyViaValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A body or body/source has one or more via key values that are not of format uri.",
+ "title": "If present all body-level or body/source-level **_via_ key values** are strings of **format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)",
+ "description": "True when no body-level or body/source-level (SR body) via key present or when all via key values are strings of format uri (Section 3.3.7)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithVia" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithVia" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonical.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonical.json
new file mode 100644
index 0000000000..76bd003d4c
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonical.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-targCanonical.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target rresource may include canonical key with a single value that is of format uri.",
+ "title": "Implements **target _canonical_ key** with a **single value** that is of **format uri** [model 3.3.7](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more targets, one or more of which include canonical key with a single value of format uri. (Section 3.3.7)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/canonicalPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCanonicalPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCanonicalPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/canonicalPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemCanonicalPropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceCanonicalPropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonicalValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonicalValidated.json
new file mode 100644
index 0000000000..2ecc478256
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonicalValidated.json
@@ -0,0 +1,44 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-targCanonicalValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A target or target/source has multiple canonical key values for a target or source, or a single canonical key value that is not of format uri.",
+ "title": "If present all target-level or target/source-level **_canonical_ keys** have a **single value** which is a string of **format uri** - [model 3.3.](https://www.w3.org/TR/annotation-model/#other-identities)",
+ "description": "True when no target-level or target/source-level (SR target) canonical key present or when all canonical keys have a single value which is a string of format uri (Section 3.3.7)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithCanonical" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithCanonical" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targVia.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targVia.json
new file mode 100644
index 0000000000..d175687aea
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targVia.json
@@ -0,0 +1,28 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-targVia.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target resource may include via key with one or more values that are each of format uri.",
+ "title": "Implements **target _via_ key** which has one or more values, each of which is a **string of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)",
+ "description": "True when Annotation includes one or more targets, one or more of which include via key with one or more values that are each of format uri. (Section 3.3.7)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "$ref": "otherProperties.json#/definitions/viaPropertyFound" },
+ { "not":
+ { "items":
+ { "not":
+ { "$ref": "otherProperties.json#/definitions/viaPropertyFound" }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targViaValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targViaValidated.json
new file mode 100644
index 0000000000..77e9b3c65a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targViaValidated.json
@@ -0,0 +1,43 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.7-targViaValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: A target or target/source has one or more via key values that are not of format uri.",
+ "title": "If present all target-level or target/source-level **_via_ key values** are strings of **format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)",
+ "description": "True when no target-level or target/source-level (SR target) via key present or when all via key values are strings of format uri (Section 3.3.7)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithVia" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/sourceWithVia" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyChoiceSetNoSource.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyChoiceSetNoSource.json
new file mode 100644
index 0000000000..d1823952ff
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyChoiceSetNoSource.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4-bodyChoiceSetNoSource.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "A Choice or Set body cannot include a source key. source key is only valid with Specific Resources.",
+ "title": "If a **Choice or Set** is a body, it does NOT have a **_source_ key** - [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)",
+ "description": "True when no Choice or Set bodies or when none of the Choice or Set bodies include the source key. (Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "allOf": [
+ { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithSource" } },
+ { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithSource" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyEmbeddedTextualNoSource.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyEmbeddedTextualNoSource.json
new file mode 100644
index 0000000000..659d314823
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyEmbeddedTextualNoSource.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4-bodyEmbeddedTextualNoSource.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "An Embedded Textual body cannot include a source key. source key is only valid with Specific Resources.",
+ "title": "If an **Embedded Textual Body** is a body, it does NOT have a **_source_ key** - [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)",
+ "description": "True when no Embedded Textual bodies or when none of the Embedded Textual bodies include the source key. (Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "allOf": [
+ { "not": { "$ref": "bodyTarget.json#/definitions/embeddedTextualBodyWithSource" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/embeddedTextualBodyWithSource" } } },
+ { "not": { "$ref": "bodyTarget.json#/definitions/itemETBWithSource" } },
+ { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemETBWithSource" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResource.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResource.json
new file mode 100644
index 0000000000..b2b591821d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResource.json
@@ -0,0 +1,34 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4-bodySpecificResource.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "A Specific Resource may be used as an Annotation Body (not found).",
+ "title": "Implements **Specific Resource** with **_source_ and at least one of _purpose, selector, state, style, renderedVia, scope_ keys** as a body of the Annotation [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)",
+ "description": "True when Annotation includes one or more Specific Resources as Annotation body(ies). (Section 4)",
+ "type": "object",
+ "required": ["body"],
+ "properties":
+ {
+ "body":
+ {
+ "anyOf": [
+ { "$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ { "$ref": "specificResource.json#/definitions/itemSpecificResourceDetected"},
+ { "not":
+ {
+ "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ { "$ref": "specificResource.json#/definitions/itemSpecificResourceDetected"}
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResourceNoValue.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResourceNoValue.json
new file mode 100644
index 0000000000..bff1e8c642
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResourceNoValue.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4-bodySpecificResourceNoValue.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "An Specific Resource body cannot include a value key. value key is only valid with Embedded Textual Body.",
+ "title": "If a **Specific Resource** is a body, it does NOT have a **_value_ key** - [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)",
+ "description": "True when no Specific Resource bodies or when none of the Specific Resource bodies include the value key. (Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "allOf": [
+ { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithValue" } },
+ { "items": { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithValue" } } },
+ { "not": { "$ref": "specificResource.json#/definitions/itemSRWithValue" } },
+ { "items": { "not": { "$ref": "specificResource.json#/definitions/itemSRWithValue" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targChoiceSetNoSource.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targChoiceSetNoSource.json
new file mode 100644
index 0000000000..136e5895ea
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targChoiceSetNoSource.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4-targChoiceSetNoSource.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "A Choice or Set target cannot include a source key. source key is only valid with Specific Resources.",
+ "title": "If a **Choice or Set** is a target, it does not have a **_source_ key** - [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)",
+ "description": "True when no Choice or Set targets or when none of the Choice or Set targets include the source key. (Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "allOf": [
+ { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithSource" } },
+ { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithSource" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResource.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResource.json
new file mode 100644
index 0000000000..92e388af28
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResource.json
@@ -0,0 +1,34 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4-targSpecificResource.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "A Specific Resource may be used as an Annotation Target (not found).",
+ "title": "Implements **Specific Resource** with **_source_ and at least one of _purpose, selector, state, style, renderedVia, scope_ keys** as a target of the Annotation [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)",
+ "description": "True when Annotation includes one or more Specific Resources as Annotation target(ies). (Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "anyOf": [
+ { "$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ { "$ref": "specificResource.json#/definitions/itemSpecificResourceDetected"},
+ { "not":
+ {
+ "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ { "$ref": "specificResource.json#/definitions/itemSpecificResourceDetected"}
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResourceNoValue.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResourceNoValue.json
new file mode 100644
index 0000000000..8c1ab2a86f
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResourceNoValue.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4-targSpecificResourceNoValue.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "An Specific Resource target cannot include a value key. value key is only valid with Specific Resources.",
+ "title": "If a **Specific Resource** is a target, it does NOT have a **_value_ key** - [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)",
+ "description": "True when no Specific Resource targets or when none of the Specific Resource targets include the value key. (Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "allOf": [
+ { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithValue" } },
+ { "items": { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithValue" } } },
+ { "not": { "$ref": "specificResource.json#/definitions/itemSRWithValue" } },
+ { "items": { "not": { "$ref": "specificResource.json#/definitions/itemSRWithValue" } } }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-bodyStyleClass.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-bodyStyleClass.json
new file mode 100644
index 0000000000..54b51a0635
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-bodyStyleClass.json
@@ -0,0 +1,36 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.4-bodyStyleClass.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource body may include styleClass key with one or more values.",
+ "title": "Implements **Specific Resource body _styleClass_ key** which has one or more values - [model 4.4](https://www.w3.org/TR/annotation-model/#styles)",
+ "description": "True when Annotation includes one or more Specific Resource bodies, one or more of which include styleClass key with one or more values. (Section 4.4)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": ["body"]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-targStyleClass.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-targStyleClass.json
new file mode 100644
index 0000000000..88765ef8eb
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-targStyleClass.json
@@ -0,0 +1,36 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.4-targStyleClass.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource target may include styleClass key with one or more values.",
+ "title": "Implements **Specific Resource target _styleClass_ key** which has one or more values - [model 4.4](https://www.w3.org/TR/annotation-model/#styles)",
+ "description": "True when Annotation includes one or more Specific Resource targets, one or more of which include styleClass key with one or more values. (Section 4.4)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-bodyRenderedVia.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-bodyRenderedVia.json
new file mode 100644
index 0000000000..8db2447e05
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-bodyRenderedVia.json
@@ -0,0 +1,35 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.5-bodyRenderedVia.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource body may include renderedVia key with one or more values.",
+ "title": "Implements **Specific Resource body _renderedVia_ key** which has one or more values - [model 4.5](https://www.w3.org/TR/annotation-model/#rendering-software)",
+ "description": "True when Annotation includes one or more Specific Resource bodies, one or more of which include renderedVia key with one or more values. (Section 4.4)",
+ "type": "object",
+ "properties":
+ {
+ "body":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/renderedViaDetected" },
+ { "$ref": "specificResource.json#/definitions/itemRenderedViaPropertyDetected" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/renderedViaDetected" },
+ { "$ref": "specificResource.json#/definitions/itemRenderedViaPropertyDetected" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-targRenderedVia.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-targRenderedVia.json
new file mode 100644
index 0000000000..e2b718ce4d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-targRenderedVia.json
@@ -0,0 +1,36 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.5-targRenderedVia.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource target may include renderedVia key with one or more values.",
+ "title": "Implements **Specific Resource target _renderedVia_ key** which has one or more values - [model 4.5](https://www.w3.org/TR/annotation-model/#rendering-software)",
+ "description": "True when Annotation includes one or more Specific Resource targets, one or more of which include renderedVia key with one or more values. (Section 4.4)",
+ "type": "object",
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/renderedViaDetected" },
+ { "$ref": "specificResource.json#/definitions/itemRenderedViaPropertyDetected" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/renderedViaDetected" },
+ { "$ref": "specificResource.json#/definitions/itemRenderedViaPropertyDetected" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/3.2.2-targType.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/3.2.2-targType.json
new file mode 100644
index 0000000000..0c85cef7f6
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/3.2.2-targType.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.2.2-targType.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Target may include type key with one or more values that are each drawn from the model's list of resource classes.",
+ "title": "Implements **target _type_ key** with one or more values each of which is drawn from the **model's list of resource classes** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
+ "description": "True when Annotation includes one or more Targets, one or more of which include type key with one or more values that are each drawn from the model's list of resource classes. (Section 3.2.1)",
+ "type": "object",
+ "required": [ "target" ],
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" },
+ { "$ref": "bodyTarget.json#/definitions/sourceRecognizedTypeFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/3.3.3-targAudience.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/3.3.3-targAudience.json
new file mode 100644
index 0000000000..9f71688a87
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/3.3.3-targAudience.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.3-targAudience.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a target may include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.",
+ "title": "Implements **target _audience_ key** which has one or more values with each audience instance described using **[schema.org/Audience](http://schema.org/Audience) classes and properties** - [model 3.3.3](https://www.w3.org/TR/annotation-model/#intended-audience)",
+ "description": "True when Annotation includes one or more targets, one or more of which include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.. (Section 3.3.3)",
+ "type": "object",
+ "required": [ "target" ],
+ "properties":
+ {
+ "target":
+ {
+ "oneOf": [
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" },
+ { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-TextDataPositionSelectorValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-TextDataPositionSelectorValid.json
new file mode 100644
index 0000000000..7b3f4c89db
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-TextDataPositionSelectorValid.json
@@ -0,0 +1,110 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2-textDataPositionSelectorValid.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains a Text Position or Data Position selector that is NOT of format uri and NOT an object having a value key with a single sting value.",
+ "title": "If present all **Selectors of _type_ TextPositionSelector or DataPositionSelector** have both a **_start_ key** and an **_end_ key**, each with a **single non-negative integer value** [model 4.2](https://www.w3.org/TR/annotation-model/#selectors)",
+ "description": "True when no Fragment, Css or XPath selectors present or all such selectors values are of format uri or are objects having a both start and end keys, each with a single non-negative integer value. (Section 4.2)",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(body|target)$":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "definitions":
+ {
+ "selectorSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "selector":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/textPositionSelectorTypeValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/dataPositionSelectorTypeValidIfPresent" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/textPositionSelectorTypeValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/dataPositionSelectorTypeValidIfPresent" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "itemsSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {"$ref": "#/definitions/selectorSchema" }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-fragmentCssXPathSelectorValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-fragmentCssXPathSelectorValid.json
new file mode 100644
index 0000000000..0bda0fe38c
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-fragmentCssXPathSelectorValid.json
@@ -0,0 +1,112 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2-fragmentCssXPathSelectorValid.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains a Fragment, Css or XPath selector that is NOT of format uri and NOT an object having a value key with a single sting value.",
+ "title": "If present all **Selectors of _type_ FragmentSelector, CssSelector, or XPathSelector** have a **_value_ key** with a **single value** - [model 4.2](https://www.w3.org/TR/annotation-model/#selectors)",
+ "description": "True when no Fragment, Css or XPath selectors present or all such selectors values are of format uri or are objects having a value key with a single value. (Section 4.2)",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(body|target)$":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "definitions":
+ {
+ "selectorSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "selector":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/fragmentSelectorTypeValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/cssSelectorTypeValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/xpathSelectorTypeValidIfPresent" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/fragmentSelectorTypeValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/cssSelectorTypeValidIfPresent" },
+ { "$ref": "specificResource.json#/definitions/xpathSelectorTypeValidIfPresent" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "itemsSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {"$ref": "#/definitions/selectorSchema" }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorFound.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorFound.json
new file mode 100644
index 0000000000..45390f35ef
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorFound.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.-selectorFound.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include a Selector .",
+ "title": "Implements **Specific Resource Selector** - [model 4.2](https://www.w3.org/TR/annotation-model/#selectors)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a Selector. (Section 4.2)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/selectorDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/selectorDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorValidIfPresent.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorValidIfPresent.json
new file mode 100644
index 0000000000..b2721a3c11
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorValidIfPresent.json
@@ -0,0 +1,43 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2-selectorValidIfPresent.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains one or more Specific Resources selectors having value(s) which is(are) not of format uri, nor an object having a type key with a single value which is one of 'FragmentSelector', 'CssSelector', 'XPathSelector', 'TextQuoteSelector', 'TextPositionSelector', 'DataPositionSelector', 'SvgSelector', 'RangeSelector'.",
+ "title": "If present **Specific Resource _selector_ key** has one or more values each of which is of **format uri** or an object having a **_type_ key** with a **single value** which is one of **'FragmentSelector', 'CssSelector', 'XPathSelector', 'TextQuoteSelector', 'TextPositionSelector', 'DataPositionSelector', 'SvgSelector', 'RangeSelector'** - [model 4.2](https://www.w3.org/TR/annotation-model/#selectors)",
+ "description": "True when no Specific Resources selector present or all Specific Resource selector values included in the Annotation (if any) are of format uri or or are objects having a type key with a single value which is one of 'FragmentSelector', 'CssSelector', 'XPathSelector', 'TextQuoteSelector', 'TextPositionSelector', 'DataPositionSelector', 'SvgSelector', 'RangeSelector'. (Section 4.2)",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(body|target)$":
+ {"oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/selectorDefined" },
+ { "$ref": "specificResource.json#/definitions/itemSelectorValidIfPresent" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "items":
+ {"oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/selectorDefined" },
+ { "$ref": "specificResource.json#/definitions/itemSelectorValidIfPresent" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-conformsTo.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-conformsTo.json
new file mode 100644
index 0000000000..12df91d311
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-conformsTo.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.1-conformsTo.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a FragmentSelector should include conformsTo key with a single value that is of format uri.",
+ "title": "Implements **Specific Resource _conformsTo_ key** with a **single value** which is of **format uri** on a **Specific Resource FragmentSelector** - [model 4.2.1](https://www.w3.org/TR/annotation-model/#fragment-selector)",
+ "description": "True when Annotation includes one or more FragmentSelectors, one or more of which include conformsTo key with a single value of format uri. (Section 4.2.1)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/conformsToPropertyFound"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/conformsToPropertyFound" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-fragmentSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-fragmentSelector.json
new file mode 100644
index 0000000000..d21488ef51
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-fragmentSelector.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.1-fragmentSelector.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include fragmentSelector .",
+ "title": "Implements **Specific Resource Fragment Selector** - [model 4.2.1](https://www.w3.org/TR/annotation-model/#fragment-selector)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a fragmentSelector. (Section 4.2.1)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/fragmentSelectorDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/fragmentSelectorDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.2-cssSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.2-cssSelector.json
new file mode 100644
index 0000000000..ec33592304
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.2-cssSelector.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.2-cssSelector.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include cssSelector .",
+ "title": "Implements **Specific Resource CSS Selector** - [model 4.2.2](https://www.w3.org/TR/annotation-model/#css-selector)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a cssSelector. (Section 4.2.2)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/cssSelectorDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/cssSelectorDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.3-xpathSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.3-xpathSelector.json
new file mode 100644
index 0000000000..e5526be5c2
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.3-xpathSelector.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.3-xpathSelector.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include xpathSelector .",
+ "title": "Implements **Specific Resource XPath Selector** - [model 4.2.3](https://www.w3.org/TR/annotation-model/#xpath-selector)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a xpathSelector. (Section 4.2.3)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/xpathSelectorDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/xpathSelectorDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-prefix.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-prefix.json
new file mode 100644
index 0000000000..825a24a6d9
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-prefix.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.4-prefix.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a TextQuoteSelector should include prefix key with a single value .",
+ "title": "Implements **Specific Resource _prefix_ key** with a **single string value** on a **Specific Resource TextQuoteSelector** - [model 4.2.4](https://www.w3.org/TR/annotation-model/#text-quote-selector)",
+ "description": "True when Annotation includes one or more TextQuoteSelectors, one or more of which include prefix key with a single value . (Section 4.2.4)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/prefixPropertyFound"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/prefixPropertyFound" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-suffix.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-suffix.json
new file mode 100644
index 0000000000..b03fb6028c
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-suffix.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.4-suffix.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a TextQuoteSelector should include suffix key with a single value .",
+ "title": "Implements **Specific Resource _suffix_ key** with a **single string value** on a **Specific Resource TextQuoteSelector** - [model 4.2.4](https://www.w3.org/TR/annotation-model/#text-quote-selector)",
+ "description": "True when Annotation includes one or more TextQuoteSelectors, one or more of which include suffix key with a single value . (Section 4.2.4)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/suffixPropertyFound"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/suffixPropertyFound" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelector.json
new file mode 100644
index 0000000000..34ef0ed6c6
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelector.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.4-textQuoteSelector.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include textQuoteSelector .",
+ "title": "Implements **Specific Resource Text Quote Selector** - [model 4.2.4](https://www.w3.org/TR/annotation-model/#text-quote-selector)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a textQuoteSelector. (Section 4.2.4)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/textQuoteSelectorDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/textQuoteSelectorDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelectorValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelectorValid.json
new file mode 100644
index 0000000000..c61c5cc8f4
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelectorValid.json
@@ -0,0 +1,107 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.4-textQuoteSelectorValid.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains a Text Quote selector that is NOT of format uri and NOT an object having an exact key with a single sting value.",
+ "title": "If present all **Selectors of _type_ TextQuoteSelector** have an **_exact_ key** with a **single value** - [model 4.2.4](https://www.w3.org/TR/annotation-model/#text-quote-selector)",
+ "description": "True when no Text Quote selectors present or all such selectors values are of format uri or are objects having an exact key with a single value. (Section 4.2.4)",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(body|target)$":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "definitions":
+ {
+ "selectorSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "selector":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/textQuoteSelectorTypeValidIfPresent" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/textQuoteSelectorTypeValidIfPresent" } ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "itemsSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {"$ref": "#/definitions/selectorSchema" }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.5-textPositionSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.5-textPositionSelector.json
new file mode 100644
index 0000000000..03cdf2ee64
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.5-textPositionSelector.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.5-textPositionSelector.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include textPositionSelector .",
+ "title": "Implements **Specific Resource Text Position Selector** - [model 4.2.5](https://www.w3.org/TR/annotation-model/#text-position-selector)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a textPositionSelector. (Section 4.2.5)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/textPositionSelectorDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/textPositionSelectorDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.6-dataPositionSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.6-dataPositionSelector.json
new file mode 100644
index 0000000000..4214420686
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.6-dataPositionSelector.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.6-dataPositionSelector.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include dataPositionSelector .",
+ "title": "Implements **Specific Resource Data Position Selector** - [model 4.2.6](https://www.w3.org/TR/annotation-model/#data-position-selector)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a dataPositionSelector. (Section 4.2.6)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/dataPositionSelectorDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/dataPositionSelectorDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelector.json
new file mode 100644
index 0000000000..17834f54db
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelector.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.7-svgSelector.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include svgSelector .",
+ "title": "Implements **Specific Resource SVG Selector** - [model 4.2.7](https://www.w3.org/TR/annotation-model/#svg-selector)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a svgSelector. (Section 4.2.7)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/svgSelectorDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/svgSelectorDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelectorValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelectorValid.json
new file mode 100644
index 0000000000..807a9efd4b
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelectorValid.json
@@ -0,0 +1,107 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.7-svgSelectorValid.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains a SVG selector that is NOT of format uri and NOT an object having either a value or an id key.",
+ "title": "If present all **Selectors of _type_ SvgSelector** have either a **_value_ key** or an **_id_ key** with a **single value** of format uri [model 4.2.7](https://www.w3.org/TR/annotation-model/#svg-selector)",
+ "description": "True when no SVG selectors present or all such selectors values are of format uri or are objects having either a value or an id key. (Section 4.2.7)",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(body|target)$":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "definitions":
+ {
+ "selectorSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "selector":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/svgSelectorTypeValidIfPresent" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/svgSelectorTypeValidIfPresent" } ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "itemsSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {"$ref": "#/definitions/selectorSchema" }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelector.json
new file mode 100644
index 0000000000..68c2feaf30
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelector.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.8-rangeSelector.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include rangeSelector .",
+ "title": "Implements **Specific Resource Range Selector** - [model 4.2.8](https://www.w3.org/TR/annotation-model/#range-selector)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a rangeSelector. (Section 4.2.8)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/rangeSelectorDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/rangeSelectorDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelectorValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelectorValid.json
new file mode 100644
index 0000000000..97a17af146
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelectorValid.json
@@ -0,0 +1,107 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.2.8-rangeSelectorValid.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains a Range selector that is NOT of format uri and NOT an object having both startSelector and endSelector keys.",
+ "title": "If present all **Selectors of _type_ RangeSelector** have both a **_startSelector_ key** and an **_endSelector_ key**, each with a **single value** which is a **Selector** - [model 4.2.8](https://www.w3.org/TR/annotation-model/#range-selector)",
+ "description": "True when no Range selectors present or all such selectors values are of format uri or are objects having both startSelector and endSelector keys. (Section 4.2.8)",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(body|target)$":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "definitions":
+ {
+ "selectorSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "selector":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/rangeSelectorTypeValidIfPresent" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/rangeSelectorTypeValidIfPresent" } ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "itemsSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {"$ref": "#/definitions/selectorSchema" }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateFound.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateFound.json
new file mode 100644
index 0000000000..fb1b1a09d0
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateFound.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.3-stateFound.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include a State .",
+ "title": "Implements **Specific Resource State** - [model 4.3](https://www.w3.org/TR/annotation-model/#states)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a State. (Section 4.3)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/selectorSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "selectorSchema":
+ { "type": "object",
+ "properties":
+ { "selector":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/stateDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/stateDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "selector" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/selectorSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateValidIfPresent.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateValidIfPresent.json
new file mode 100644
index 0000000000..0435526c8d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateValidIfPresent.json
@@ -0,0 +1,43 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.3-stateValidIfPresent.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains one or more Specific Resources states having value(s) which is(are) not of format uri, nor an object having a type key with a single value which is one of 'TimeState' or 'HttpRequestState'.",
+ "title": "If present **Specific Resource _state_ key** has one or more values each of which is of **format uri** or an object having a **_type_ key** with a **single value** which is one of **'TimeState' or 'HttpRequestState'** - [model 4.3](https://www.w3.org/TR/annotation-model/#states)",
+ "description": "True when no Specific Resources state present or all Specific Resource state values included in the Annotation (if any) are of format uri or or are objects having a type key with a single value which is one of 'TimeState' or 'HttpRequestState'. (Section 4.3)",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(body|target)$":
+ {"oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/stateDefined" },
+ { "$ref": "specificResource.json#/definitions/itemStateValidIfPresent" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "items":
+ {"oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/stateDefined" },
+ { "$ref": "specificResource.json#/definitions/itemStateValidIfPresent" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-cached.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-cached.json
new file mode 100644
index 0000000000..449356a3df
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-cached.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.3.1-cached.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a TimeState may include cached key with a single value that is of format uri.",
+ "title": "Implements **Specific Resource _cached_ key** with one or more values each of **format uri** on a **Specific Resource TimeState** - [model 4.3.1](https://www.w3.org/TR/annotation-model/#time-state)",
+ "description": "True when Annotation includes one or more TimeStates, one or more of which include cached key with a single value of format uri. (Section 4.3.1)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "stateSchema":
+ { "type": "object",
+ "properties":
+ { "state":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/cachedPropertyFound"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/cachedPropertyFound" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "state" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/stateSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeState.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeState.json
new file mode 100644
index 0000000000..faa8476435
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeState.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.3.1-timeStateState.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include timeState State .",
+ "title": "Implements **Specific Resource Time State** - [model 4.3.1](https://www.w3.org/TR/annotation-model/#time-state)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a timeState State. (Section 4.3.1)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "stateSchema":
+ { "type": "object",
+ "properties":
+ { "state":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/timeStateDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/timeStateDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "state" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/stateSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeStateValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeStateValid.json
new file mode 100644
index 0000000000..ca973d30da
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeStateValid.json
@@ -0,0 +1,107 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.3.1-timeStateValid.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains a Time State that is NOT of format uri and NOT an object having sourceDate key or (alternatively, non concurrently) both sourceDateStart and sourceDateEnd keys.",
+ "title": "If present all **States of _type_ TimeState** each have either (but not both) a **_souceDate_ key** or paired **_sourceDateStart_ and _sourceDateEnd_ keys,** each of which is a **single value** of **format date-time**- [model 4.3.1](https://www.w3.org/TR/annotation-model/#time-state)",
+ "description": "True when no Time States present or all such states values are of format uri or are objects having sourceDate key or (alternatively, non concurrently) both sourceDateStart and sourceDateEnd keys. (Section 4.3.1)",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(body|target)$":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "definitions":
+ {
+ "stateSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "state":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/timeStateTypeValidIfPresent" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/timeStateTypeValidIfPresent" } ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "itemsSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {"$ref": "#/definitions/stateSchema" }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-httpRequestStateValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-httpRequestStateValid.json
new file mode 100644
index 0000000000..b4ba2242ee
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-httpRequestStateValid.json
@@ -0,0 +1,107 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.3.2-httpRequestStateValid.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains a HTTP Request Header State that is NOT of format uri and NOT an object having a value key.",
+ "title": "If present all **States of _type_ HttpRequestState** have a **_value_ key** - [model 4.3.2](https://www.w3.org/TR/annotation-model/#request-header-state)",
+ "description": "True when no HTTP Request Header States present or all such states values are of format uri or are objects having value key. (Section 4.3.2)",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(body|target)$":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemsSchema" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "definitions":
+ {
+ "stateSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "state":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/requestHeaderStateTypeValidIfPresent" }
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {
+ "type":"object",
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/requestHeaderStateTypeValidIfPresent" } ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "itemsSchema":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "oneOf":
+ [
+ {"$ref": "id.json#/definitions/stringUri" },
+ {"$ref": "#/definitions/stateSchema" }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-requestHeaderState.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-requestHeaderState.json
new file mode 100644
index 0000000000..829043b126
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-requestHeaderState.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.3.2-requestHeaderStateState.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include requestHeaderState State .",
+ "title": "Implements **Specific Resource Request Header State** - [model 4.3.2](https://www.w3.org/TR/annotation-model/#request-header-state)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a requestHeaderState State. (Section 4.3.2)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/stateSchema" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "stateSchema":
+ { "type": "object",
+ "properties":
+ { "state":
+ { "oneOf":
+ [
+ { "type": "object",
+ "$ref": "specificResource.json#/definitions/requestHeaderStateDetected"
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/requestHeaderStateDetected" } }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "state" ]
+ },
+
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "#/definitions/stateSchema" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedBy.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedBy.json
new file mode 100644
index 0000000000..127e684165
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedBy.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.3.3-refinedBy.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource selector or state may include refinedBy key with one or more values.",
+ "title": "Implements **Specific Resource _refinedBy_ key** [model 4.2.9](https://www.w3.org/TR/annotation-model/#refinement-of-selection), [model 4.3.3](https://www.w3.org/TR/annotation-model/#refinement-of-state)",
+ "description": "True when Annotation includes one or more Specific Resource selectors or states, one or more of which include refinedBy key with value(s). (Section 4.3.3)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/refinedByDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/refinedByDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/refinedByDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/refinedByDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/refinedByDetected" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedByValidated.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedByValidated.json
new file mode 100644
index 0000000000..5476e4a5d2
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedByValidated.json
@@ -0,0 +1,45 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.3-stateValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains one or more Specific Resources states having value(s) which is(are) not of format uri, nor an object having a type key with a single value which is one of 'TimeState' or 'HttpRequestState'.",
+ "title": "If present **Specific Resource _state_ key** has one or more values each of which is of **format uri** or an object having a **_type_ key** with a **single value** which is one of **'TimeState' or 'HttpRequestState'** - [model 4.3](https://www.w3.org/TR/annotation-model/#states)",
+ "description": "True when no Specific Resources state present or all Specific Resource state values included in the Annotation (if any) are of format uri or or are objects having a type key with a single value which is one of 'TimeState' or 'HttpRequestState'. (Section 4.3)",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(body|target)$":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/checkForRefinedBy" },
+ { "$ref": "specificResource.json#/definitions/itemRefinedByValidIfPresent" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ {
+ "allOf":
+ [
+ { "$ref": "specificResource.json#/definitions/checkForRefinedBy" },
+ { "$ref": "specificResource.json#/definitions/itemRefinedByValidIfPresent" }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClass.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClass.json
new file mode 100644
index 0000000000..800950b270
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClass.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.4-styleClass.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include styleClass key with one or more values.",
+ "title": "Implements **Specific Resource _styleClass_ key** with one or more values on a **Specific Resource** - [model 4.4](https://www.w3.org/TR/annotation-model/#styles)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which include styleClass key with value(s). (Section 4.4)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/styleClassDetected" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json
new file mode 100644
index 0000000000..3e599a0590
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json
@@ -0,0 +1,88 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.4-styleClassValidIfPresent.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation contains one or more Specific Resources with styleClass key, but does not contain an Annotation-level stylesheet key.",
+ "title": "If any **Specific Resource _styleClass_ keys** are present, a **_stylesheet_ key** (a key of Annotation) with a **single value** is also present [model 4.4](https://www.w3.org/TR/annotation-model/#styles)",
+ "description": "True when no Specific Resources styleClass present or all Specific Resource styleClass values are strings / array of strings and Annotation has a stylesheet key. (Section 4.4)",
+ "type": "object",
+ "anyOf":
+ [
+ { "required": ["stylesheet"] },
+ { "not":
+ {
+ "anyOf":
+ [
+ { "$ref": "#/definitions/bodyHasStyleClass" },
+ { "$ref": "#/definitions/targHasStyleClass" }
+ ]
+ }
+ }
+ ],
+ "definitions":
+ {
+ "bodyHasStyleClass":
+ {
+ "properties":
+ {
+ "body":
+ {
+ "oneOf":
+ [
+ { "anyOf":
+ [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": ["body"]
+ },
+
+ "targHasStyleClass":
+ {
+ "properties":
+ {
+ "target":
+ {
+ "oneOf":
+ [
+ { "anyOf":
+ [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
+ ]
+ },
+ { "not":
+ { "items":
+ { "not":
+ { "anyOf": [
+ { "$ref": "specificResource.json#/definitions/styleClassDetected" },
+ { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.5-renderedVia.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.5-renderedVia.json
new file mode 100644
index 0000000000..2815d3ca7e
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.5-renderedVia.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.5-renderedVia.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include renderedVia key with one or more values.",
+ "title": "Implements **Specific Resource _renderedVia_ key** with one or more values on a **Specific Resource** - [model 4.5](https://www.w3.org/TR/annotation-model/#rendering-software)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which include renderedVia key with value(s). (Section 4.5)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/renderedViaDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/renderedViaDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/renderedViaDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/renderedViaDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/renderedViaDetected" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.6-scope.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.6-scope.json
new file mode 100644
index 0000000000..f2002d597e
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.6-scope.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "4.6-scope.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "The description of a Specific Resource may include scope key with one or more values that is of format uri.",
+ "title": "Implements **Specific Resource _scope_ key** - [model 4.6](https://www.w3.org/TR/annotation-model/#scope-of-a-resource)",
+ "description": "True when Annotation includes one or more Specific Resources, one or more of which include scope key with value(s) of format uri. (Section 4.6)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "body":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/scopeDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/scopeDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "body" ]
+ },
+ { "properties":
+ { "target":
+ { "oneOf":
+ [
+ { "type": "object",
+ "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/scopeDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/scopeDetected" },
+ { "$ref": "#/definitions/itemSchema" }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "required": [ "target" ]
+ }
+ ],
+ "definitions":
+ {
+ "itemSchema":
+ { "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "$ref": "specificResource.json#/definitions/scopeDetected" } }
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionCreatedImplemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionCreatedImplemented.json
new file mode 100644
index 0000000000..d57ecd1efe
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionCreatedImplemented.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-collectionCreatedImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Valid Annotation Collection-level created key not found. Annotation Collection may have exactly one created key value.",
+ "title": "Implements Annotation Collection-level **_created_ key** which has a **single value** that is a **string of format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when the Annotation Collection implements exactly one created key value (Sections 3.3.1 and 5.1)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent"},
+ { "type": "object",
+ "required" : [ "created" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionCreatedValidated.json b/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionCreatedValidated.json
new file mode 100644
index 0000000000..09ff1aa9d0
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionCreatedValidated.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-collectionCreatedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Collection has multiple created key values or a single created key value that is not of format date-time.",
+ "title": "If present the Annotation Collection-level **_created_ key** has a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no Annotation Collection created key present or when created key has a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionCreatorImplemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionCreatorImplemented.json
new file mode 100644
index 0000000000..1bd4d14425
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionCreatorImplemented.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-collectionCreatorImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Collection creator key not found. Annotation Collection may have zero or more creators.",
+ "title": "Implements **Annotation Collection _creator_ key** which has one or more values, each of which is a **string of format uri** or an **object** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when the Annotation Collection implements creator key (Section 3.3.1)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/creatorValidIfPresent"},
+ { "type": "object",
+ "required": [ "creator" ] }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionModifiedImplemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionModifiedImplemented.json
new file mode 100644
index 0000000000..8deba356bd
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionModifiedImplemented.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-collectionModifiedImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Valid Annotation Collection-level modified key not found. Annotation Collection may have zero or exactly one modified key value.",
+ "title": "Implements Annotation Collection-level **_modified_ key** which has a **single value** that is a **string of format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when the Annotation Collection implements exactly one modified key value (Section 3.3.1, 5.1)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent"},
+ { "type": "object",
+ "required": [ "modified" ] }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionModifiedValidated.json b/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionModifiedValidated.json
new file mode 100644
index 0000000000..65a571e84e
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.1-collectionModifiedValidated.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-collectionModifiedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Collection has multiple modified key values or a single modified key value that is not of format date-time.",
+ "title": "If present the Annotation Collection-level **_modified_ key** has a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no Annotation Collection modified key present or when modified key has a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentEmailImplemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentEmailImplemented.json
new file mode 100644
index 0000000000..34b5c560b9
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentEmailImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-collectionCreatorAgentEmailImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email for Annotation Collection Creator (Agent) not found. Agents may have one or more email values.",
+ "title": "Implements Annotation Collection-level creator (Agent) **_email_ key** with one or more values, each of which is a **mailto: uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email values for Annotation Collection Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentEmailFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmailFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentEmail_sha1Implemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentEmail_sha1Implemented.json
new file mode 100644
index 0000000000..6e8ef75075
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentEmail_sha1Implemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-collectionCreatorAgentEmail_sha1Implemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email_sha1 for Annotation Collection Creator (Agent) not found. Agents may have one or more email_sha1 values.",
+ "title": "Implements Annotation Collection-level creator (Agent) **email_sha1 key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email_sha1 values for Annotation Collection Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentHomepageImplemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentHomepageImplemented.json
new file mode 100644
index 0000000000..c3ed8d3b0c
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentHomepageImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-collectionCreatorAgentHomepageImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Homepage for Annotation Collection Creator (Agent) not found. Agents may have one or more homepage values.",
+ "title": "Implements Annotation Collection-level creator (Agent) **_homepage_ key** with one or more values, each of which is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more homepage values for Annotation Collection Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentHomepageFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentHomepageFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentIdImplemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentIdImplemented.json
new file mode 100644
index 0000000000..3f7241d055
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentIdImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-collectionCreatorAgentIdImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Id for Annotation Collection Creator (Agent) not found or more than 1 found. Agents should have exactly one id of format uri.",
+ "title": "Implements Annotation Collection-level creator (Agent) **_id_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Annotation Collection Creator (Agent) has exactly one id (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "id.json#/definitions/idValueFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "id.json#/definitions/idValueFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentNameImplemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentNameImplemented.json
new file mode 100644
index 0000000000..5f1a07b0f0
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentNameImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-collectionCreatorAgentNameImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Name for Annotation Collection Creator (Agent) not found. Agents may have one or more name values.",
+ "title": "Implements Annotation Collection-level creator (Agent) **_name_ key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more name values for Annotation Collection Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentNameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentNameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentNicknameImplemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentNicknameImplemented.json
new file mode 100644
index 0000000000..9da32ff09f
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentNicknameImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-collectionCreatorAgentNicknameImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Nickname for Annotation Collection Creator (Agent) not found. Agents should have exactly one nickname value.",
+ "title": "Implements Annotation Collection-level creator (Agent) **_nickname_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when exactly one nickname for Annotation Collection Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentTypeImplemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentTypeImplemented.json
new file mode 100644
index 0000000000..43f5fc32f4
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.2-collectionCreatorAgentTypeImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-collectionCreatorAgentTypeImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Type (Person, Organization, Software) for Annotation Collection Creator (Agent) not found. Agents should have one or more type values.",
+ "title": "Implements Annotation Collection-level creator (Agent) **_type_ key** with one or more values from **model-recommended list (Person, Organization, Software)** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Annotation Collection Creator (Agent) is implemented (Section 3.3.2)",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentTypeFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentTypeFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.6-collectionRightsImplemented.json b/testing/web-platform/tests/annotation-model/collections/3.3.6-collectionRightsImplemented.json
new file mode 100644
index 0000000000..927f93eb3e
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.6-collectionRightsImplemented.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.6-collectionRightsImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Collection-level rights key having string value(s) of format uri not found. Annotation Collection may have zero or more rights key values.",
+ "title": "Implements Annotation Collection-level **_rights_** key which has one or more values, each of which is a **string of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)",
+ "description": "True when the Annotation Collection implements rights key with with string(s) of format uri value(s) (Sections 5.1 and 3.3.6)",
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent"},
+ { "type": "object",
+ "required": [ "rights" ]}
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/3.3.6-collectionRightsValidated.json b/testing/web-platform/tests/annotation-model/collections/3.3.6-collectionRightsValidated.json
new file mode 100644
index 0000000000..6841046058
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/3.3.6-collectionRightsValidated.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.6-collectionRightsValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Collection Collection has one or more values for the rights key that are not strings of format uri.",
+ "title": "If present the Annotation Collection Collection-level **_rights_ key** has values that are all **strings of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)",
+ "description": "True when no Annotation Collection Collection rights key present or when all values of rights key are strings of format uri (Section 3.3.6)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionContextValidated.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionContextValidated.json
new file mode 100644
index 0000000000..d9a5dc3123
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionContextValidated.json
@@ -0,0 +1,20 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionContextValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Collection is missing @context key or 'http://www.w3.org/ns/anno.jsonld' is not a value of @context.",
+ "title": "Implements **_@context_ key** and '**http://www.w3.org/ns/anno.jsonld**' is **a value of _@context_** - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "description": "True when the Annotation Collection has @context key and 'http://www.w3.org/ns/anno.jsonld' is an @context value (Section 5.1)",
+ "type": "object",
+ "required": [ "@context" ],
+ "properties": {
+ "@context": {
+ "oneOf": [
+ { "$ref": "collections.json#/definitions/contextValueFound" },
+ { "$ref": "collections.json#/definitions/contextValueInArrayFound" }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionFirstImplemented.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionFirstImplemented.json
new file mode 100644
index 0000000000..0eee805921
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionFirstImplemented.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionFirstImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Collection is allowed exactly one first key.",
+ "title": "Implements **Annotation Collection _first_ key** - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "$ref": "collections.json#/definitions/firstFound"
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionFirstValidated.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionFirstValidated.json
new file mode 100644
index 0000000000..4c31e1fd74
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionFirstValidated.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionFirstValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Collection has invalid first key or has total value more than zero without a valid first key.",
+ "title": "**Annotation Collection has _first_ key**, or no **_total_ key**, or **_total_ key** with value of zero - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "$ref": "collections.json#/definitions/firstRequiredIfTotalMoreThanZero"
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionIdValidated.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionIdValidated.json
new file mode 100644
index 0000000000..164620879e
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionIdValidated.json
@@ -0,0 +1,11 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionIdValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Collection is missing id key or value of id key is not a single string of format uri.",
+ "title": "Implements **Annotation Collection _id_ key** which has a **single value** that is a **string of format uri** - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "description": "True when the Annotation Collection has a single id that is a string of format uri (Section 5.1)",
+ "$ref": "id.json#/definitions/idValueFound"
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionLabelImplemented.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionLabelImplemented.json
new file mode 100644
index 0000000000..916ba5c80d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionLabelImplemented.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionLabelImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Collection should have a label key.",
+ "title": "Implements **Annotation Collection _label_ key** - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "$ref": "collections.json#/definitions/labelFound"
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionLabelValidated.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionLabelValidated.json
new file mode 100644
index 0000000000..7543d515da
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionLabelValidated.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionLabelValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Collection has label key with non-string value or an array as value containing non-string value.",
+ "title": "**Annotation Collection _label_ key**, if present, is **a value of type string** - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "$ref": "collections.json#/definitions/labelDefinition"
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionLastImplemented.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionLastImplemented.json
new file mode 100644
index 0000000000..528a5616e8
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionLastImplemented.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionLastImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Collection should include exactly one last key with value that is string of uri format.",
+ "title": "Implements **Annotation Collection _last_ key** - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "$ref": "collections.json#/definitions/lastFound"
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionLastValidated.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionLastValidated.json
new file mode 100644
index 0000000000..d00e90da69
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionLastValidated.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionLastValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Collection has last key with non-uri value or array as value containing more than one item.",
+ "title": "**Annotation Collection _last_ key**, if present, is **a single value of format uri** - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "$ref": "collections.json#/definitions/lastValidIfPresent"
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionTotalImplemented.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionTotalImplemented.json
new file mode 100644
index 0000000000..088e785c2e
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionTotalImplemented.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionTotalImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Collection should include exactly one total key with non-negative numeric value.",
+ "title": "Implements **Annotation Collection _total_ key** - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "$ref": "collections.json#/definitions/totalFound"
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionTotalValidated.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionTotalValidated.json
new file mode 100644
index 0000000000..51b3ff263a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionTotalValidated.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionTotalValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Collection has total key with non-numeric value, a negative numeric value, or more than one value.",
+ "title": "**Annotation Collection _total_ key**, if present, is **a non-negative integer value** - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "$ref": "collections.json#/definitions/totalDefinition"
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/5.1-collectionTypeValidated.json b/testing/web-platform/tests/annotation-model/collections/5.1-collectionTypeValidated.json
new file mode 100644
index 0000000000..3c858ab92d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/5.1-collectionTypeValidated.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.1-collectionTypeValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Collection is missing type key or 'AnnotationCollection' is not a value of type.",
+ "title": "Implements **Annotation Collection _type_ key** such that '**AnnotationCollection**' is **a value of _type_** - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "$ref": "collections.json#/definitions/annotationCollectionTypeValueFound"
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/collectionMusts-manual.html b/testing/web-platform/tests/annotation-model/collections/collectionMusts-manual.html
new file mode 100644
index 0000000000..a023956484
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/collectionMusts-manual.html
@@ -0,0 +1,48 @@
+
+
+
+
Note: Implementation of optional Annotation Collection keys (features), optional constraints on key values, and optional keys and constraints on Agents involved in an Annotation Collection checked by other tests.
Please fill textarea with json-ld serialization of a single Annotation Collection description",
+ "testType": "manual",
+ "ref": "https://www.w3.org/TR/annotation-model/",
+ "assertions": [
+ "collections/5.1-collectionContextValidated.json",
+ "collections/5.1-collectionIdValidated.json",
+ "collections/5.1-collectionTypeValidated.json",
+ "collections/5.1-collectionLabelValidated.json",
+ "collections/5.1-collectionTotalValidated.json",
+ "collections/5.1-collectionFirstValidated.json",
+ "collections/5.1-collectionLastValidated.json",
+ "collections/3.3.1-collectionCreatedValidated.json",
+ "collections/3.3.1-collectionModifiedValidated.json",
+ "collections/3.3.6-collectionRightsValidated.json"
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/collectionOptionals-manual.html b/testing/web-platform/tests/annotation-model/collections/collectionOptionals-manual.html
new file mode 100644
index 0000000000..24df82d982
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/collectionOptionals-manual.html
@@ -0,0 +1,48 @@
+
+
+
+
Note: failing an assertion indicates only that a recommended or optional feature has not been implemented or has not been implemented correctly.
Please fill textarea with json-ld serialization of a single Annotation Collection description",
+ "testType": "manual",
+ "skipFailures": [ "should", "may" ],
+ "ref": "https://www.w3.org/TR/annotation-model/",
+ "assertions": [
+ "collections/5.1-collectionLabelImplemented.json",
+ "collections/5.1-collectionLastImplemented.json",
+ "collections/5.1-collectionTotalImplemented.json",
+ "collections/5.1-collectionFirstImplemented.json",
+ "collections/3.3.1-collectionModifiedImplemented.json",
+ "collections/3.3.1-collectionCreatorImplemented.json",
+ "collections/3.3.1-collectionCreatedImplemented.json",
+ "collections/3.3.6-collectionRightsImplemented.json",
+ "collections/3.3.2-collectionCreatorAgentEmail_sha1Implemented.json",
+ "collections/3.3.2-collectionCreatorAgentEmailImplemented.json",
+ "collections/3.3.2-collectionCreatorAgentHomepageImplemented.json",
+ "collections/3.3.2-collectionCreatorAgentIdImplemented.json",
+ "collections/3.3.2-collectionCreatorAgentNameImplemented.json",
+ "collections/3.3.2-collectionCreatorAgentNicknameImplemented.json",
+ "collections/3.3.2-collectionCreatorAgentTypeImplemented.json"
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageCreatedImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageCreatedImplemented.json
new file mode 100644
index 0000000000..3979744c91
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageCreatedImplemented.json
@@ -0,0 +1,30 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-pageCreatedImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Valid Annotation Page-level created key (i.e., in description of Collection included using partOf key) not found. Annotation Page may have exactly one created key value inherited from Collection.",
+ "title": "Implements Annotation Page-level **_created_ key** (i.e., in description of Collection included using partOf key) which has a **single value** that is a **string of format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when the Annotation Page implements exactly one created key value (i.e., in description of Collection included using partOf key) (Sections 3.3.1 and 5.2)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "#/definitions/createdImplemented" }
+ },
+ "required": [ "partOf" ],
+ "definitions":
+ {
+ "createdImplemented":
+ {
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent"},
+ { "type": "object",
+ "required" : [ "created" ]
+ }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageCreatedValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageCreatedValidated.json
new file mode 100644
index 0000000000..96218084ad
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageCreatedValidated.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-pageCreatedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation page has multiple created key values or a single created key value that is not of format date-time.",
+ "title": "If present the Annotation page-level **_created_ key** (i.e., in description of Collection included using partOf key) has a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no Annotation page created key present (i.e., in description of Collection included using partOf key) or when created key has a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageCreatorImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageCreatorImplemented.json
new file mode 100644
index 0000000000..6ae95413e2
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageCreatorImplemented.json
@@ -0,0 +1,28 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-pageCreatorImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Valid Annotation Page-level creator key (i.e., in description of Collection included using partOf key) not found. Annotation Page may have zero or more creators inherited from Collection.",
+ "title": "Implements **Annotation Page-level _creator_ key** (i.e., in description of Collection included using partOf key) which has one or more values, each of which is a **string of format uri** or an **object** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "#/definitions/creatorImplemented" }
+ },
+ "required": [ "partOf" ],
+ "definitions":
+ {
+ "creatorImplemented":
+ {
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/creatorValidIfPresent"},
+ { "type": "object",
+ "required": [ "creator" ] }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageModifiedImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageModifiedImplemented.json
new file mode 100644
index 0000000000..68d22370af
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageModifiedImplemented.json
@@ -0,0 +1,29 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-pageModifiedImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Valid Annotation Page-level modified key (i.e., in description of Collection included using partOf key) not found. Annotation Page may have zero or exactly one modified key value inherited from Collection.",
+ "title": "Implements Annotation Page-level **_modified_ key** (i.e., in description of Collection included using partOf key) which has a **single value** that is a **string of format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when the Annotation Page implements exactly one modified key value (i.e., in description of Collection included using partOf key) (Section 3.3.1, 5.2)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "#/definitions/modifiedImplemented" }
+ },
+ "required": [ "partOf" ],
+ "definitions":
+ {
+ "modifiedImplemented":
+ {
+ "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent"},
+ { "type": "object",
+ "required": [ "modified" ] }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageModifiedValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageModifiedValidated.json
new file mode 100644
index 0000000000..e7c1a55837
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.1-pageModifiedValidated.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.1-pageModifiedValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation page has multiple modified key values or a single modified key value that is not of format date-time.",
+ "title": "If present the Annotation page-level **_modified_ key** (i.e., in description of Collection included using partOf key) has a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)",
+ "description": "True when no Annotation page modified key present (i.e., in description of Collection included using partOf key) or when modified key has a single value that is of format date-time (Section 3.3.1)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentEmailImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentEmailImplemented.json
new file mode 100644
index 0000000000..541a32deb6
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentEmailImplemented.json
@@ -0,0 +1,35 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-pageCreatorAgentEmailImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) not found. Agents may have one or more email values.",
+ "title": "Implements Annotation Page-level creator (Agent) (i.e., in description of Collection included using partOf key) **_email_ key** with one or more values, each of which is a **mailto: uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email values for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) is implemented (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "#/definitions/creatorAgentEmailFound" }
+ },
+ "required": [ "partOf" ],
+ "definitions": {
+ "creatorAgentEmailFound":
+ { "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentEmailFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmailFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentEmail_sha1Implemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentEmail_sha1Implemented.json
new file mode 100644
index 0000000000..ba7d38eac1
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentEmail_sha1Implemented.json
@@ -0,0 +1,35 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-pageCreatorAgentEmail_sha1Implemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Email_sha1 for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) not found. Agents may have one or more email_sha1 values.",
+ "title": "Implements Annotation Page-level creator (Agent) (i.e., in description of Collection included using partOf key) **email_sha1 key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more email_sha1 values for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) is implemented (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "#/definitions/creatorAgentEmail_sha1Found" }
+ },
+ "required": [ "partOf" ],
+ "definitions": {
+ "creatorAgentEmail_sha1Found":
+ { "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentHomepageImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentHomepageImplemented.json
new file mode 100644
index 0000000000..7b8c9d7e2a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentHomepageImplemented.json
@@ -0,0 +1,35 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-pageCreatorAgentHomepageImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Homepage for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) not found. Agents may have one or more homepage values.",
+ "title": "Implements Annotation Page-level creator (Agent) (i.e., in description of Collection included using partOf key) **_homepage_ key** with one or more values, each of which is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more homepage values for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) is implemented (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "#/definitions/creatorAgentHomePageFound" }
+ },
+ "required": [ "partOf" ],
+ "definitions": {
+ "creatorAgentHomePageFound":
+ { "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentHomepageFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentHomepageFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentIdImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentIdImplemented.json
new file mode 100644
index 0000000000..2a280ead8d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentIdImplemented.json
@@ -0,0 +1,36 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-pageCreatorAgentIdImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Single id for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) not found for any Creator. Agents should have exactly one id of format uri.",
+ "title": "Implements Annotation Page-level creator (Agent) (i.e., in description of Collection included using partOf key) **_id_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when at least one Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) has exactly one id (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "#/definitions/creatorAgentIdFound" }
+ },
+ "required": [ "partOf" ],
+ "definitions": {
+ "creatorAgentIdFound":
+ {
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "id.json#/definitions/idValueFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "id.json#/definitions/idValueFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentNameImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentNameImplemented.json
new file mode 100644
index 0000000000..50f811021e
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentNameImplemented.json
@@ -0,0 +1,35 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-pageCreatorAgentNameImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Name for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) not found. Agents may have one or more name values.",
+ "title": "Implements Annotation Page-level creator (Agent) (i.e., in description of Collection included using partOf key) **_name_ key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when one or more name values for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) is implemented (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "#/definitions/creatorAgentNameFound" }
+ },
+ "required": [ "partOf" ],
+ "definitions": {
+ "creatorAgentNameFound":
+ { "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentNameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentNameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentNicknameImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentNicknameImplemented.json
new file mode 100644
index 0000000000..7829deafcb
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentNicknameImplemented.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-pageCreatorAgentNicknameImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Single nickname for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) not found for any Creator. Agents should have exactly one id of format uri.",
+ "title": "Implements Annotation Page-level creator (Agent) (i.e., in description of Collection included using partOf key) **_nickname_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when at least one Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) has exactly one nickname (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "#/definitions/creatorAgentNicknameFound" }
+ },
+ "required": [ "partOf" ],
+ "definitions": {
+ "creatorAgentNicknameFound":
+ {
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ }
+ }
+}
+
+
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentTypeImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentTypeImplemented.json
new file mode 100644
index 0000000000..20b40d0104
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.2-pageCreatorAgentTypeImplemented.json
@@ -0,0 +1,35 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.2-pageCreatorAgentTypeImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Type (Person, Organization, Software) for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) not found. Agents should have one or more type values.",
+ "title": "Implements Annotation Page-level creator (Agent) (i.e., in description of Collection included using partOf key) **_type_ key** with one or more values from **model-recommended list (Person, Organization, Software)** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)",
+ "description": "True when type for Annotation Page Creator (Agent) (i.e., in description of Collection included using partOf key) is implemented (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "#/definitions/creatorAgentTypeFound" }
+ },
+ "required": [ "partOf" ],
+ "definitions": {
+ "creatorAgentTypeFound":
+ { "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/agentTypeFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentTypeFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.6-pageRightsImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.6-pageRightsImplemented.json
new file mode 100644
index 0000000000..7a3fa5c460
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.6-pageRightsImplemented.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.6-pageRightsImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Page rights key (i.e., in description of Collection included using partOf key) having string value(s) of format uri not found. Annotation Page may may have zero or more rights key values.",
+ "title": "Implements Annotation Page **_rights_** key (i.e., in description of Collection included using partOf key) which has one or more values, each of which is a **string of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)",
+ "description": "True when the Annotation Page implements collection rights key (i.e., in description of Collection included using partOf key) with with string(s) of format uri value(s) (Sections 5.1 and 3.3.6)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "allOf":
+ [
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" },
+ { "type": "object",
+ "required": [ "rights" ] }
+ ]
+ }
+ },
+ "required": [ "partOf" ]
+
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/3.3.6-pageRightsValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/3.3.6-pageRightsValidated.json
new file mode 100644
index 0000000000..99f0e7c7a7
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/3.3.6-pageRightsValidated.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "3.3.6-pageRightsValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation page page has one or more values for the rights key (i.e., in description of Collection included using partOf key) that are not strings of format uri.",
+ "title": "If present the Annotation page page-level **_rights_ key** (i.e., in description of Collection included using partOf key)has values that are all **strings of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)",
+ "description": "True when no Annotation page collection rights key present or when all values of rights key are strings of format uri (Section 3.3.6)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageContextValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageContextValidated.json
new file mode 100644
index 0000000000..66cbe0779f
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageContextValidated.json
@@ -0,0 +1,20 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageContextValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page/Collection is missing @context key or 'http://www.w3.org/ns/anno.jsonld' is not a value of @context.",
+ "title": "Implements **Annotation Page** (or Annotation Collection for embedded Page) **_@context_ key** and '**http://www.w3.org/ns/anno.jsonld**' is **a value of _@context_** - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "description": "True when the Annotation Page/Collection has @context key and 'http://www.w3.org/ns/anno.jsonld' is an @context value (Section 5.2)",
+ "type": "object",
+ "required": [ "@context" ],
+ "properties": {
+ "@context": {
+ "oneOf": [
+ { "$ref": "collections.json#/definitions/contextValueFound" },
+ { "$ref": "collections.json#/definitions/contextValueInArrayFound" }
+ ]
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageFirstImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageFirstImplemented.json
new file mode 100644
index 0000000000..5e0934e14f
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageFirstImplemented.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageFirstImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Page has no first key (i.e., in description of Collection included using partOf key).",
+ "title": "Implements **Annotation Page _first_ key** (i.e., in description of Collection included using partOf key) with valid value - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "collections.json#/definitions/firstFound" }
+ },
+ "required": [ "partOf" ]
+}
+
+
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageFirstValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageFirstValidated.json
new file mode 100644
index 0000000000..bffe4e889f
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageFirstValidated.json
@@ -0,0 +1,15 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageFirstValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page has invalid first key (i.e., in description of Collection included using partOf key).",
+ "title": "**Annotation Page _first_ key** (i.e., in description of Collection included using partOf key), if present, has value of string of format uri - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "collections.json#/definitions/firstValidIfPresent" }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageIdValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageIdValidated.json
new file mode 100644
index 0000000000..bafa019c46
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageIdValidated.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageIdValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page is missing id key or value of id key is not a single string of format uri.",
+ "title": "Implements **Annotation Page _id_ key** which has a **single value** that is a **string of format uri** - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "description": "True when the Annotation Page has a single id that is a string of format uri (Section 5.2)",
+ "oneOf": [
+ { "allOf": [
+ { "$ref": "id.json#/definitions/idValueFound" },
+ { "$ref": "collections.json#/definitions/annotationPageTypeValueFound" }
+ ]
+ },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "id.json#/definitions/idValueFound" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageItemsValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageItemsValidated.json
new file mode 100644
index 0000000000..57bedba850
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageItemsValidated.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageItemsValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page is missing items key or value of items key is not an array of strings of format uri and/or objects of type Annotation.",
+ "title": "Implements **Annotation Page _items_ key** such that value of items key is an array of strings of format uri and/or objects of type Annotation - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "oneOf": [
+ { "$ref": "collections.json#/definitions/itemsFound" },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "collections.json#/definitions/itemsFound" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLabelImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLabelImplemented.json
new file mode 100644
index 0000000000..19b82f3ba9
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLabelImplemented.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageLabelImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Page has no label key (i.e., in description of Collection included using partOf key).",
+ "title": "Implements **Annotation Page _label_ key** (i.e., in description of Collection included using partOf key) with valid value - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "collections.json#/definitions/labelFound" }
+ },
+ "required": [ "partOf" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLabelValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLabelValidated.json
new file mode 100644
index 0000000000..50749f4489
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLabelValidated.json
@@ -0,0 +1,15 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageLabelValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page has label key (i.e., in description of Collection included using partOf key) with non-string value or an array as value containing non-string value.",
+ "title": "**Annotation Page _label_ key**, if present (i.e., in description of Collection included using partOf key), is **a value of type string** - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "collections.json#/definitions/labelDefinition" }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLastImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLastImplemented.json
new file mode 100644
index 0000000000..4978fedf61
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLastImplemented.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageLastImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Page has no last key (i.e., in description of Collection included using partOf key).",
+ "title": "Implements **Annotation Page _last_ key** (i.e., in description of Collection included using partOf key) with valid value - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "collections.json#/definitions/lastFound" }
+ },
+ "required": [ "partOf" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLastValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLastValidated.json
new file mode 100644
index 0000000000..d80c37c4c6
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageLastValidated.json
@@ -0,0 +1,15 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageLastValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page has last key (i.e., in description of Collection included using partOf key) with non-uri value or array as value containing more than one item.",
+ "title": "**Annotation Page _last_ key** (i.e., in description of Collection included using partOf key), if present, is **a single value of format uri** - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "collections.json#/definitions/lastValidIfPresent" }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageNextImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageNextImplemented.json
new file mode 100644
index 0000000000..fb05711759
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageNextImplemented.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageNextImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Page has no next key.",
+ "title": "Implements **Annotation Page _next_ key** with valid value of string of format uri - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "oneOf": [
+ { "$ref": "collections.json#/definitions/nextFound" },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "collections.json#/definitions/nextFound" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageNextValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageNextValidated.json
new file mode 100644
index 0000000000..ab9198cc20
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageNextValidated.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageNextValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page has an invalid next value.",
+ "title": "True when **Annotation Page has no _next_ key** or has **_next_ key** with valid value of string of format uri - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "oneOf": [
+ { "allOf": [
+ { "$ref": "collections.json#/definitions/nextValidIfPresent" },
+ { "$ref": "collections.json#/definitions/annotationPageTypeValueFound" }
+ ]
+ },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "collections.json#/definitions/nextValidIfPresent" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePartOfImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePartOfImplemented.json
new file mode 100644
index 0000000000..a23e27ea68
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePartOfImplemented.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pagePartOfImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Page has no partOf key.",
+ "title": "Implements **Annotation Page _partOf_ key** with valid value of string of format uri - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "oneOf": [
+ { "$ref": "collections.json#/definitions/partOfFound" },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "collections.json#/definitions/partOfFound" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePartOfValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePartOfValidated.json
new file mode 100644
index 0000000000..d073c63050
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePartOfValidated.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pagePartOfValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page has an invalid partOf value.",
+ "title": "True when **Annotation Page has no _partOf_ key** or has **_partOf_ key** with valid value oof string of format uri - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "oneOf": [
+ { "allOf": [
+ { "$ref": "collections.json#/definitions/partOfValidIfPresent" },
+ { "$ref": "collections.json#/definitions/annotationPageTypeValueFound" }
+ ]
+ },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "collections.json#/definitions/partOfValidIfPresent" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePrevImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePrevImplemented.json
new file mode 100644
index 0000000000..0ba0e8792e
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePrevImplemented.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pagePrevImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Page has no prev key.",
+ "title": "Implements **Annotation Page _prev_ key** with valid value of string of format uri - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "oneOf": [
+ { "$ref": "collections.json#/definitions/prevFound" },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "collections.json#/definitions/prevFound" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePrevValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePrevValidated.json
new file mode 100644
index 0000000000..a9fbc71e6d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pagePrevValidated.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pagePrevValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page has an invalid prev value.",
+ "title": "True when **Annotation Page has no _prev_ key** or has **_prev_ key** with valid value of string of format uri - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "oneOf": [
+ { "allOf": [
+ { "$ref": "collections.json#/definitions/prevValidIfPresent" },
+ { "$ref": "collections.json#/definitions/annotationPageTypeValueFound" }
+ ]
+ },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "collections.json#/definitions/prevValidIfPresent" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageStartIndexImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageStartIndexImplemented.json
new file mode 100644
index 0000000000..00a1eddd28
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageStartIndexImplemented.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageStartIndexImplemented.json",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Page has has no valid startIndex value.",
+ "title": "Implements **Annotation Page _startIndex_ key** with valid value of _type_ integer >= 0 - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "oneOf": [
+ { "$ref": "collections.json#/definitions/startIndexFound" },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "collections.json#/definitions/startIndexFound" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageStartIndexValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageStartIndexValidated.json
new file mode 100644
index 0000000000..2177193770
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageStartIndexValidated.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageStartIndexValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page has an invalid startIndex value.",
+ "title": "True when **Annotation Page has no _startIndex_ key** or has **_startIndex_ key** with valid value of _type_ integer >= 0 - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "oneOf": [
+ { "allOf": [
+ { "$ref": "collections.json#/definitions/startIndexDefinition" },
+ { "$ref": "collections.json#/definitions/annotationPageTypeValueFound" }
+ ]
+ },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "collections.json#/definitions/startIndexDefinition" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageTotalImplemented.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageTotalImplemented.json
new file mode 100644
index 0000000000..fe1f21edae
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageTotalImplemented.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageTotalImplemented.json",
+ "assertionType": "may",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "passAndContinue",
+ "errorMessage": "Annotation Page has no total key (i.e., in description of Collection included using partOf key).",
+ "title": "Implements **Annotation Page _total_ key** (i.e., in description of Collection included using partOf key) with valid value - [model 5.1](https://www.w3.org/TR/annotation-model/#annotation-collection)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "collections.json#/definitions/totalFound" }
+ },
+ "required": [ "partOf" ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageTotalValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageTotalValidated.json
new file mode 100644
index 0000000000..ca57e286ed
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageTotalValidated.json
@@ -0,0 +1,15 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageTotalValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page has total key (i.e., in description of Collection included using partOf key) with non-numeric value, a negative numeric value, or more than one value.",
+ "title": "**Annotation Page _total_ key**, if present (i.e., in description of Collection included using partOf key), is **a non-negative integer value** - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "type": "object",
+ "properties":
+ {
+ "partOf":
+ { "$ref": "collections.json#/definitions/totalDefinition" }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageTypeValidated.json b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageTypeValidated.json
new file mode 100644
index 0000000000..cb0e2f362d
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/5.2-pageTypeValidated.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "5.2-pageTypeValidated.json",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "onUnexpectedResult" : "failAndContinue",
+ "errorMessage": "ERROR: Annotation Page is missing type key or 'AnnotationPage' is not a value of type.",
+ "title": "Implements **Annotation Page _type_ key** such that '**AnnotationPage**' is **a value of _type_** - [model 5.2](https://www.w3.org/TR/annotation-model/#annotation-page)",
+ "oneOf": [
+ { "$ref": "collections.json#/definitions/annotationPageTypeValueFound" },
+ { "type": "object",
+ "properties":
+ {"first":
+ { "$ref": "collections.json#/definitions/annotationPageTypeValueFound" }
+ },
+ "required": [ "first" ]
+ }
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/pageMusts-manual.html b/testing/web-platform/tests/annotation-model/collections/pages/pageMusts-manual.html
new file mode 100644
index 0000000000..4422bbae35
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/pageMusts-manual.html
@@ -0,0 +1,48 @@
+
+
+
+
Note: Implementation of optional Annotation Collection keys (features), optional constraints on key values, and optional keys and constraints on Agents involved in an Annotation Collection checked by other tests.
Please fill textarea with json-ld serialization of a single Annotation Page or an Annotation Collection with an embedded Page",
+ "testType": "manual",
+ "ref": "https://www.w3.org/TR/annotation-model/",
+ "assertions": [
+ "collections/pages/5.2-pageContextValidated.json",
+ "collections/pages/5.2-pageIdValidated.json",
+ "collections/pages/5.2-pageTypeValidated.json",
+ "collections/pages/5.2-pageItemsValidated.json",
+ "collections/pages/5.2-pageStartIndexValidated.json",
+ "collections/pages/5.2-pagePartOfValidated.json",
+ "collections/pages/5.2-pageNextValidated.json",
+ "collections/pages/5.2-pagePrevValidated.json",
+ "collections/pages/5.2-pageTotalValidated.json",
+ "collections/pages/5.2-pageLabelValidated.json",
+ "collections/pages/5.2-pageFirstValidated.json",
+ "collections/pages/5.2-pageLastValidated.json",
+ "collections/pages/3.3.1-pageCreatedValidated.json",
+ "collections/pages/3.3.1-pageModifiedValidated.json",
+ "collections/pages/3.3.6-pageRightsValidated.json"
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/collections/pages/pageOptionals-manual.html b/testing/web-platform/tests/annotation-model/collections/pages/pageOptionals-manual.html
new file mode 100644
index 0000000000..95f66bb7f7
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/collections/pages/pageOptionals-manual.html
@@ -0,0 +1,48 @@
+
+
+
+
Note: Implementation of optional Annotation Collection keys (features), optional constraints on key values, and optional keys and constraints on Agents involved in an Annotation Collection checked by other tests.
Please fill textarea with json-ld serialization of a single Annotation Page or an Annotation Collection with an embedded Page",
+ "testType": "manual",
+ "skipFailures": [ "should", "may" ],
+ "ref": "https://www.w3.org/TR/annotation-model/",
+ "assertions": [
+ "collections/pages/5.2-pagePartOfImplemented.json",
+ "collections/pages/5.2-pageStartIndexImplemented.json",
+ "collections/pages/5.2-pageNextImplemented.json",
+ "collections/pages/5.2-pagePrevImplemented.json",
+ "collections/pages/5.2-pageLabelImplemented.json",
+ "collections/pages/5.2-pageLastImplemented.json",
+ "collections/pages/5.2-pageTotalImplemented.json",
+ "collections/pages/5.2-pageFirstImplemented.json",
+ "collections/pages/3.3.1-pageModifiedImplemented.json",
+ "collections/pages/3.3.1-pageCreatorImplemented.json",
+ "collections/pages/3.3.1-pageCreatedImplemented.json",
+ "collections/pages/3.3.6-pageRightsImplemented.json",
+ "collections/pages/3.3.2-pageCreatorAgentEmail_sha1Implemented.json",
+ "collections/pages/3.3.2-pageCreatorAgentEmailImplemented.json",
+ "collections/pages/3.3.2-pageCreatorAgentHomepageImplemented.json",
+ "collections/pages/3.3.2-pageCreatorAgentIdImplemented.json",
+ "collections/pages/3.3.2-pageCreatorAgentNameImplemented.json",
+ "collections/pages/3.3.2-pageCreatorAgentNicknameImplemented.json",
+ "collections/pages/3.3.2-pageCreatorAgentTypeImplemented.json"
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/definitions/annotations.json b/testing/web-platform/tests/annotation-model/definitions/annotations.json
new file mode 100644
index 0000000000..df1f73613a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/definitions/annotations.json
@@ -0,0 +1,212 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "annotations.json",
+ "title": "Definitions: Annotations.",
+ "description": "Schemas in #/definitions detect or validate keys/objects (direct children) uniquely used to describe Annotations (Section 3.1 and 3.3.5).",
+ "definitions": {
+
+ "contextValueFound": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Valid @context string",
+ "description": "True when the string has value http://www.w3.org/ns/anno.jsonld (Section 3.1)",
+ "type": "string",
+ "enum": [ "http://www.w3.org/ns/anno.jsonld" ]
+ },
+
+ "contextValueInArrayFound": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Valid @context string found in array",
+ "description": "True when the array contains a string item having value http://www.w3.org/ns/anno.jsonld (Section 3.1)",
+ "type": "array",
+ "not":
+ { "items":
+ { "not":
+ { "$ref": "#/definitions/contextValueFound" }
+ }
+ }
+ },
+
+ "annotationTypeValueRecognized": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Valid annotation type value string",
+ "description": "True when the string has value 'Annotation' (Section 3.1)",
+ "type": "string",
+ "enum": [ "Annotation" ]
+ },
+
+ "annotationTypeValueInArrayRecognized": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Valid annotation type array",
+ "description": "True when the array contains a string item having value 'Annotation' (Section 3.1)",
+ "type": "array",
+ "not":
+ { "items":
+ { "not":
+ { "$ref": "#/definitions/annotationTypeValueRecognized" }
+ }
+ }
+ },
+
+ "annotationTypeValueFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Implementation: Annotation type",
+ "description": "True when the Annotation has type key and 'Annotation' is a value of type (Section 3.1)",
+ "type": "object",
+ "required": [ "type" ],
+ "properties": {
+ "type": {
+ "oneOf": [
+ { "$ref": "annotations.json#/definitions/annotationTypeValueRecognized" },
+ { "$ref": "annotations.json#/definitions/annotationTypeValueInArrayRecognized" }
+ ]
+ }
+ }
+ },
+
+ "motivationList":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definitions: list of motivation and purposes",
+ "description": "List of motivations and purposes as defined in the model (Section 3.3.5).",
+ "type": "string",
+ "enum": ["assessing", "bookmarking", "classifying", "commenting", "describing", "editing", "highlighting", "identifying", "linking", "moderating", "questioning", "replying", "tagging" ]
+ },
+
+ "motivationRecognizedIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: motivation value",
+ "description": "True when the annotation has 0 or more motivation property values (Section 3.3.5)",
+ "type": "object",
+ "properties": {"motivation":
+ { "oneOf": [
+ { "$ref": "#/definitions/motivationList" },
+ { "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#/definitions/motivationList" } }
+ ]
+ }
+ }
+ },
+
+ "motivationSingularIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: singular motivation value",
+ "description": "True when the annotation has 0 or exactly one motivation property value (Section 3.3.5)",
+ "type": "object",
+ "properties": {"motivation":
+ { "oneOf": [
+ { "$ref": "#/definitions/motivationList" },
+ { "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": { "$ref": "#/definitions/motivationList" } }
+ ]
+ }
+ }
+ },
+
+ "motivationPropertyFound":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: via motivation with qualifying annotation class",
+ "description": "Supports implementation check of via (if/when) used on Annotation (Sections 3.3.5)",
+ "oneOf": [
+ {"$ref": "#/definitions/annotationTypeValueFound"}
+ ],
+ "allOf": [
+ {"required": ["motivation"]},
+ {"$ref": "#/definitions/motivationRecognizedIfPresent"}
+ ]
+ },
+
+ "singleMotivationPropertyFound":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: via motivation with qualifying annotation class",
+ "description": "Supports implementation check of via (if/when) used on Annotation (Sections 3.3.5)",
+ "oneOf": [
+ {"$ref": "#/definitions/annotationTypeValueFound"}
+ ],
+ "allOf": [
+ {"required": ["motivation"]},
+ {"$ref": "#/definitions/motivationSingularIfPresent"}
+ ]
+ },
+
+ "stylesheetValueDefinition":
+ {
+ "title": "Definition: stylesheet value",
+ "description": "True when Annotation has no stylesheet, references an external stylesheet, or has embedded stylesheet of type CssStylesheet (Section 4.4)",
+ "type": "object",
+ "properties":
+ {
+ "stylesheet":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri"},
+ { "type": "object",
+ "properties":
+ {
+ "type": { "type": "string",
+ "enum": [ "CssStylesheet" ]},
+ "id": { "$ref": "id.json#/definitions/stringUri" },
+ "value": { "type": "string" }
+ },
+ "not": { "required": [ "id", "value"] },
+ "oneOf": [
+ { "required": [ "id"] },
+ { "required": [ "value"] }
+ ]
+ }
+ ]
+ }
+ }
+ },
+
+ "stylesheetDetected":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Annotation stylesheet",
+ "description": "True when the Annotation has a valid stylesheet property (Section 4.4)",
+ "allOf": [
+ {"required": ["stylesheet"]},
+ {"$ref": "#/definitions/stylesheetValueDefinition"}
+ ]
+ },
+
+ "bodyValueValidIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: bodyValue",
+ "description": "True when the Annotation has no bodyValue key or has a bodyValue key with valid value (Section 3.2.5)",
+ "type": "object",
+ "properties":
+ {
+ "bodyValue":
+ {
+ "oneOf":
+ [
+ { "type": "string" },
+ { "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": { "type": "string" }
+ }
+ ]
+ }
+ }
+ },
+
+ "bodyValueFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": " Implementation: bodyValue",
+ "description": "True when the Annotation has a valid bodyValue (Section 3.2.5)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/bodyValueValidIfPresent" },
+ { "required": [ "bodyValue" ] }
+ ]
+ }
+
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/definitions/bodyTarget.json b/testing/web-platform/tests/annotation-model/definitions/bodyTarget.json
new file mode 100644
index 0000000000..8c09b14aa4
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/definitions/bodyTarget.json
@@ -0,0 +1,1091 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "bodyTarget.json",
+ "title": "Definitions: Bodies and Targets.",
+ "description": "Schemas in #/definitions detect or validate keys, objects or constraints variously applicable to Bodies and/or Targets (Section 3.2.1 - 3.2.6). Excludes Choice, Set and Specific Resources.",
+ "definitions":
+ {
+ "externalWebResourceDetected":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: External Web Resource",
+ "description": "True when the object is an External Web Resource, i.e., includes an id that is of format uri but does not contain source (Specific Resource) keys (Sections 3.2.1, 3.2.4, 4).",
+ "type": "object",
+ "allOf": [ {"$ref": "id.json#/definitions/idValueFound"} ],
+ "not":
+ { "anyOf":
+ [
+ { "required": ["source"] },
+ { "required": ["target"] }
+ ]
+ }
+ },
+
+ "sourceEwrDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "source": {"$ref": "#/definitions/externalWebResourceDetected"}
+ }
+ },
+
+ "itemEwrDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items": {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": {"not": { "$ref": "#/definitions/externalWebResourceDetected" } } }
+ }
+ }
+ },
+
+ "textualBodyFound" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Embedded Textual Body",
+ "description": "True when the object is an Embedded Textual Body, i.e., includes the value key (Section 3.2.4).",
+ "type" : "object",
+ "properties" :
+ {
+ "value":
+ {
+ "type": "string"
+ }
+ },
+ "required": [ "value" ]
+ } ,
+
+ "itemETBDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items": {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": {"not": { "$ref": "#/definitions/textualBodyFound" } } }
+ }
+ }
+ },
+
+ "targetResourcesFound" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Resources that can be used as Target",
+ "description": "True when the string is format uri or the object is recognized as a valid target resource (Sections 3.2 and 4).",
+ "type" : ["string", "object"],
+ "oneOf": [
+ {"$ref": "id.json#/definitions/stringUri"},
+ {"$ref": "choiceSet.json#/definitions/choiceDetected" },
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" }
+ ]
+ },
+
+ "bodyResourcesFound" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Resources that can be used as Body",
+ "description": "True when the string is format uri or the object is recognized as a valid body resource (Sections 3.2 and 4).",
+ "type" : ["string", "object"],
+ "anyOf": [
+ {"$ref": "id.json#/definitions/stringUri"},
+ {"$ref": "choiceSet.json#/definitions/choiceDetected" },
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ]
+ },
+
+ "optionalBodyPropertiesShould" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Optional Body Keys Should Validations",
+ "description": "Supports validity checks of optional keys (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ],
+ "allOf" :
+ [
+ { "$ref": "#/definitions/resourceTypeShouldIfPresent" },
+ { "$ref": "#/definitions/formatValidIfPresent" },
+ { "$ref": "#/definitions/languageValidIfPresent" },
+ { "$ref": "#/definitions/processingLanguageValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/creatorValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/generatorValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/audienceValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/accessibilityValidIfPresent" }
+ ]
+ },
+
+ "optionalBodyPropertiesMust" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Optional Body Keys Must Validations",
+ "description": "Supports validity checks of optional keys (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ],
+ "allOf" :
+ [
+ { "$ref": "#/definitions/textDirectionValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/generatedValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" }
+ ]
+ },
+
+ "optionalBodyPurposePropertyShould" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Optional Purpose Key",
+ "description": "Supports validity checks of optional purpose key (if/when) used on Specific Resources or Textual Body Resources (Sections 3.3.5)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ],
+ "allOf" :
+ [
+ { "$ref": "otherProperties.json#/definitions/purposeRecognizedIfPresent" }
+ ]
+ },
+
+ "optionalTargetPropertiesShould" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Optional Target Keys Should validation",
+ "description": "Supports validity check of optional keys (if/when) used on External Web Resources, Specific Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" }
+ ],
+ "allOf" :
+ [
+ { "$ref": "#/definitions/resourceTypeShouldIfPresent" },
+ { "$ref": "#/definitions/formatValidIfPresent" },
+ { "$ref": "#/definitions/languageValidIfPresent" },
+ { "$ref": "#/definitions/processingLanguageValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/creatorValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/generatorValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/audienceValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/accessibilityValidIfPresent" }
+ ]
+ },
+
+ "optionalTargetPropertiesMust" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Optional Target Keys Must validation",
+ "description": "Supports validity check of optional keys (if/when) used on External Web Resources, Specific Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" }
+ ],
+ "allOf" :
+ [
+ { "$ref": "#/definitions/textDirectionValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/generatedValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" },
+ { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" }
+ ]
+ },
+
+ "resourceTypeRecognizedIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definitions: body / target classes",
+ "description": "True when type value for body / target is or includes item from recommended list of classes (Section 3.2.2)",
+ "type": "object",
+ "properties":
+ {
+ "type":
+ { "oneOf":
+ [
+ { "type": "string",
+ "enum": [ "Dataset", "Image", "Video", "Sound", "Text" ] },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not":
+ { "type": "string",
+ "enum": [ "Dataset", "Image", "Video", "Sound", "Text" ] }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "resourceTypeShouldIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: body / target classes all from 3.2.2",
+ "description": "Adds TextualBody to list from 3.2.2. True when type absent or all type value(s) for body / target are from recommended list of classes (Section 3.2.2), or TextualBody",
+ "type": "object",
+ "properties":
+ {
+ "type":
+ { "oneOf":
+ [
+ { "type": "string",
+ "enum": [ "Dataset", "Image", "Video", "Sound", "Text", "TextualBody" ] },
+ { "type": "array",
+ "minItems": 1,
+ "items":
+ { "type": "string",
+ "enum": [ "Dataset", "Image", "Video", "Sound", "Text", "TextualBody" ] }
+ }
+ ]
+ }
+ }
+ },
+
+ "recognizedTypeFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: type key with recognized classes",
+ "description": "Supports implementation check of type (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.2)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ],
+ "allOf" :
+ [
+ { "required": ["type" ] },
+ { "$ref": "#/definitions/resourceTypeRecognizedIfPresent" }
+ ]
+
+ },
+
+ "itemRecognizedTypeFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having type key with qualifying body/target classes",
+ "description": "Supports implementation check of items having type (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/recognizedTypeFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceRecognizedTypeFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having type key",
+ "description": "Supports implementation check of type (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["type"] ,
+ "$ref": "#/definitions/resourceTypeRecognizedIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "formatValueCheck":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definitions: format value regex",
+ "description": "True when string value starts with a registered top-level Media type, including trailing slash (Section 3.2.1)",
+ "type": "string",
+ "pattern": "^(application/|audio/|example/|image/|multipart/|text/|video/)"
+ },
+
+ "formatValidIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: format validity",
+ "description": "True when the body or target has no format or has a valid format value - single string or array of strings (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "format":
+ {
+ "oneOf":
+ [
+ {"$ref": "#/definitions/formatValueCheck"},
+ {"type": "array",
+ "minItems": 1,
+ "items" : {"$ref": "#/definitions/formatValueCheck"}
+ }
+ ]
+ }
+ }
+ },
+
+ "formatSingularIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definitions: format",
+ "description": "True when the body or target format value, if present, is singular and valid (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "format":
+ {
+ "oneOf":
+ [
+ {"$ref": "#/definitions/formatValueCheck"},
+ {"type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items" : {"$ref": "#/definitions/formatValueCheck"} }
+ ]
+ }
+ }
+ },
+
+ "formatPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: format key with qualifying body/target classes",
+ "description": "Supports implementation check of format (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ],
+ "allOf" :
+ [
+ { "required": ["format" ] },
+ { "$ref": "#/definitions/formatValidIfPresent" }
+ ]
+ },
+
+ "itemFormatPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having format key with qualifying body/target classes",
+ "description": "Supports implementation check of items having format (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/formatPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceFormatPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having format key",
+ "description": "Supports implementation check of format (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["format"] ,
+ "$ref": "#/definitions/formatValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "singleFormatPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: format key with qualifying body/target classes",
+ "description": "Supports implementation check of format being singular (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ],
+ "allOf" :
+ [
+ { "required": ["format"] },
+ { "$ref": "#/definitions/formatSingularIfPresent" }
+ ]
+ },
+
+ "itemSingleFormatPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having singular format key with qualifying body/target classes",
+ "description": "Supports implementation check of items having singular format (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/singleFormatPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceSingleFormatPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having single format key value",
+ "description": "Supports implementation check of singular format (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["format"] ,
+ "$ref": "#/definitions/formatSingularIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "languageValueCheck" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definitions: language value regex",
+ "description": "True when string value starts with a two or three lc characters and a hyphen or end of string (Section 3.2.1)",
+ "type": "string",
+ "oneOf" :
+ [
+ {"pattern": "^([a-z]){2,3}$"},
+ {"pattern": "^([a-z]){2,3}-"}
+ ]
+
+ },
+
+ "languageValidIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: language value",
+ "description": "True when the body or target has no language or has a valid language value - single string or array of strings (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "language":
+ {
+ "oneOf":
+ [
+ {"$ref": "#/definitions/languageValueCheck"},
+ {"type": "array",
+ "minItems": 1,
+ "items" : {"$ref": "#/definitions/languageValueCheck"}
+ }
+ ]
+ }
+ }
+ },
+
+ "languageSingularIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definitions: single language valid",
+ "description": "True when the body or target has no language or has exactly one language property - single string (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "language":
+ {
+ "oneOf":
+ [
+ {"$ref": "#/definitions/languageValueCheck"},
+ {"type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items" : {"$ref": "#/definitions/languageValueCheck"} }
+ ]
+ }
+ }
+ },
+
+ "languagePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: language key with qualifying body/target classes",
+ "description": "Supports implementation check of language (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ],
+ "allOf" :
+ [
+ { "required": ["language" ] },
+ { "$ref": "#/definitions/languageValidIfPresent" }
+ ]
+ },
+
+ "itemLanguagePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having language key with qualifying body/target classes",
+ "description": "Supports implementation check of items having language (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/languagePropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceLanguagePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having language key",
+ "description": "Supports implementation check of language (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["language"] ,
+ "$ref": "#/definitions/languageValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "singleLanguagePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: language key with qualifying body/target classes",
+ "description": "Supports implementation check of language being singular (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ],
+ "allOf" :
+ [
+ { "required": ["language"] },
+ { "$ref": "#/definitions/languageSingularIfPresent" }
+ ]
+ },
+
+ "itemSingleLanguagePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having singular language key with qualifying body/target classes",
+ "description": "Supports implementation check of items having singular language (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/singleLanguagePropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceSingleLanguagePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having single language key value",
+ "description": "Supports implementation check of singular language (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["language"] ,
+ "$ref": "#/definitions/languageSingularIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "processingLanguageValidIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: processingLanguage",
+ "description": "True when the Body or Target has no processingLanguage or exactly one processingLanguage property (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "processingLanguage":
+ {
+ "oneOf":
+ [
+ {"$ref": "#/definitions/languageValueCheck"},
+ {"type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items" : {"$ref": "#/definitions/languageValueCheck"} }
+ ]
+ }
+ }
+ },
+
+ "processingLanguagePropertyFound" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: processingLanguage Key with qualifying body/target classes",
+ "description": "Supports implementation check of processingLanguage (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ],
+ "allOf" :
+ [
+ { "required": ["processingLanguage" ] },
+ { "$ref": "#/definitions/processingLanguageValidIfPresent" }
+ ]
+ },
+
+ "itemProcessingLanguagePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having processingLanguage key with qualifying body/target classes",
+ "description": "Supports implementation check of items having processingLanguage (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/processingLanguagePropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceProcessingLanguagePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having processingLanguage key",
+ "description": "Supports implementation check of processingLanguage (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["processingLanguage"] ,
+ "$ref": "#/definitions/processingLanguageValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "textDirectionValidIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: textDirection",
+ "description": "True when the body or target has no textDirection or exactly one valid textDirection (Section 3.2.1)",
+ "type": "object",
+ "properties":
+ {
+ "textDirection":
+ {
+ "oneOf":
+ [
+ {"type": "string",
+ "enum": ["ltr", "rtl", "auto"] },
+ {"type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items" : {"type": "string",
+ "enum": ["ltr", "rtl", "auto"] } }
+ ]
+ }
+ }
+ },
+
+ "textDirectionPropertyFound" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: textDirection Key with qualifying body/target classes",
+ "description": "Supports implementation check of textDirection (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf":
+ [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ {"$ref": "#/definitions/externalWebResourceDetected" },
+ {"$ref": "#/definitions/textualBodyFound" }
+ ],
+ "allOf" :
+ [
+ { "required": ["textDirection" ] },
+ { "$ref": "#/definitions/textDirectionValidIfPresent" }
+ ]
+ },
+
+ "itemTextDirectionPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having textDirection key with qualifying body/target classes",
+ "description": "Supports implementation check of items having textDirection (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/textDirectionPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceTextDirectionPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having textDirection key",
+ "description": "Supports implementation check of textDirection (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["textDirection"] ,
+ "$ref": "#/definitions/textDirectionValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "ewrWithItems" :
+ {
+ "type": "object",
+ "allOf":
+ [
+ { "$ref": "#/definitions/externalWebResourceDetected"},
+ { "required": [ "items" ] }
+ ]
+ },
+
+ "sourceEwrWithItems":
+ {
+ "type": "object",
+ "properties":
+ {
+ "source": {"$ref": "#/definitions/ewrWithItems"}
+ },
+ "required": ["source"]
+ },
+
+ "itemEwrWithItems":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items": {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": {"not": { "$ref": "#/definitions/ewrWithItems" } } }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "ewrWithPurpose" :
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/externalWebResourceDetected"},
+ { "required": [ "purpose" ] }
+ ]
+ },
+
+ "sourceEwrWithPurpose":
+ {
+ "type": "object",
+ "properties":
+ {
+ "source": {"$ref": "#/definitions/ewrWithPurpose"}
+ },
+ "required": ["source"]
+ },
+
+ "itemEwrWithPurpose":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items": {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": {"not": { "$ref": "#/definitions/ewrWithPurpose" } } }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "embeddedTextualBodyWithItems" :
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/textualBodyFound"},
+ { "required": [ "items" ] }
+ ]
+ },
+
+ "itemETBWithItems":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items": {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": {"not": { "$ref": "#/definitions/embeddedTextualBodyWithItems" } } }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "embeddedTextualBodyWithSource" :
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/textualBodyFound"},
+ { "required": [ "source" ] }
+ ]
+ },
+
+ "itemETBWithSource":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items": {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": {"not": { "$ref": "#/definitions/embeddedTextualBodyWithSource" } } }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "embeddedTextTypeIncludesTextualBody":
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/textualBodyFound" },
+ { "required": ["type"] },
+ { "properties":
+ {
+ "type":
+ {
+ "oneOf":
+ [
+ { "type": "string",
+ "enum": ["TextualBody"] },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "enum": [ "TextualBody"] } }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+
+ "embeddedTextTypeInclTextualBodyWithoutId":
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/textualBodyFound" },
+ { "required": ["type"] },
+ { "properties":
+ {
+ "type":
+ {
+ "oneOf":
+ [
+ { "type": "string",
+ "enum": ["TextualBody"] },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "enum": [ "TextualBody"] } }
+ }
+ }
+ ]
+ }
+ }
+ },
+ { "not": { "$ref": "id.json#/definitions/idValueFound" } }
+ ]
+ },
+
+ "itemEmbeddedTextTypeIncludesTextualBody":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/embeddedTextTypeIncludesTextualBody" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "itemEmbeddedTextTypeInclTextualBodyWithoutId":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/embeddedTextTypeIncludesTextualBody" } }
+ }
+ }
+ },
+ "required": ["items"],
+ "not": { "$ref": "id.json#/definitions/idValueFound" }
+ },
+
+"embeddedTextTypeIncludesText":
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/textualBodyFound" },
+ { "required": ["type"] },
+ { "properties":
+ {
+ "type":
+ {
+ "oneOf":
+ [
+ { "type": "string",
+ "enum": ["Text"] },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items":
+ { "not": { "enum": [ "Text"] } }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+
+ "itemEmbeddedTextTypeIncludesText":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/embeddedTextTypeIncludesText" } }
+ }
+ }
+ },
+ "required": ["items"]
+ }
+
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/definitions/choiceSet.json b/testing/web-platform/tests/annotation-model/definitions/choiceSet.json
new file mode 100644
index 0000000000..aafb27bb26
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/definitions/choiceSet.json
@@ -0,0 +1,127 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "choiceSet.json",
+ "title": "Definitions: Choice.",
+ "description": "Schemas in #/definitions detect or validate keys/objects used in describing Choice (Sections 3.2.7 and 3.2.8).",
+ "definitions":
+ {
+
+ "itemsDetected" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: items",
+ "description": "True when the object includes items key and value of items is an array containing at least 1 item, which can be a specificResource, an externalWebResource, a uri, a textualBody or another choice/set (Sections 3.2.7 and 3.2.8).",
+ "type": "object",
+ "properties" :
+ {
+ "items" :
+ {
+ "type" : "array",
+ "minItems": 1,
+ "items": {
+ "oneOf":
+ [
+ { "$ref": "specificResource.json#/definitions/specificeResourceDetected" },
+ { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" },
+ { "$ref": "bodyTarget.json#/definitions/textualBodyFound" },
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "allOf":
+ [
+ { "$ref" : "#/definitions/choiceOrSetTypeDefinition" },
+ { "$ref": "#/definitions/itemsDetected" }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ "required": [ "items" ]
+ },
+
+ "choiceTypeDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Choice type",
+ "description": "True when object has type key and object's type is 'Choice' (Section 3.2.7)",
+ "type": "object",
+ "properties":
+ {
+ "type":
+ {
+ "type": "string",
+ "enum": ["Choice"]
+ }
+ },
+ "required": [ "type" ]
+ },
+
+ "choiceOrSetTypeDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Choice or Set type",
+ "description": "True when object has type key and object's type is any of 'Choice' (Section 3.2.7)",
+ "type": "object",
+ "properties":
+ {
+ "type":
+ {
+ "type": "string",
+ "enum": ["Choice"]
+ }
+ },
+ "required": [ "type" ]
+ },
+
+ "choiceDetected": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Detection: Choice",
+ "description": "True when object's type is 'Choice' and the object has an items array (Section 3.2.7)",
+ "type": "object",
+ "allOf":
+ [
+ { "$ref": "#/definitions/choiceTypeDefinition" },
+ { "$ref": "#/definitions/itemsDetected" }
+ ]
+ },
+
+ "choiceOrSetDetected": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Detection: Choice or Set",
+ "description": "True when object's type is one of Choice and the object has an items array (Section 3.2.7)",
+ "type": "object",
+ "allOf":
+ [
+ { "$ref": "#/definitions/choiceOrSetTypeDefinition" },
+ { "$ref": "#/definitions/itemsDetected" }
+ ]
+ },
+
+ "choiceSetWithValue" :
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/choiceOrSetDetected" },
+ { "required": [ "value" ] }
+ ]
+ },
+
+ "choiceSetWithSource" :
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/choiceOrSetDetected" },
+ { "required": [ "source" ] }
+ ]
+ },
+
+ "choiceSetWithPurpose" :
+ {
+ "allOf":
+ [
+ { "$ref": "#/definitions/choiceOrSetDetected" },
+ { "required": [ "purpose" ] }
+ ]
+ }
+
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/definitions/collections.json b/testing/web-platform/tests/annotation-model/definitions/collections.json
new file mode 100644
index 0000000000..9f5b13a9f8
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/definitions/collections.json
@@ -0,0 +1,428 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "collections.json",
+ "title": "Definitions: Annotation Collections.",
+ "description": "Schemas in #/definitions detect or validate keys/objects (direct children) uniquely used to describe Annotation Collections (Section 5.1 and 5.2).",
+ "definitions": {
+
+ "contextValueFound": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Valid @context string included in Collection / Page description",
+ "description": "True when the string has value http://www.w3.org/ns/anno.jsonld (Section 5)",
+ "type": "string",
+ "enum": [ "http://www.w3.org/ns/anno.jsonld" ]
+ },
+
+ "contextValueInArrayFound": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Valid @context string found in array included in Collection / Page description",
+ "description": "True when the array contains a string item having value http://www.w3.org/ns/anno.jsonld (Section 5)",
+ "type": "array",
+ "not":
+ { "items":
+ { "not":
+ { "$ref": "#/definitions/contextValueFound" }
+ }
+ }
+ },
+
+ "annotationCollectionTypeValueRecognized": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Valid AnnotationCollection type value string included in Collection description",
+ "description": "True when the string has value 'AnnotationCollection' (Section 5.1)",
+ "type": "string",
+ "enum": [ "AnnotationCollection" ]
+ },
+
+ "annotationCollectionTypeValueInArrayRecognized": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Valid AnnotationCollection type in array included in Collection description",
+ "description": "True when the array contains a string item having value 'AnnotationCollection' (Section 5.1)",
+ "type": "array",
+ "not":
+ { "items":
+ { "not":
+ { "$ref": "#/definitions/annotationCollectionTypeValueRecognized" }
+ }
+ }
+ },
+
+ "annotationCollectionTypeValueFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Implementation: AnnotationCollection type",
+ "description": "True when the Annotation Collection has type key and 'AnnotationCollection' is a value of type (Section 5.1)",
+ "type": "object",
+ "required": [ "type" ],
+ "properties": {
+ "type": {
+ "oneOf": [
+ { "$ref": "#/definitions/annotationCollectionTypeValueRecognized" },
+ { "$ref": "#/definitions/annotationCollectionTypeValueInArrayRecognized" }
+ ]
+ }
+ }
+ },
+
+ "annotationPageTypeValueRecognized": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Valid AnnotationPage type value string included in Page description",
+ "description": "True when the string has value 'AnnotationPage' (Section 5.2)",
+ "type": "string",
+ "enum": [ "AnnotationPage" ]
+ },
+
+ "annotationPageTypeValueInArrayRecognized": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Valid AnnotationPage type in array included in Page description",
+ "description": "True when the array contains a string item having value 'AnnotationPage' (Section 5.2)",
+ "type": "array",
+ "not":
+ { "items":
+ { "not":
+ { "$ref": "#/definitions/annotationPageTypeValueRecognized" }
+ }
+ }
+ },
+
+ "annotationPageTypeValueFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Implementation: AnnotationPage type",
+ "description": "True when the Annotation Page has type key and 'AnnotationPage' is a value of type (Section 5.2)",
+ "type": "object",
+ "required": [ "type" ],
+ "properties": {
+ "type": {
+ "oneOf": [
+ { "$ref": "#/definitions/annotationPageTypeValueRecognized" },
+ { "$ref": "#/definitions/annotationPageTypeValueInArrayRecognized" }
+ ]
+ }
+ }
+ },
+
+ "labelDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: label (Annotation Collections)",
+ "description": "True when the object has no label or has one or more label values of type string (Section 5.1)",
+ "type": "object",
+ "properties":
+ {
+ "label":
+ {
+ "oneOf":
+ [
+ {"type": "string" },
+ {"type": "array",
+ "minItems": 1,
+ "items": {"type": "string"}
+ }
+ ]
+ }
+ }
+ },
+
+ "labelFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Annotation Collection label",
+ "description": "True when the object has one or more label value(s) (Section 5.1)",
+ "allOf": [
+ {"required": ["label"]},
+ {"$ref": "#/definitions/labelDefinition"}
+ ]
+ },
+
+ "totalDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: total (Annotation Collections)",
+ "description": "True when the object has no total key or has exactly one total value of type integer greater or equal to zero (Section 5.1)",
+ "type": "object",
+ "properties":
+ {
+ "total":
+ {
+ "oneOf":
+ [
+ {"type": "integer",
+ "minimum": 0 },
+ {"type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": {"type": "integer",
+ "minimum": 0 }
+ }
+ ]
+ }
+ }
+ },
+
+ "totalFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Annotation Collection total key",
+ "description": "True when the object has exactly one total value (Section 5.1)",
+ "allOf": [
+ {"required": ["total"]},
+ {"$ref": "#/definitions/totalDefinition"}
+ ]
+ },
+
+ "totalMoreThanZero":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: total more than zero (Annotation Collections)",
+ "description": "True when the object has exactly one total value of type integer and greater than zero (Section 5.1)",
+ "type": "object",
+ "properties":
+ {
+ "total":
+ {
+ "oneOf":
+ [
+ {"type": "integer",
+ "minimum": 0,
+ "exclusiveMinimum": true},
+ {"type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": {"type": "integer",
+ "minimum": 0,
+ "exclusiveMinimum": true}
+ }
+ ]
+ }
+ },
+ "required": [ "total" ]
+ },
+
+ "firstValidIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: first value (Annotation Collection)",
+ "description": "True when the Annotation Collection has no first key or has 1 first key value that is string of format uri or has first key value that is an object of type AnnotationPage (Section 5.1)",
+ "type": "object",
+ "properties": {"first":
+ { "oneOf": [
+ {
+ "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "$ref": "#/definitions/annotationPageTypeValueFound" }
+ ]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": {
+ "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "$ref": "#/definitions/annotationPageTypeValueFound" }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "firstFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Annotation Collection first key",
+ "description": "True when the object has exactly one first value (Section 5.1)",
+ "allOf": [
+ {"required": ["first"]},
+ {"$ref": "#/definitions/firstValidIfPresent"}
+ ]
+ },
+
+ "firstRequiredIfTotalMoreThanZero":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "If total greater than zero, check for implementation of Annotation Collection first key",
+ "description": "True when the object has no total or has total = zero or has exactly one first value (Section 5.1)",
+ "type": "object",
+ "oneOf": [
+ {
+ "allOf": [
+ { "$ref": "#/definitions/totalMoreThanZero" },
+ { "$ref": "#/definitions/firstFound" }
+ ]
+ },
+ { "not": { "$ref": "#/definitions/totalMoreThanZero" } }
+ ]
+ },
+
+ "lastValidIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: last value (Annotation Collection)",
+ "description": "True when the Annotation Collection has no last key or has 1 last key value that is string of format uri (Section 5.1)",
+ "type": "object",
+ "properties": {"last":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": { "$ref": "id.json#/definitions/stringUri" }
+ }
+ ]
+ }
+ }
+ },
+
+ "lastFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Annotation Collection last key",
+ "description": "True when the object has exactly one last value that is string of format uri (Section 5.1)",
+ "allOf": [
+ {"required": ["last"]},
+ {"$ref": "#/definitions/lastValidIfPresent"}
+ ]
+ },
+
+ "partOfValidIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: partOf value (Annotation Page)",
+ "description": "True when the Annotation Page has no partOf key or has 1 partOf key value that is string of format uri (Section 5.2)",
+ "type": "object",
+ "properties": {"partOf":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "$ref": "id.json#/definitions/idValueFound" }
+ ]
+ }
+ }
+ },
+
+ "partOfFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Annotation Page partOf key",
+ "description": "True when the object has exactly one partOf value that is string of format uri (Section 5.2)",
+ "allOf": [
+ {"required": ["partOf"]},
+ {"$ref": "#/definitions/partOfValidIfPresent"}
+ ]
+ },
+
+ "nextValidIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: next value (Annotation Page)",
+ "description": "True when the Annotation Page has no next key or has 1 next key value that is string of format uri (Section 5.2)",
+ "type": "object",
+ "properties": {"next":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": { "$ref": "id.json#/definitions/stringUri" }
+ }
+ ]
+ }
+ }
+ },
+
+ "nextFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Annotation Page next key",
+ "description": "True when the object has exactly one next value that is string of format uri (Section 5.2)",
+ "allOf": [
+ {"required": ["next"]},
+ {"$ref": "#/definitions/nextValidIfPresent"}
+ ]
+ },
+
+ "prevValidIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: prev value (Annotation Page)",
+ "description": "True when the Annotation Page has no prev key or has 1 prev key value that is string of format uri (Section 5.2)",
+ "type": "object",
+ "properties": {"prev":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": { "$ref": "id.json#/definitions/stringUri" }
+ }
+ ]
+ }
+ }
+ },
+
+ "prevFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Annotation Page prev key",
+ "description": "True when the object has exactly one prev value that is string of format uri (Section 5.2)",
+ "allOf": [
+ {"required": ["prev"]},
+ {"$ref": "#/definitions/prevValidIfPresent"}
+ ]
+ },
+
+ "startIndexDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: startIndex (Annotation Pages)",
+ "description": "True when the object has no startIndex key or has exactly one startIndex value of type integer greater or equal to zero (Section 5.2)",
+ "type": "object",
+ "properties":
+ {
+ "startIndex":
+ {
+ "oneOf":
+ [
+ {"type": "integer",
+ "minimum": 0 },
+ {"type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": {"type": "integer",
+ "minimum": 0 }
+ }
+ ]
+ }
+ }
+ },
+
+ "startIndexFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Annotation Page startIndex key",
+ "description": "True when the object has exactly one startIndex value (Section 5.2)",
+ "allOf": [
+ {"required": ["startIndex"]},
+ {"$ref": "#/definitions/startIndexDefinition"}
+ ]
+ },
+
+ "itemsFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Annotation Page items key",
+ "description": "True when the object has items key with value that is an array of strings of format uri and/or objects of type Annotation (Section 5.2)",
+ "type": "object",
+ "properties":
+ { "items":
+ { "type": "array",
+ "items": {
+ "oneOf":[
+ { "$ref": "annotations.json#/definitions/annotationTypeValueFound" },
+ { "type": "string",
+ "format": "uri" }
+ ]
+ }
+ }
+ },
+ "required": [ "items" ]
+ }
+
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/definitions/id.json b/testing/web-platform/tests/annotation-model/definitions/id.json
new file mode 100644
index 0000000000..b037e87c94
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/definitions/id.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id" : "id.json",
+ "title": "Definitions: id key",
+ "description": "Schemas in #/definitions used to detect valid id (string of format uri or array containing 1 item of string, format uri).",
+ "definitions":
+ {
+ "stringUri" :
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "string",
+ "format": "uri"
+ },
+
+ "arraySingleStringUri":
+ {
+ "oneOf":
+ [
+ { "$ref": "#/definitions/stringUri" },
+ { "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": { "$ref": "#/definitions/stringUri" }
+ }
+ ]
+ },
+
+ "idValueFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "required": [ "id" ],
+ "properties": {
+ "id" : { "$ref": "#/definitions/arraySingleStringUri" }
+ }
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/definitions/otherProperties.json b/testing/web-platform/tests/annotation-model/definitions/otherProperties.json
new file mode 100644
index 0000000000..faa2231f30
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/definitions/otherProperties.json
@@ -0,0 +1,1472 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "otherProperties.json",
+ "title": "Definitions: Other Properties.",
+ "description": "Schemas in #/definitions detect or validate keys, objects or constraints variously applicable to Annotations, Bodies, Targets, Specific Resources, Textual Bodies, Items, and/or Sources (Section 3.3).",
+ "definitions": {
+
+ "createdValidIfPresent": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: created value",
+ "description": "True when the object being tested (annotation, body, target...) has no created or has a single created of format date-time (Section 3.3.1)",
+ "type": "object",
+ "properties": {"created": {"oneOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": {
+ "type": "string",
+ "format": "date-time"
+ }
+ }
+ ]}}
+ },
+
+ "createdPropertyFound": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: created key with qualifying body/target classes",
+ "description": "Supports implementation check of created (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf": [
+ {"$ref": "annotations.json#/definitions/annotationTypeValueFound"},
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/textualBodyFound"}
+ ],
+ "allOf": [
+ {"$ref": "#/definitions/createdValidIfPresent"},
+ {"required": ["created"]}
+ ]
+ },
+
+ "itemCreatedPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having created key with qualifying body/target classes",
+ "description": "Supports implementation check of items having created (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/createdPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceCreatedPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having created key",
+ "description": "Supports implementation check of created (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["created"] ,
+ "$ref": "#/definitions/createdValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "generatedValidIfPresent": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: generated value",
+ "description": "True when the annotation, body or target has no generated or has a single generated of format date-time (Section 3.3.1)",
+ "type": "object",
+ "properties": {"generated": {"oneOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": {
+ "type": "string",
+ "format": "date-time"
+ }
+ }
+ ]}}
+ },
+
+ "generatedPropertyFound": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: generated key with qualifying body/target classes",
+ "description": "Supports implementation check of generated (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf": [
+ {"$ref": "annotations.json#/definitions/annotationTypeValueFound"}
+ ],
+ "allOf": [
+ {"$ref": "#/definitions/generatedValidIfPresent"},
+ {"required": ["generated"]}
+ ]
+ },
+
+ "modifiedValidIfPresent": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: modified value",
+ "description": "True when the annotation, body or target has no modified or has a single modified of format date-time (Section 3.3.1)",
+ "type": "object",
+ "properties": {"modified": {"oneOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": {
+ "type": "string",
+ "format": "date-time"
+ }
+ }
+ ]}}
+ },
+
+ "modifiedPropertyFound": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: modified key with qualifying body/target classes",
+ "description": "Supports implementation check of modified (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "oneOf": [
+ {"$ref": "annotations.json#/definitions/annotationTypeValueFound"},
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/textualBodyFound"}
+ ],
+ "allOf": [
+ {"$ref": "#/definitions/modifiedValidIfPresent"},
+ {"required": ["modified"]}
+ ]
+ },
+
+ "itemModifiedPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having modified key with qualifying body/target classes",
+ "description": "Supports implementation check of items having modified (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/modifiedPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceModifiedPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having modified key",
+ "description": "Supports implementation check of modified (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["modified"] ,
+ "$ref": "#/definitions/modifiedValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "creatorValidIfPresent": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: creator value",
+ "description": "True when the annotation, body or target has one or more creators (Section 3.3.1)",
+ "type": "object",
+ "properties": {"creator":
+ {"oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object" },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object" }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "creatorSingularIfPresent": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: creator value",
+ "description": "True when the annotation, body or target has exactly 1 creator (Section 3.3.1)",
+ "type": "object",
+ "properties": {"creator":
+ {"oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object" },
+ {
+ "type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object" }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "creatorPropertyFound": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: creator key with qualifying body/target classes",
+ "description": "Supports implementation check of creator (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Section 3.3.1)",
+ "oneOf": [
+ {"$ref": "annotations.json#/definitions/annotationTypeValueFound"},
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/textualBodyFound"}
+ ],
+ "allOf": [
+ {"required": ["creator"]},
+ {"$ref": "#/definitions/creatorValidIfPresent"}
+ ]
+ },
+
+ "itemCreatorPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having creator key with qualifying body/target classes",
+ "description": "Supports implementation check of items having creator (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/creatorPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceCreatorPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having creator key",
+ "description": "Supports implementation check of creator (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["creator"] ,
+ "$ref": "#/definitions/creatorValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "singleCreatorPropertyFound": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: creator key with qualifying body/target classes",
+ "description": "Supports implementation check of creator being singular (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Section 3.3.1)",
+ "oneOf": [
+ {"$ref": "annotations.json#/definitions/annotationTypeValueFound"},
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/textualBodyFound"}
+ ],
+ "allOf": [
+ {"required": ["creator"]},
+ {"$ref": "#/definitions/creatorSingularIfPresent"}
+ ]
+ },
+
+ "itemSingleCreatorPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having singular creator key with qualifying body/target classes",
+ "description": "Supports implementation check of items having singular creator (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/singleCreatorPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceSingleCreatorPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having singular creator key",
+ "description": "Supports implementation check of singular creator (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["creator"] ,
+ "$ref": "#/definitions/creatorSingularIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "generatorValidIfPresent": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: generator value",
+ "description": "True when the annotation, body or target has a single generator (Section 3.3.1)",
+ "type": "object",
+ "properties": {"generator":
+ {"oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object" },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object" }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "generatorPropertyFound": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: generator key with qualifying body/target classes",
+ "description": "Supports implementation check of generator (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Section 3.3.1)",
+ "oneOf": [
+ {"$ref": "annotations.json#/definitions/annotationTypeValueFound"}
+ ],
+ "allOf": [
+ {"required": ["generator"]},
+ {"$ref": "#/definitions/generatorValidIfPresent"}
+ ]
+ },
+
+ "audienceDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: audience object",
+ "description": "True when object meets our requirements for audience value (Section 3.3.3)",
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "id.json#/definitions/arraySingleStringUri"} ,
+ "type": {
+ "oneOf": [
+ { "type": "string",
+ "pattern": "^(schema:)"},
+ { "type": "array",
+ "minItems": 1,
+ "items": {
+ "type": "string",
+ "pattern": "^(schema:)"
+ }
+ }
+ ]
+ }
+ },
+ "patternProperties": {
+ "^(schema:)": { "type": ["string", "object", "array"] }
+ },
+ "additionalProperties": false
+ },
+
+ "audienceValidIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: audience value",
+ "description": "True when no audience or audience property of the annotation, body, target, ... is valid (Section 3.3.3)",
+ "type": "object",
+ "properties": {
+ "audience":
+ { "oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "$ref": "#/definitions/audienceDefinition" },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "$ref": "#/definitions/audienceDefinition" }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "audiencePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: audience key with qualifying body/target classes",
+ "description": "Supports implementation check of audience (if/when) used on Annotation, External Web Resources, Specific Resources, Textual Body Resources (Section 3.3.3)",
+ "oneOf": [
+ {"$ref": "annotations.json#/definitions/annotationTypeValueFound"},
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/textualBodyFound"}
+ ],
+ "allOf": [
+ {"required": ["audience"]},
+ {"$ref": "#/definitions/audienceValidIfPresent"}
+ ]
+ },
+
+ "itemAudiencePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having audience key with qualifying body/target classes",
+ "description": "Supports implementation check of items having audience (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/audiencePropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceAudiencePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having audience key",
+ "description": "Supports implementation check of audience (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["audience"] ,
+ "$ref": "#/definitions/audienceValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "accessibilityValidIfPresent":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: accessibility value",
+ "description": "True when no accessibility or accessibility property of the body, target, ... is valid (Section 3.3.4)",
+ "type": "object",
+ "properties": {
+ "accessibility" : {
+ "oneOf": [
+ { "type": "string" },
+ { "type": "array" ,
+ "minItems": 1,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "accessibilityPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: accessibility key with qualifying body/target classes",
+ "description": "Supports implementation check of accessibility (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Section 3.3.4)",
+ "oneOf": [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/textualBodyFound"}
+ ],
+ "allOf": [
+ {"required": ["accessibility"]},
+ {"$ref": "#/definitions/accessibilityValidIfPresent"}
+ ]
+ },
+
+ "itemAccessibilityPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having accessibility key with qualifying body/target classes",
+ "description": "Supports implementation check of items having accessibility (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/accessibilityPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceAccessibilityPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having audience key",
+ "description": "Supports implementation check of audience (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["accessibility"] ,
+ "$ref": "#/definitions/accessibilityValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "rightsValidIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: rights value",
+ "description": "True when the annotation, body or target has 0 or more rights properties that are strings of format uri (Section 3.3.6)",
+ "type": "object",
+ "properties": {"rights":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "id.json#/definitions/stringUri" } }
+ ]
+ }
+ }
+ },
+
+ "rightsPropertyFound":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: rights key with qualifying annotation/body/target classes",
+ "description": "Supports implementation check of rights (if/when) used on Annotation, External Web Resources, Specific Resources, Textual Body Resources (Sections 3.3.6)",
+ "oneOf": [
+ {"$ref": "annotations.json#/definitions/annotationTypeValueFound"},
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/textualBodyFound"}
+ ],
+ "allOf": [
+ {"required": ["rights"]},
+ {"$ref": "#/definitions/rightsValidIfPresent"}
+ ]
+ },
+
+ "itemRightsPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having rights key with qualifying body/target classes",
+ "description": "Supports implementation check of items having rights (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/rightsPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceRightsPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having rights key",
+ "description": "Supports implementation check of rights (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["rights"] ,
+ "$ref": "#/definitions/rightsValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "canonicalValidIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: canonical value",
+ "description": "True when the annotation, body or target has 0 or 1 canonical properties that are strings of format uri (Section 3.3.7)",
+ "type": "object",
+ "properties": {
+ "canonical": { "$ref": "id.json#/definitions/arraySingleStringUri" }
+ }
+ },
+
+ "canonicalPropertyFound":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: canonical key with qualifying annotation/body/target classes",
+ "description": "Supports implementation check of canonical (if/when) used on Annotation, External Web Resources, Specific Resources, Textual Body Resources (Sections 3.3.7)",
+ "oneOf": [
+ {"$ref": "annotations.json#/definitions/annotationTypeValueFound"},
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/textualBodyFound"}
+ ],
+ "allOf": [
+ {"required": ["canonical"]},
+ {"$ref": "#/definitions/canonicalValidIfPresent"}
+ ]
+ },
+
+ "itemCanonicalPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having canonical key with qualifying body/target classes",
+ "description": "Supports implementation check of items having canonical (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/canonicalPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceCanonicalPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having canonical key",
+ "description": "Supports implementation check of canonical (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["canonical"] ,
+ "$ref": "#/definitions/canonicalValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "viaValidIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: via value",
+ "description": "True when the annotation, body or target has 0 or more via properties that are strings of format uri (Section 3.3.7)",
+ "type": "object",
+ "properties": {"via":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "id.json#/definitions/stringUri" } }
+ ]
+ }
+ }
+ },
+
+ "viaPropertyFound":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: via key with qualifying annotation/body/target classes",
+ "description": "Supports implementation check of via (if/when) used on Annotation, External Web Resources, Specific Resources, Textual Body Resources (Sections 3.3.7)",
+ "oneOf": [
+ {"$ref": "annotations.json#/definitions/annotationTypeValueFound"},
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/textualBodyFound"}
+ ],
+ "allOf": [
+ {"required": ["via"]},
+ {"$ref": "#/definitions/viaValidIfPresent"}
+ ]
+ },
+
+ "itemViaPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having via key with qualifying body/target classes",
+ "description": "Supports implementation check of items having via (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/viaPropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "sourceViaPropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: Specific Resource source having via key",
+ "description": "Supports implementation check of via (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": "object",
+ "required": ["via"] ,
+ "$ref": "#/definitions/viaValidIfPresent"
+ }
+ },
+ "required": ["source"]
+ },
+
+ "purposeRecognizedIfPresent":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Validation: purpose value",
+ "description": "True when the body has 0 or more purpose property values (Section 3.3.5)",
+ "type": "object",
+ "properties": {"purpose":
+ { "oneOf": [
+ { "$ref": "annotations.json#/definitions/motivationList" },
+ { "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "annotations.json#/definitions/motivationList" } }
+ ]
+ }
+ }
+ },
+
+ "purposePropertyFound":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: purpose key with qualifying body classes",
+ "description": "Supports implementation check of purpose (if/when) used on Specific Resource Body or Textual Body (Sections 3.3.5)",
+ "oneOf": [
+ {"$ref": "specificResource.json#/definitions/specificeResourceDetected"},
+ {"$ref": "bodyTarget.json#/definitions/textualBodyFound"}
+ ],
+ "allOf": [
+ {"required": ["purpose"]},
+ {"$ref": "#/definitions/purposeRecognizedIfPresent"}
+ ]
+ },
+
+ "itemPurposePropertyFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having purpose key with qualifying body/target classes",
+ "description": "Supports implementation check of items having purpose (if/when) used on Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/purposePropertyFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "creatorAgentWithIdFound":
+ { "type": "object",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "id.json#/definitions/idValueFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "id.json#/definitions/idValueFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ },
+
+ "sourceCreatorAgentWithIdFound":
+ { "type": "object",
+ "properties":
+ {
+ "source":
+ { "$ref": "#/definitions/creatorAgentWithIdFound" }
+ },
+ "required": ["source"]
+ },
+
+ "itemCreatorAgentWithIdFound":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/creatorAgentWithIdFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "agentTypeDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Agent type value",
+ "description": "True when the object (creator or generator agent) has no type or has at least one recognized Agent type value (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "type":
+ {
+ "oneOf":
+ [
+ {"type": "string",
+ "enum": ["Person", "Organization", "Software"] },
+ {"type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items" :
+ { "not":
+ { "type": "string",
+ "enum": ["Person", "Organization", "Software"] }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "agentTypeFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Agent type value",
+ "description": "True when the object (creator or generator agent) has at least one recognized Agent type value (Section 3.3.2)",
+ "allOf": [
+ {"required": ["type"]},
+ {"$ref": "#/definitions/agentTypeDefinition"}
+ ]
+ },
+
+ "creatorAgentWithTypeFound":
+ { "type": "object",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/agentTypeFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "#/definitions/agentTypeFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ },
+
+ "sourceCreatorAgentWithTypeFound":
+ { "type": "object",
+ "properties":
+ {
+ "source":
+ { "$ref": "#/definitions/creatorAgentWithTypeFound" }
+ },
+ "required": ["source"]
+ },
+
+ "itemCreatorAgentWithTypeFound":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/creatorAgentWithTypeFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "agentNameDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Agent name value",
+ "description": "True when the object (creator or generator agent) has no name or has Agent name(s) of type string (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "name":
+ {
+ "oneOf":
+ [
+ {"type": "string" },
+ {"type": "array",
+ "minItems": 1,
+ "items": {"type": "string"}
+ }
+ ]
+ }
+ }
+ },
+
+ "agentSingularNameDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Agent name value",
+ "description": "True when the object (creator or generator agent) has no name or has exactly one Agent name that is a string (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "name":
+ {
+ "oneOf":
+ [
+ {"type": "string" },
+ {"type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": {"type": "string"}
+ }
+ ]
+ }
+ }
+ },
+
+ "agentNameFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Agent name value",
+ "description": "True when the object (creator or generator agent) has Agent name value(s) (Section 3.3.2)",
+ "allOf": [
+ {"required": ["name"]},
+ {"$ref": "#/definitions/agentNameDefinition"}
+ ]
+ },
+
+ "creatorAgentWithNameFound":
+ { "type": "object",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/agentNameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "#/definitions/agentNameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ },
+
+ "sourceCreatorAgentWithNameFound":
+ { "type": "object",
+ "properties":
+ {
+ "source":
+ { "$ref": "#/definitions/creatorAgentWithNameFound" }
+ },
+ "required": ["source"]
+ },
+
+ "itemCreatorAgentWithNameFound":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/creatorAgentWithNameFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "agentSingularNameFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Agent name value",
+ "description": "True when the object (creator or generator agent) has exactly one Agent name value (Section 3.3.2)",
+ "allOf": [
+ {"required": ["name"]},
+ {"$ref": "#/definitions/agentSingularNameDefinition"}
+ ]
+ },
+
+ "creatorAgentWithSingularNameFound":
+ { "type": "object",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/agentSingularNameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "#/definitions/agentSingularNameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ },
+
+ "sourceCreatorAgentWithSingularNameFound":
+ { "type": "object",
+ "properties":
+ {
+ "source":
+ { "$ref": "#/definitions/creatorAgentWithSingularNameFound" }
+ },
+ "required": ["source"]
+ },
+
+ "itemCreatorAgentWithSingularNameFound":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/creatorAgentWithSingularNameFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "agentSingularNicknameDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Agent nickname value",
+ "description": "True when the object (creator or generator agent) has no nickname or has exacly one Agent nickname that is a string (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "nickname":
+ {
+ "oneOf":
+ [
+ {"type": "string" },
+ {"type": "array",
+ "minItems": 1,
+ "maxItems": 1,
+ "items": {"type": "string"}
+ }
+ ]
+ }
+ }
+ },
+
+ "agentSingularNicknameFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Agent nickname value",
+ "description": "True when the object (creator or generator agent) has an Agent nickname value (Section 3.3.2)",
+ "allOf": [
+ {"required": ["nickname"]},
+ {"$ref": "#/definitions/agentSingularNicknameDefinition"}
+ ]
+ },
+
+ "creatorAgentWithSingularNicknameFound":
+ { "type": "object",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/agentSingularNicknameFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "#/definitions/agentSingularNicknameFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ },
+
+ "sourceCreatorAgentWithSingularNicknameFound":
+ { "type": "object",
+ "properties":
+ {
+ "source":
+ { "$ref": "#/definitions/creatorAgentWithSingularNicknameFound" }
+ },
+ "required": ["source"]
+ },
+
+ "itemCreatorAgentWithSingularNicknameFound":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/creatorAgentWithSingularNicknameFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "agentEmailDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Agent email value",
+ "description": "True when the object (creator or generator agent) has no email or has Agent one or more email addresses that start(s) mailto: and is format uri (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "email":
+ {
+ "oneOf":
+ [
+ { "type": "string",
+ "pattern": "^(mailto)",
+ "format": "uri" },
+ {"type": "array",
+ "minItems": 1,
+ "items": {"type": "string",
+ "pattern": "^(mailto)",
+ "format": "uri" }
+ }
+ ]
+ }
+ }
+ },
+
+ "agentEmailFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Agent email value",
+ "description": "True when the object (creator or generator agent) has Agent email value(s) (Section 3.3.2)",
+ "allOf": [
+ {"required": ["email"]},
+ {"$ref": "#/definitions/agentEmailDefinition"}
+ ]
+ },
+
+ "creatorAgentWithEmailFound":
+ { "type": "object",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/agentEmailFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "#/definitions/agentEmailFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ },
+
+ "sourceCreatorAgentWithEmailFound":
+ { "type": "object",
+ "properties":
+ {
+ "source":
+ { "$ref": "#/definitions/creatorAgentWithEmailFound" }
+ },
+ "required": ["source"]
+ },
+
+ "itemCreatorAgentWithEmailFound":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/creatorAgentWithEmailFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "agentEmail_sha1Definition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Agent email_sha1 value",
+ "description": "True when the object (creator or generator agent) has no email_sha1 or has one or more email_sha1 that is/are a string (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "email_sha1":
+ {
+ "oneOf":
+ [
+ {"type": "string" },
+ {"type": "array",
+ "minItems": 1,
+ "items": {"type": "string"}
+ }
+ ]
+ }
+ }
+ },
+
+ "agentEmail_sha1Found":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Agent email_sha1 value",
+ "description": "True when the object (creator or generator agent) has has one or more email_sha1 that is/are a string (Section 3.3.2)",
+ "allOf": [
+ {"required": ["email_sha1"]},
+ {"$ref": "#/definitions/agentEmail_sha1Definition"}
+ ]
+ },
+
+ "creatorAgentWithEmail_sha1Found":
+ { "type": "object",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/agentEmail_sha1Found" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "#/definitions/agentEmail_sha1Found" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ },
+
+ "sourceCreatorAgentWithEmail_sha1Found":
+ { "type": "object",
+ "properties":
+ {
+ "source":
+ { "$ref": "#/definitions/creatorAgentWithEmail_sha1Found" }
+ },
+ "required": ["source"]
+ },
+
+ "itemCreatorAgentWithEmail_sha1Found":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/creatorAgentWithEmail_sha1Found" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "agentHomepageDefinition":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: Agent homepage value",
+ "description": "True when the object (creator or generator agent) has no homempage or has one or more agent homepage addresses of format uri (Section 3.3.2)",
+ "type": "object",
+ "properties":
+ {
+ "email":
+ {
+ "oneOf":
+ [
+ { "type": "string",
+ "format": "uri" },
+ {"type": "array",
+ "minItems": 1,
+ "items": {"type": "string",
+ "format": "uri" }
+ }
+ ]
+ }
+ }
+ },
+
+ "agentHomepageFound":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check for implementation of Agent homepage value",
+ "description": "True when the object (creator or generator agent) has Agent homepage value(s) (Section 3.3.2)",
+ "allOf": [
+ {"required": ["homepage"]},
+ {"$ref": "#/definitions/agentHomepageDefinition"}
+ ]
+ },
+
+ "creatorAgentWithHomepageFound":
+ { "type": "object",
+ "properties":
+ { "creator":
+ { "oneOf":
+ [
+ { "$ref": "#/definitions/agentHomepageFound" },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": { "not": { "$ref": "#/definitions/agentHomepageFound" } } }
+ }
+ ]
+ }
+ },
+ "required": ["creator"]
+ },
+
+ "sourceCreatorAgentWithHomepageFound":
+ { "type": "object",
+ "properties":
+ {
+ "source":
+ { "$ref": "#/definitions/creatorAgentWithHomepageFound" }
+ },
+ "required": ["source"]
+ },
+
+ "itemCreatorAgentWithHomepageFound":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/creatorAgentWithHomepageFound" } }
+ }
+ }
+ },
+ "required": ["items"]
+ }
+
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/definitions/specificResource.json b/testing/web-platform/tests/annotation-model/definitions/specificResource.json
new file mode 100644
index 0000000000..b830f68bd2
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/definitions/specificResource.json
@@ -0,0 +1,1128 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id" : "specificResource.json",
+ "title": "Definitions: Specific Resources.",
+ "description": "Schemas in #/definitions detect or validate keys/objects used in describing Specific Resources (Section 4).",
+ "definitions": {
+
+ "sourceDetected":
+ {
+ "title": "Detection: source",
+ "description": "True when object has exactly 1 source key value and that value is of format uri or an External Web Resource (Section 4) - NB, the Specific Resource is closer in hierarchy to the External Web Resource than a Choice or Set; the items of a Choice or Set may be Specific Resources, but the source of a Specific Resource may not be a Choice or Set.",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "type": ["string", "object" ],
+ "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"}
+ ]
+ }
+ },
+ "required": ["source"]
+ },
+
+ "specificeResourceDetected":
+ {
+ "title": "Detection: Specific Resource",
+ "description": "True when object has exactly 1 source value and at least one of purpose, selector, state, styleClass, renderedVia, scope (Section 4)",
+ "type": "object",
+ "$ref": "#/definitions/sourceDetected",
+ "anyOf": [
+ { "$ref": "otherProperties.json#/definitions/purposeRecognizedIfPresent", "required": ["purpose"] },
+ { "$ref": "#/definitions/selectorDetected" },
+ { "$ref": "#/definitions/stateDetected" },
+ { "$ref": "#/definitions/styleClassDetected" },
+ { "$ref": "#/definitions/renderedViaDetected" },
+ { "$ref": "#/definitions/scopeDetected" }
+ ]
+ },
+
+ "itemSpecificResourceDetected":
+ {
+ "title": "Detection: Specific Resource as item member of a Choice or Set",
+ "description": "True when object has items array containing an object with exactly 1 source value and at least one of purpose, selector, state, styleClass, renderedVia, scope (Section 4)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/specificeResourceDetected" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "selectorDefined":
+ {
+ "title": "Definition: selector",
+ "description": "True when object tested has no selector, or has selector identified by uri, or has selector(s) with value matching one or more of the selectors described in the model (Section 4.2)",
+ "type": "object",
+ "properties":
+ {
+ "selector":
+ {
+ "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "anyOf": [
+ {"$ref": "id.json#/definitions/idValueFound"},
+ {"$ref": "#/definitions/fragmentSelectorDetected"},
+ {"$ref": "#/definitions/cssSelectorDetected"},
+ {"$ref": "#/definitions/xpathSelectorDetected"},
+ {"$ref": "#/definitions/textQuoteSelectorDetected"},
+ {"$ref": "#/definitions/textPositionSelectorDetected"},
+ {"$ref": "#/definitions/dataPositionSelectorDetected"},
+ {"$ref": "#/definitions/rangeSelectorDetected"},
+ {"$ref": "#/definitions/svgSelectorDetected"}
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "anyOf": [
+ {"$ref": "id.json#/definitions/idValueFound"},
+ {"$ref": "#/definitions/fragmentSelectorDetected"},
+ {"$ref": "#/definitions/cssSelectorDetected"},
+ {"$ref": "#/definitions/xpathSelectorDetected"},
+ {"$ref": "#/definitions/textQuoteSelectorDetected"},
+ {"$ref": "#/definitions/textPositionSelectorDetected"},
+ {"$ref": "#/definitions/dataPositionSelectorDetected"},
+ {"$ref": "#/definitions/rangeSelectorDetected"},
+ {"$ref": "#/definitions/svgSelectorDetected"}
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "itemSelectorValidIfPresent":
+ {
+ "description": "True if ALL items in the items array of object tested have no selector, or have a selector that is uri, or have a selector that has recognized value(s)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ { "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "$ref": "#/definitions/selectorDefined" }
+ ]
+ }
+ }
+ }
+ },
+
+ "selectorDetected":
+ {
+ "title": "Detection: selector type",
+ "description": "True when object tested has selector(s) that is(are) recognized as being one or more of the selectors described in the model (Section 4.2)",
+ "type": "object",
+ "$ref": "#/definitions/selectorDefined",
+ "required": ["selector"]
+ },
+
+ "fragmentSelectorTypeDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "type": { "type": "string", "enum": ["FragmentSelector"] }
+ },
+ "required": ["type"]
+ },
+
+ "fragmentSelectorDetected":
+ {
+ "title": "Detection: fragment selector",
+ "description": "True when object is a fragment selelctor (Section 4.2.1)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/fragmentSelectorTypeDetected"},
+ {
+ "type": "object",
+ "properties":
+ {
+ "value": { "type": "string" },
+ "conformsTo": { "type": "string", "format": "uri"}
+ },
+ "required": ["value"]
+ }
+ ]
+ },
+
+ "conformsToPropertyFound":
+ {
+ "title": "Detection: fragment selector with conformsTo key",
+ "description": "True when object is a fragment selelctor with a conformsTo key (Section 4.2.1)",
+ "type": "object",
+ "allOf":
+ [
+ { "$ref": "#/definitions/fragmentSelectorDetected"},
+ { "required": ["conformsTo"] }
+ ]
+ },
+
+ "fragmentSelectorTypeValidIfPresent":
+ {
+ "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.",
+ "oneOf":
+ [
+ { "not": { "$ref": "#/definitions/fragmentSelectorTypeDetected" } },
+ { "$ref": "#/definitions/fragmentSelectorDetected" }
+ ]
+ },
+
+ "cssSelectorTypeDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "type": { "type": "string", "enum": ["CssSelector"] }
+ },
+ "required": ["type"]
+ },
+
+ "cssSelectorDetected":
+ {
+ "title": "Detection: CssSelector selector",
+ "description": "True when object is a CssSelector selelctor (Section 4.2.2)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/cssSelectorTypeDetected" },
+ {
+ "type": "object",
+ "properties":
+ {
+ "value": { "type": "string" }
+ },
+ "required": ["value"]
+ }
+ ]
+ },
+
+ "cssSelectorTypeValidIfPresent":
+ {
+ "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.",
+ "oneOf":
+ [
+ { "not": { "$ref": "#/definitions/cssSelectorTypeDetected" } },
+ { "$ref": "#/definitions/cssSelectorDetected" }
+ ]
+ },
+
+ "xpathSelectorTypeDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "type": { "type": "string", "enum": ["XPathSelector"] }
+ },
+ "required": ["type"]
+ },
+
+ "xpathSelectorDetected":
+ {
+ "title": "Detection: XPath selector",
+ "description": "True when object is a XPath selelctor (Section 4.2.3)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/xpathSelectorTypeDetected" },
+ {
+ "type": "object",
+ "properties":
+ {
+ "value": { "type": "string" }
+ },
+ "required": ["value"]
+ }
+ ]
+
+ },
+
+ "xpathSelectorTypeValidIfPresent":
+ {
+ "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.",
+ "oneOf":
+ [
+ { "not": { "$ref": "#/definitions/xpathSelectorTypeDetected" } },
+ { "$ref": "#/definitions/xpathSelectorDetected" }
+ ]
+ },
+
+ "textQuoteSelectorTypeDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "type": { "type": "string", "enum": ["TextQuoteSelector"] }
+ },
+ "required": ["type"]
+ },
+
+ "textQuoteSelectorDetected":
+ {
+ "title": "Detection: text quote selector",
+ "description": "True when object is a text quote selelctor (Section 4.2.4)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/textQuoteSelectorTypeDetected" },
+ {
+ "type": "object",
+ "properties":
+ {
+ "exact": { "type": "string" },
+ "prefix": { "type": "string" },
+ "suffix": { "type": "string" }
+ },
+ "required": ["exact"]
+ }
+ ]
+ },
+
+ "prefixPropertyFound":
+ {
+ "title": "Detection: text quote selector with prefix key",
+ "description": "True when object is a text quote selelctor with a prefix key (Section 4.2.4)",
+ "type": "object",
+ "allOf":
+ [
+ { "$ref": "#/definitions/textQuoteSelectorDetected"},
+ { "required": ["prefix"] }
+ ]
+ },
+
+ "suffixPropertyFound":
+ {
+ "title": "Detection: text quote selector with suffix key",
+ "description": "True when object is a text quote selelctor with a suffix key (Section 4.2.4)",
+ "type": "object",
+ "allOf":
+ [
+ { "$ref": "#/definitions/textQuoteSelectorDetected"},
+ { "required": ["suffix"] }
+ ]
+ },
+
+ "textQuoteSelectorTypeValidIfPresent":
+ {
+ "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.",
+ "oneOf":
+ [
+ { "not": { "$ref": "#/definitions/textQuoteSelectorTypeDetected" } },
+ { "$ref": "#/definitions/textQuoteSelectorDetected" }
+ ]
+ },
+
+ "textPositionSelectorTypeDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "type": { "type": "string", "enum": ["TextPositionSelector"] }
+ },
+ "required": ["type"]
+ },
+
+ "textPositionSelectorDetected":
+ {
+ "title": "Definition: text position selector",
+ "description": "True when object is a text position selelctor (Section 4.2.5)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/textPositionSelectorTypeDetected" },
+ {
+ "type": "object",
+ "properties":
+ {
+ "start": { "type": "integer", "minimum": 0 },
+ "end": { "type": "integer","minimum": 0 }
+ },
+ "required": ["start", "end"]
+ }
+ ]
+ },
+
+ "textPositionSelectorTypeValidIfPresent":
+ {
+ "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.",
+ "oneOf":
+ [
+ { "not": { "$ref": "#/definitions/textPositionSelectorTypeDetected" } },
+ { "$ref": "#/definitions/textPositionSelectorDetected" }
+ ]
+ },
+
+ "dataPositionSelectorTypeDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "type": { "type": "string", "enum": ["DataPositionSelector"] }
+ },
+ "required": ["type"]
+ },
+
+ "dataPositionSelectorDetected":
+ {
+ "title": "Definition: data position selector",
+ "description": "True when object is a data position selelctor (Section 4.2.5)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/dataPositionSelectorTypeDetected" },
+ {
+ "type": "object",
+ "properties":
+ {
+ "start": { "type": "integer", "minimum": 0 },
+ "end": { "type": "integer","minimum": 0 }
+ },
+ "required": ["start", "end"]
+ }
+ ]
+ },
+
+ "dataPositionSelectorTypeValidIfPresent":
+ {
+ "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.",
+ "oneOf":
+ [
+ { "not": { "$ref": "#/definitions/dataPositionSelectorTypeDetected" } },
+ { "$ref": "#/definitions/dataPositionSelectorDetected" }
+ ]
+ },
+
+ "svgSelectorTypeDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "type": { "type": "string", "enum": ["SvgSelector"] }
+ },
+ "required": ["type"]
+ },
+
+ "svgSelectorDetected":
+ {
+ "title": "Detection: svg selector",
+ "description": "True when object is a svg selelctor (Section 4.2.7)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/svgSelectorTypeDetected" },
+ {
+ "type": "object",
+ "properties":
+ {
+ "value": { "type": "string" },
+ "id": { "$ref": "id.json#/definitions/arraySingleStringUri" }
+ },
+ "oneOf": [
+ {"required": ["value"] },
+ {"required": ["id"] }
+ ]
+ }
+ ]
+ },
+
+ "svgSelectorTypeValidIfPresent":
+ {
+ "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.",
+ "oneOf":
+ [
+ { "not": { "$ref": "#/definitions/svgSelectorTypeDetected" } },
+ { "$ref": "#/definitions/svgSelectorDetected" }
+ ]
+ },
+
+ "rangeSelectorTypeDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "type": { "type": "string", "enum": ["RangeSelector"] }
+ },
+ "required": ["type"]
+ },
+
+ "rangeSelectorDetected":
+ {
+ "title": "Detection: range selector",
+ "description": "True when object is a range selelctor (Section 4.2.9)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/rangeSelectorTypeDetected" },
+ {
+ "type": "object",
+ "patternProperties":
+ {
+ "^(startSelector|endSelector)$":
+ { "type": "object",
+ "oneOf": [
+ {"$ref": "#/definitions/fragmentSelectorDetected"},
+ {"$ref": "#/definitions/cssSelectorDetected"},
+ {"$ref": "#/definitions/xpathSelectorDetected"},
+ {"$ref": "#/definitions/textQuoteSelectorDetected"},
+ {"$ref": "#/definitions/textPositionSelectorDetected"},
+ {"$ref": "#/definitions/dataPositionSelectorDetected"},
+ {"$ref": "#/definitions/svgSelectorDetected"}
+ ]
+ }
+ },
+ "required": ["startSelector", "endSelector"]
+ }
+ ]
+ },
+
+ "rangeSelectorTypeValidIfPresent":
+ {
+ "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.",
+ "oneOf":
+ [
+ { "not": { "$ref": "#/definitions/rangeSelectorTypeDetected" } },
+ { "$ref": "#/definitions/rangeSelectorDetected" }
+ ]
+ },
+
+ "stateDefined" :
+ {
+ "title": "Definition: state",
+ "description": "True when object tested has state with value matching one or more of the state classes described in the model (Section 4.3)",
+ "type": "object",
+ "properties":
+ {
+ "state":
+ {
+ "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "anyOf": [
+ {"$ref": "id.json#/definitions/idValueFound"},
+ {"$ref": "#/definitions/timeStateDetected"},
+ {"$ref": "#/definitions/requestHeaderStateDetected"}
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "anyOf": [
+ {"$ref": "id.json#/definitions/idValueFound"},
+ {"$ref": "#/definitions/timeStateDetected"},
+ {"$ref": "#/definitions/requestHeaderStateDetected"}
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "itemStateValidIfPresent":
+ {
+ "description": "True if ALL items in the items array of object tested have no state, or have a state that is uri, or have a state that has recognized value(s)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ { "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "$ref": "#/definitions/stateDefined" }
+ ]
+ }
+ }
+ }
+ },
+
+ "stateDetected":
+ {
+ "title": "Detection: state type",
+ "description": "True when object tested has state(s) that is(are) recognized as being one or more of the states described in the model (Section 4.3)",
+ "type": "object",
+ "$ref": "#/definitions/stateDefined",
+ "required": ["state"]
+ },
+
+ "timeStateTypeDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "type": { "type": "string", "enum": ["TimeState"] }
+ },
+ "required": ["type"]
+ },
+
+ "timeStateDetected":
+ {
+ "title": "Detection: time state",
+ "description": "True when object is a time state (Section 4.3.1)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/timeStateTypeDetected" },
+ {
+ "type": "object",
+ "properties":
+ {
+ "sourceDate":
+ { "oneOf": [
+ { "type": "string",
+ "format": "date-time"},
+ { "type": "array",
+ "minItems": 1,
+ "items":
+ {"type": "string", "format": "date-time"}
+ }
+ ]
+ },
+ "sourceDateStart": { "type": "string", "format": "date-time"},
+ "sourceDateEnd": { "type": "string", "format": "date-time"},
+ "cached": { "type": "string", "format": "uri"}
+ },
+ "oneOf":
+ [
+ { "required": ["sourceDate"] },
+ { "required": ["sourceDateStart", "sourceDateEnd"] }
+ ],
+ "not":
+ { "required": [ "sourceDate", "sourceDateStart", "sourceDateEnd" ] }
+ }
+ ]
+ },
+
+ "cachedPropertyFound":
+ {
+ "title": "Detection: time state with cached key",
+ "description": "True when object is a time state with a cached key (Section 4.3.1)",
+ "type": "object",
+ "allOf":
+ [
+ { "$ref": "#/definitions/timeStateDetected"},
+ { "required": ["cached"] }
+ ]
+ },
+
+ "timeStateTypeValidIfPresent":
+ {
+ "description": "True if State Type not detected (i.e., not present), or if both Type and State detected (i.e., State constraints met); note, State cannot be detected if State Type not detected.",
+ "oneOf":
+ [
+ { "not": { "$ref": "#/definitions/timeStateTypeDetected" } },
+ { "$ref": "#/definitions/timeStateDetected" }
+ ]
+ },
+
+ "requestHeaderStateTypeDetected":
+ {
+ "type": "object",
+ "properties":
+ {
+ "type": { "type": "string", "enum": ["HttpRequestState"] }
+ },
+ "required": ["type"]
+ },
+
+ "requestHeaderStateDetected":
+ {
+ "title": "Detection: request header state",
+ "description": "True when object is a request header state (Section 4.3.2)",
+ "allOf":
+ [
+ { "$ref": "#/definitions/requestHeaderStateTypeDetected" },
+ {
+ "type": "object",
+ "properties":
+ {
+ "value": { "type": "string"}
+ },
+ "required": ["value"]
+ }
+ ]
+ },
+
+ "requestHeaderStateTypeValidIfPresent":
+ {
+ "description": "True if State Type not detected (i.e., not present), or if both Type and State detected (i.e., State constraints met); note, State cannot be detected if State Type not detected.",
+ "oneOf":
+ [
+ { "not": { "$ref": "#/definitions/requestHeaderStateTypeDetected" } },
+ { "$ref": "#/definitions/requestHeaderStateDetected" }
+ ]
+ },
+
+ "refinedByDefined":
+ {
+ "title": "Definition: refinedBy",
+ "description": "True when object tested has no refinedBy, or has refinedBy identified by uri, or has refinedBy(s) with value matching one or more of the refinedBys described in the model (Section 4.2)",
+ "type": "object",
+ "properties":
+ {
+ "refinedBy":
+ {
+ "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "anyOf": [
+ {"$ref": "id.json#/definitions/idValueFound"},
+ {"$ref": "#/definitions/fragmentSelectorDetected"},
+ {"$ref": "#/definitions/cssSelectorDetected"},
+ {"$ref": "#/definitions/xpathSelectorDetected"},
+ {"$ref": "#/definitions/textQuoteSelectorDetected"},
+ {"$ref": "#/definitions/textPositionSelectorDetected"},
+ {"$ref": "#/definitions/dataPositionSelectorDetected"},
+ {"$ref": "#/definitions/rangeSelectorDetected"},
+ {"$ref": "#/definitions/svgSelectorDetected"},
+ {"$ref": "#/definitions/timeStateDetected"},
+ {"$ref": "#/definitions/requestHeaderStateDetected"}
+ ]
+ },
+ {
+ "type": "array",
+ "minItems": 1,
+ "items":
+ { "oneOf": [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "anyOf": [
+ {"$ref": "id.json#/definitions/idValueFound"},
+ {"$ref": "#/definitions/fragmentSelectorDetected"},
+ {"$ref": "#/definitions/cssSelectorDetected"},
+ {"$ref": "#/definitions/xpathSelectorDetected"},
+ {"$ref": "#/definitions/textQuoteSelectorDetected"},
+ {"$ref": "#/definitions/textPositionSelectorDetected"},
+ {"$ref": "#/definitions/dataPositionSelectorDetected"},
+ {"$ref": "#/definitions/rangeSelectorDetected"},
+ {"$ref": "#/definitions/svgSelectorDetected"},
+ {"$ref": "#/definitions/timeStateDetected"},
+ {"$ref": "#/definitions/requestHeaderStateDetected"}
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "checkForRefinedBy":
+ {
+ "description": "True if no state or selector, if no refinedBy, or if correct refinedBy",
+ "type": "object",
+ "patternProperties":
+ {
+ "^(state|selector)$":
+ {"oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "$ref": "#/definitions/refinedByDefined" },
+ { "type": "array",
+ "minItems": 1,
+ "items":
+ {"oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "type": "object",
+ "$ref": "#/definitions/refinedByDefined" }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "itemRefinedByValidIfPresent":
+ {
+ "description": "True if items in the items array of object tested have no refinedBy, or have a refinedBy that is uri, or have a refinedBy that has recognized value(s)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ { "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri" },
+ { "$ref": "#/definitions/checkForRefinedBy" }
+ ]
+ }
+ }
+ }
+ },
+
+ "refinedByDetected":
+ {
+ "title": "Detection: refinedBy ",
+ "description": "True when object tested has selector or state that has refinedBy(s) that is(are) recognized as being one or more of the refinedBys described in the model (Section 4.2)",
+ "type": "object",
+ "anyOf":
+ [
+ { "properties":
+ { "state" : { "$ref ": "#/definitions/refinedByWithinStateSelector" } },
+ "required": ["state"]
+ },
+ { "properties":
+ { "selector" : { "$ref ": "#/definitions/refinedByWithinStateSelector" } },
+ "required": ["selector"]
+ }
+ ]
+ },
+
+ "refinedByWithinStateSelector":
+ {
+ "oneOf":
+ [
+ { "type": "object",
+ "$ref": "#/definitions/refinedByDefined",
+ "required": ["refinedBy"]
+ },
+ { "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ {"not":
+ { "type": "object",
+ "$ref": "#/definitions/refinedByDefined",
+ "required": ["refinedBy"]
+ }
+ }
+ }
+ }
+ ]
+ },
+
+ "styleClassDefinition":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: styleClass property value",
+ "description": "True when the object has no styleClass property or has a styleClass property that appears with source and that is a string value or array of string values (Section 4.4)",
+ "properties":
+ {
+ "styleClass":
+ {
+ "oneOf":
+ [
+ { "type": "string" },
+ { "type": "array",
+ "minItems": 1,
+ "items": { "type": "string" } }
+ ]
+ }
+ },
+ "dependencies":
+ {
+ "styleClass": ["source"]
+ }
+ },
+
+ "styleClassDetected":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: styleClass key with qualifying body/target classes",
+ "description": "Supports implementation check of styleClass (if/when) used on Specific Resources (Sections 4.4)",
+ "type": "object",
+ "allOf": [
+ { "$ref": "#/definitions/styleClassDefinition" },
+ { "required": ["styleClass"] }
+ ]
+ },
+
+ "itemStyleClassPropertyDetected":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having styleClass key with qualifying body/target classes",
+ "description": "Supports implementation check of items having styleClass (if/when) used on Specific Resources (Sections 4.4)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/styleClassDetected" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "renderedViaDefinition":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: renderedVia property value",
+ "description": "True when the body/target has no renderedVia property or has a valid renderedVia property (Section 4.5)",
+ "type": "object",
+ "properties": {
+ "renderedVia":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri"},
+ { "$ref": "id.json#/definitions/idValueFound"},
+ { "type": "array",
+ "minItems": 1,
+ "items":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri"},
+ { "$ref": "id.json#/definitions/idValueFound"}
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+
+ "renderedViaDetected":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: renderedVia key with qualifying body/target classes",
+ "description": "Supports implementation check of renderedVia (if/when) used on Specific Resources (Sections 4.4)",
+ "allOf": [
+ { "$ref": "#/definitions/sourceDetected" },
+ { "required": ["renderedVia"] },
+ { "$ref": "#/definitions/renderedViaDefinition" }
+ ]
+ },
+
+ "itemRenderedViaPropertyDetected":
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: items having renderedVia key with qualifying body/target classes",
+ "description": "Supports implementation check of items having renderedVia (if/when) used on Specific Resources (Sections 4.4)",
+ "type": "object",
+ "properties":
+ {
+ "items":
+ {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ {
+ "items":
+ { "not": { "$ref": "#/definitions/renderedViaDetected" } }
+ }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "scopeDefinition":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Definition: scope property value",
+ "description": "True when the body/target has no scope property or has a valid scope property (Section 4.6)",
+ "type": "object",
+ "properties": {
+ "scope":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/stringUri"},
+ { "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "id.json#/definitions/stringUri"}
+ }
+ ]
+ }
+ }
+ },
+
+ "scopeDetected":
+ { "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Collate: scope key with qualifying body/target classes",
+ "description": "Supports implementation check of scope (if/when) used on Specific Resource Body (Sections 4.6)",
+ "allOf": [
+ {"required": ["scope"]},
+ {"$ref": "#/definitions/scopeDefinition"}
+ ]
+ },
+
+ "sourceWithCreated":
+ {
+ "description": "True if no source, or source is uri, or source is object that does not have created key, or if source is object that has only 1 created key of date-time format",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }
+ ]
+ }
+ }
+ },
+
+ "sourceWithModified":
+ {
+ "description": "True if no source, or source is uri, or source is object that does not have modified key, or if source is object that has only 1 modified key of date-time format",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }
+ ]
+ }
+ }
+ },
+
+ "sourceWithRights":
+ {
+ "description": "True if no source, or source is uri, or source is object that does not have rights key, or if source is object that has rights key with all values of uri format",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }
+ ]
+ }
+ }
+ },
+
+ "sourceWithCanonical":
+ {
+ "description": "True if no source, or source is uri, or source is object that does not have canonical key, or if source is object that has only 1 canonical key of uri format",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" }
+ ]
+ }
+ }
+ },
+
+ "sourceWithVia":
+ {
+ "description": "True if no source, or source is uri, or source is object that does not have via key, or if source is object that has via key with all values of uri format",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" }
+ ]
+ }
+ }
+ },
+
+ "sourceWithTextDirection":
+ {
+ "description": "True if no source, or source is uri, or source is object that does not have textDirection key, or if source is object that has only 1 textDirectoin key, one of ltr, rtl, auto",
+ "type": "object",
+ "properties":
+ {
+ "source":
+ {
+ "oneOf":
+ [
+ { "$ref": "id.json#/definitions/arraySingleStringUri" },
+ { "$ref": "bodyTarget.json#/definitions/textDirectionValidIfPresent" }
+ ]
+ }
+ }
+ },
+
+ "specificResourceWithItems" :
+ {
+ "description": "True if both source and items keys are present.",
+ "allOf":
+ [
+ { "$ref": "#/definitions/sourceDetected"},
+ { "required": [ "items" ] }
+ ]
+ },
+
+ "itemSRWithItems":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items": {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": {"not": { "$ref": "#/definitions/specificResourceWithItems" } } }
+ }
+ },
+ "required": ["items"]
+ },
+
+ "specificResourceWithValue" :
+ {
+ "description": "True if both source and value keys are present.",
+ "allOf":
+ [
+ { "$ref": "#/definitions/sourceDetected"},
+ { "required": [ "value" ] }
+ ]
+ },
+
+ "itemSRWithValue":
+ {
+ "type": "object",
+ "properties":
+ {
+ "items": {
+ "type": "array",
+ "minItems": 1,
+ "not":
+ { "items": {"not": { "$ref": "#/definitions/specificResourceWithValue" } } }
+ }
+ },
+ "required": ["items"]
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/testing/web-platform/tests/annotation-model/examples/README.md b/testing/web-platform/tests/annotation-model/examples/README.md
new file mode 100644
index 0000000000..2b9dbd5c5a
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/examples/README.md
@@ -0,0 +1,9 @@
+Example Tests
+=============
+
+The tests in this folder are examples to show how the framework
+should be used. They are NOT intended for conformance testing use, and
+tools/make_tests.py will not generate the tests in this folder without the
+`--examples` option.
+
+
diff --git a/testing/web-platform/tests/annotation-model/examples/example1.test b/testing/web-platform/tests/annotation-model/examples/example1.test
new file mode 100644
index 0000000000..bd844f2320
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/examples/example1.test
@@ -0,0 +1,10 @@
+{
+ "@context": "https://www.w3.org/ns/JSONtest-v1.jsonld",
+ "name": "Verify annotation conforms to the model",
+ "description": "Supply an example annotation that conforms to the basic structure.",
+ "ref": "https://www.w3.org/TR/annotation-model/#model",
+ "assertions": [
+ "exampleContext.json",
+ "exampleTarget.json"
+ ]
+}
diff --git a/testing/web-platform/tests/annotation-model/examples/example2.test b/testing/web-platform/tests/annotation-model/examples/example2.test
new file mode 100644
index 0000000000..03b7589b8c
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/examples/example2.test
@@ -0,0 +1,42 @@
+{
+ "@context": "https://www.w3.org/ns/JSONtest-v1.jsonld",
+ "name": "A test that has an 'or' clause",
+ "description": "This is a complex test that uses or-ing among a list of assertions.",
+ "ref": "https://www.w3.org/TR/annotation-model/#model",
+ "testType": "manual",
+ "assertions":
+ { "title": "Condition Object",
+ "description": "A pseudo-test that will get a result from the aggregate of its children",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "errorMessage": "Error: None of the various options were present",
+ "compareWith": "or",
+ "assertions": [
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "'The Annotation must have 1 or more @context values' (Section 3.1)",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "errorMessage": "Error: Annotation does not have an @context property.",
+ "type": "object",
+ "properties": {
+ "@context": {}
+ },
+ "required": ["@context"]
+ },
+ {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "'An Annotation should have exactly 1 id' (Section 3.1)",
+ "assertionType": "should",
+ "expectedResult": "valid",
+ "errorMessage": "Warning: The Annotation is not identified using the id key (Section 3.1).",
+ "type": "object",
+ "properties": {
+ "id": {}
+ },
+ "required": ["id"]
+ }
+ ]
+ }
+
+}
diff --git a/testing/web-platform/tests/annotation-model/examples/example3.test b/testing/web-platform/tests/annotation-model/examples/example3.test
new file mode 100644
index 0000000000..38263cd185
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/examples/example3.test
@@ -0,0 +1,8 @@
+{
+ "@context": "https://www.w3.org/ns/JSONtest-v1.jsonld",
+ "name": "Automated example test",
+ "description": "A test that runs with no user intervention",
+ "testType": "automated",
+ "assertions": [ "common/requiredProperties.json" ],
+ "content": "common/sampleContent2.jsonld"
+}
diff --git a/testing/web-platform/tests/annotation-model/examples/exampleContext.json b/testing/web-platform/tests/annotation-model/examples/exampleContext.json
new file mode 100644
index 0000000000..5b499296b9
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/examples/exampleContext.json
@@ -0,0 +1,31 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check @context value",
+ "description": "'http://www.w3.org/ns/anno.jsonld must be' an @context value (Section 3.1)",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "errorMessage": "Error: 'http://www.w3.org/ns/anno.jsonld' is not an @context value.",
+ "type": "object",
+ "properties": {
+ "@context": {
+ "oneOf": [
+ { "type": "string",
+ "$ref": "#/definitions/contextValue" },
+ { "type": "array",
+ "$ref": "#/definitions/contextArray" }
+ ]
+ }
+ },
+ "definitions": {
+ "contextValue":
+ { "enum": [ "http://www.w3.org/ns/anno.jsonld" ] },
+ "contextArray":
+ { "not":
+ { "items":
+ { "not":
+ { "type": "string",
+ "$ref": "#/definitions/contextValue" } }
+ }
+ }
+ }
+}
diff --git a/testing/web-platform/tests/annotation-model/examples/exampleTarget.json b/testing/web-platform/tests/annotation-model/examples/exampleTarget.json
new file mode 100644
index 0000000000..e8e6a78da0
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/examples/exampleTarget.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Check if target feature implemented",
+ "description": "'There must be 1 or more target relationships associated with an Annotation.' (Section 3.1)",
+ "assertionType": "must",
+ "expectedResult": "valid",
+ "errorMessage": "Error: Annotation has no target relationships - at least 1 is required. (Section 3.1)",
+ "type": "object",
+ "properties": {
+ "target": { "type": ["string", "array", "object"] }
+ },
+ "required": ["target"]
+}
diff --git a/testing/web-platform/tests/annotation-model/scripts/JSONtest.js b/testing/web-platform/tests/annotation-model/scripts/JSONtest.js
new file mode 100644
index 0000000000..3ee49b86a8
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/scripts/JSONtest.js
@@ -0,0 +1,803 @@
+/* globals add_completion_callback, Promise, showdown, done, assert_true, Ajv, on_event */
+
+/**
+ * Creates a JSONtest object. If the parameters are supplied
+ * it also loads a referenced testFile, processes that file, loads any
+ * referenced external assertions, and sets up event listeners to process the
+ * user's test data. The loading is done asynchronously via Promises. The test
+ * button's text is changed to Loading while it is processing, and to "Check
+ * JSON" once the data is loaded.
+ *
+ * @constructor
+ * @param {object} params
+ * @param {string} [params.test] - object containing JSON test definition
+ * @param {string} [params.testFile] - URI of a file with JSON test definition
+ * @param {string} params.runTest - IDREF of an element that when clicked will run the test
+ * @param {string} params.testInput - IDREF of an element that contains the JSON(-LD) to evaluate against the assertions in the test / testFile
+ * @event DOMContentLoaded Calls init once DOM is fully loaded
+ * @returns {object} Reference to the new object
+ */
+
+function JSONtest(params) {
+ 'use strict';
+
+ this.Assertions = []; // object that will contain the assertions to process
+ this.AssertionText = ""; // string that holds the titles of all the assertions in use
+ this.DescriptionText = "";
+ this.Base = null; // URI "base" for the test suite being run
+ this.TestDir = null; // URI "base" for the test case being run
+ this.Params = null; // paramaters passed in
+ this.Promise = null; // master Promise that resolves when intialization is complete
+ this.Properties = null; // testharness_properties from the opening window
+ this.SkipFailures = []; // list of assertionType values that should be skipped if their test would fail
+ this.Test = null; // test being run
+ this.AssertionCounter = 0;// keeps track of which assertion is being processed
+
+ this._assertionCache = [];// Array to put loaded assertions into
+ this._assertionText = []; // Array of text or nested arrays of assertions
+ this._loading = true;
+
+ showdown.extension('strip', function() {
+ return [
+ { type: 'output',
+ regex: /";
+ buildList(assertions.assertions, level+1) ;
+ this.AssertionText += "
";
+ // it is a nested list - recurse
+ buildList(assert, level+1) ;
+ this.AssertionText += "
\n";
+ } else if (typeof assert === "object" &&
+ !Array.isArray(assert) &&
+ assert.hasOwnProperty('assertions')) {
+ if (level === 0) {
+ list.push(assertContents[assertIdx]);
+ }
+ type = assertContents[assertIdx].hasOwnProperty('assertionType') ?
+ assertContents[assertIdx].assertionType : "must" ;
+
+ // ensure type defaults to must
+ if (!typeMap.hasOwnProperty(type)) {
+ type = "must";
+ }
+
+ // there is a condition object in the array
+ this.AssertionText += "";
+ buildList(assert, level+1) ; // capture the children too
+ this.AssertionText += "
" + this.AssertionText + "
\n";
+ }
+ } else {
+ window.alert("Loading did not finish before init handler was called!");
+ }
+
+ // @@@TODO@@@ implement the output showing handler
+ if (0 && this.Properties && this.Properties.output && closeButton) {
+ // set up a callback
+ add_completion_callback( function() {
+ var p = new Promise(function(resolve) {
+ closeButton.style.display = "inline";
+ closeButton.disabled = false;
+ on_event(closeButton, "click", function() {
+ resolve(true);
+ });
+ }.bind(this));
+ p.then();
+ }.bind(this));
+ }
+
+ if (runButton) {
+ on_event(runButton, "click", function() {
+ // user clicked
+ var content = testInput.value;
+ runButton.disabled = true;
+
+ // make sure content is an object
+ if (typeof content === "string") {
+ try {
+ content = JSON.parse(content) ;
+ } catch(err) {
+ // if the parsing failed, create a special test and mark it failed
+ test( function() {
+ assert_true(false, "Parse of JSON failed: " + err) ;
+ }, "Parsing submitted input");
+ // and just give up
+ done();
+ return ;
+ }
+ }
+
+ // iterate over all of the tests for this instance
+ this.runTests(this.Assertions, content);
+
+ // explicitly tell the test framework we are done
+ done();
+ }.bind(this));
+ }
+ },
+
+ // runTests - process tests
+ /**
+ * @param {object} assertions - List of assertions to process
+ * @param {string} content - JSON(-LD) to be evaluated
+ * @param {string} [testAction='continue'] - state of test processing (in parent when recursing)
+ * @param {integer} [level=0] - depth of recursion since assertion lists can nest
+ * @param {string} [compareWith='and'] - the way the results of the referenced assertions should be compared
+ * @returns {string} - the testAction resulting from evaluating all of the assertions
+ */
+ runTests: function(assertions, content, testAction, level, compareWith) {
+ 'use strict';
+
+ // level
+ if (level === undefined) {
+ level = 1;
+ }
+
+ // testAction
+ if (testAction === undefined) {
+ testAction = 'continue';
+ }
+
+ // compareWith
+ if (compareWith === undefined) {
+ compareWith = 'and';
+ }
+
+ var typeMap = {
+ 'must' : "",
+ 'may' : "INFORMATIONAL: ",
+ 'should' : "WARNING: "
+ };
+
+
+ // for each assertion (in order) load the external json schema if
+ // one is referenced, or use the inline schema if supplied
+ // validate content against the referenced schema
+
+ var theResults = [] ;
+
+ if (assertions) {
+
+ assertions.forEach( function(assert, num) {
+
+ var expected = assert.hasOwnProperty('expectedResult') ?
+ assert.expectedResult : 'valid' ;
+ var message = assert.hasOwnProperty('errorMessage') ?
+ assert.errorMessage : "Result was not " + expected;
+ var type = assert.hasOwnProperty('assertionType') ?
+ assert.assertionType.toLowerCase() : "must" ;
+ if (!typeMap.hasOwnProperty(type)) {
+ type = "must";
+ }
+
+ // first - what is the type of the assert
+ if (typeof assert === "object" && !Array.isArray(assert)) {
+ if (assert.hasOwnProperty("compareWith") && assert.hasOwnProperty("assertions") && Array.isArray(assert.assertions) ) {
+ // this is a comparisonObject
+ var r = this.runTests(assert.assertions, content, testAction, level+1, assert.compareWith);
+ // r is an object that contains, among other things, an array of results from the child assertions
+ testAction = r.action;
+
+ // evaluate the results against the compareWith setting
+ var result = true;
+ var data = r.results ;
+ var i;
+
+ if (assert.compareWith === "or") {
+ result = false;
+ for(i = 0; i < data.length; i++) {
+ if (data[i]) {
+ result = true;
+ }
+ }
+ } else {
+ for(i = 0; i < data.length; i++) {
+ if (!data[i]) {
+ result = false;
+ }
+ }
+ }
+
+ // create a test and push the result
+ test(function() {
+ var newAction = this.determineAction(assert, result) ;
+ // next time around we will use this action
+ testAction = newAction;
+
+ var err = ";";
+
+ if (testAction === 'abort') {
+ err += "; Aborting execution of remaining assertions;";
+ } else if (testAction === 'skip') {
+ err += "; Skipping execution of remaining assertions at level " + level + ";";
+ }
+
+ if (result === false) {
+ // test result was unexpected; use message
+ assert_true(result, message + err);
+ } else {
+ assert_true(result, err) ;
+ }
+ }.bind(this), "" + level + ":" + (num+1) + " " + assert.title);
+ // we are going to return out of this
+ return;
+ }
+ } else if (typeof assert === "object" && Array.isArray(assert)) {
+ // it is a nested list - recurse
+ var o = this.runTests(assert, content, testAction, level+1);
+ if (o.result && o.result === 'abort') {
+ // we are bailing out
+ testAction = 'abort';
+ }
+ }
+
+ if (testAction === 'abort') {
+ return {action: 'abort' };
+ }
+
+ var schemaName = "inline " + level + ":" + (num+1);
+
+ if (typeof assert === "string") {
+ // the assertion passed in is a file name; find it in the cache
+ if (this._assertionCache[assert]) {
+ assert = this._assertionCache[assert];
+ } else {
+ test( function() {
+ assert_true(false, "Reference to assertion " + assert + " at level " + level + ":" + (num+1) + " unresolved") ;
+ }, "Processing " + assert);
+ return ;
+ }
+ }
+
+ if (assert.assertionFile) {
+ schemaName = "external file " + assert.assertionFile + " " + level + ":" + (num+1);
+ }
+
+ var validate = null;
+
+ try {
+ validate = this.ajv.compile(assert);
+ }
+ catch(err) {
+ test( function() {
+ assert_true(false, "Compilation of schema " + level + ":" + (num+1) + " failed: " + err) ;
+ }, "Compiling " + schemaName);
+ return ;
+ }
+
+ if (testAction === 'continue') {
+ // a previous test told us to not run this test; skip it
+ // test(function() { }, "SKIPPED: " + assert.title);
+ // start an actual sub-test
+ var valid = validate(content) ;
+
+ var theResult = this.determineResult(assert, valid) ;
+
+ // remember the result
+ theResults.push(theResult);
+
+ var newAction = this.determineAction(assert, theResult) ;
+ // next time around we will use this action
+ testAction = newAction;
+
+ // only run the test if we are NOT skipping fails for some types
+ // or the result is expected
+ if ( theResult === true || !this.SkipFailures.includes(type) ) {
+ test(function() {
+ var err = ";";
+ if (validate.errors !== null && !assert.hasOwnProperty("errorMessage")) {
+ err = "; Errors: " + this.ajv.errorsText(validate.errors) + ";" ;
+ }
+ if (testAction === 'abort') {
+ err += "; Aborting execution of remaining assertions;";
+ } else if (testAction === 'skip') {
+ err += "; Skipping execution of remaining assertions at level " + level + ";";
+ }
+ if (theResult === false) {
+ // test result was unexpected; use message
+ assert_true(theResult, typeMap[type] + message + err);
+ } else {
+ assert_true(theResult, err) ;
+ }
+ }.bind(this), "" + level + ":" + (num+1) + " " + assert.title);
+ }
+ }
+ }.bind(this));
+ }
+
+ return { action: testAction, results: theResults} ;
+ },
+
+ determineResult: function(schema, valid) {
+ 'use strict';
+ var r = 'valid' ;
+ if (schema.hasOwnProperty('expectedResult')) {
+ r = schema.expectedResult;
+ }
+
+ if (r === 'valid' && valid || r === 'invalid' && !valid) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ determineAction: function(schema, result) {
+ 'use strict';
+ // mapping from results to actions
+ var mapping = {
+ 'failAndContinue' : 'continue',
+ 'failAndSkip' : 'skip',
+ 'failAndAbort' : 'abort',
+ 'passAndContinue': 'continue',
+ 'passAndSkip' : 'skip',
+ 'passAndAbort' : 'abort'
+ };
+
+ // if the result was as expected, then just keep going
+ if (result) {
+ return 'continue';
+ }
+
+ var a = 'failAndContinue';
+
+ if (schema.hasOwnProperty('onUnexpectedResult')) {
+ a = schema.onUnexpectedResult;
+ }
+
+ if (mapping[a]) {
+ return mapping[a];
+ } else {
+ return 'continue';
+ }
+ },
+
+ // loadAssertion - load an Assertion from an external JSON file
+ //
+ // returns a promise that resolves with the contents of the assertion file
+
+ loadAssertion: function(afile) {
+ 'use strict';
+ if (typeof(afile) === 'string') {
+ var theFile = this._parseURI(afile);
+ // it is a file reference - load it
+ return new Promise(function(resolve, reject) {
+ this._loadFile("GET", theFile, true)
+ .then(function(data) {
+ data.assertionFile = afile;
+ this._assertionCache[afile] = data;
+ resolve(data);
+ }.bind(this))
+ .catch(function(err) {
+ if (typeof err === "object") {
+ err.theFile = theFile;
+ }
+ reject(err);
+ });
+ }.bind(this));
+ }
+ else if (afile.hasOwnProperty("assertionFile")) {
+ // this object is referecing an external assertion
+ return new Promise(function(resolve, reject) {
+ var theFile = this._parseURI(afile.assertionFile);
+ this._loadFile("GET", theFile, true)
+ .then(function(external) {
+ // okay - we have an external object
+ Object.keys(afile).forEach(function(key) {
+ if (key !== 'assertionFile') {
+ external[key] = afile[key];
+ }
+ });
+ resolve(external);
+ }.bind(this))
+ .catch(function(err) {
+ if (typeof err === "object") {
+ err.theFile = theFile;
+ }
+ reject(err);
+ });
+ }.bind(this));
+ } else {
+ // it is already a loaded assertion - just use it
+ return new Promise(function(resolve) {
+ resolve(afile);
+ });
+ }
+ },
+
+ // loadDefinition - load a JSON Schema definition from an external JSON file
+ //
+ // returns a promise that resolves with the contents of the definition file
+
+ loadDefinition: function(dfile) {
+ 'use strict';
+ return new Promise(function(resolve, reject) {
+ this._loadFile("GET", this._parseURI(dfile), true)
+ .then(function(data) {
+ resolve(data);
+ }.bind(this))
+ .catch(function(err) {
+ reject(err);
+ });
+ }.bind(this));
+ },
+
+
+ // loadTest - load a test from an external JSON file
+ //
+ // returns a promise that resolves with the contents of the
+ // test
+
+ loadTest: function(params) {
+ 'use strict';
+
+ if (params.hasOwnProperty('testFile')) {
+ // the test is referred to by a file name
+ return this._loadFile("GET", params.testFile);
+ } // else
+ return new Promise(function(resolve, reject) {
+ if (params.hasOwnProperty('test')) {
+ resolve(params.test);
+ } else {
+ reject("Must supply a 'test' or 'testFile' parameter");
+ }
+ });
+ },
+
+ _parseURI: function(theURI) {
+ 'use strict';
+ // determine what the top level URI should be
+ if (theURI.indexOf('/') === -1) {
+ // no slash - it's relative to where we are
+ // so just use it
+ return this.TestDir + theURI;
+ } else if (theURI.indexOf('/') === 0 || theURI.indexOf('http:') === 0 || theURI.indexOf('https:') === 0) {
+ // it is an absolute URI so just use it
+ return theURI;
+ } else {
+ // it is relative and contains a slash.
+ // make it relative to the current test root
+ return this.Base + theURI;
+ }
+ },
+
+ /**
+ * return a list of all inline assertions or references
+ *
+ * @param {array} assertions list of assertions to examine
+ */
+
+ _assertionRefs: function(assertions) {
+ 'use strict';
+ var ret = [] ;
+
+ // when the reference is to an object that has an array of assertions in it (a conditionObject)
+ // then remember that one and loop over its embedded assertions
+ if (typeof(assertions) === "object" && !Array.isArray(assertions) && assertions.hasOwnProperty('assertions')) {
+ ret.push(assertions) ;
+ assertions = assertions.assertions;
+ }
+ if (typeof(assertions) === "object" && Array.isArray(assertions)) {
+ assertions.forEach( function(assert) {
+ // first - what is the type of the assert
+ if (typeof assert === "object" && Array.isArray(assert)) {
+ // it is a nested list - recurse
+ this._assertionRefs(assert).forEach( function(item) {
+ ret.push(item);
+ }.bind(this));
+ } else if (typeof assert === "object") {
+ ret.push(assert) ;
+ if (assert.hasOwnProperty("assertions")) {
+ // there are embedded assertions; get those too
+ ret.concat(this._assertionRefs(assert.assertions));
+ }
+ } else {
+ // it is a file name
+ ret.push(assert) ;
+ }
+ }.bind(this));
+ }
+ return ret;
+ },
+
+ // _loadFile - return a promise loading a file
+ //
+ _loadFile: function(method, url, parse) {
+ 'use strict';
+ if (parse === undefined) {
+ parse = true;
+ }
+
+ return new Promise(function (resolve, reject) {
+ if (document.location.search) {
+ var s = document.location.search;
+ s = s.replace(/^\?/, '');
+ if (url.indexOf('?') !== -1) {
+ url += "&" + s;
+ } else {
+ url += "?" + s;
+ }
+ }
+ var xhr = new XMLHttpRequest();
+ xhr.open(method, url);
+ xhr.onload = function () {
+ if (this.status >= 200 && this.status < 300) {
+ var d = xhr.response;
+ if (parse) {
+ try {
+ d = JSON.parse(d);
+ resolve(d);
+ }
+ catch(err) {
+ reject({ status: this.status,
+ statusText: "Parsing of " + url + " failed: " + err }
+ );
+ }
+ } else {
+ resolve(d);
+ }
+ } else {
+ reject({
+ status: this.status,
+ statusText: xhr.statusText
+ });
+ }
+ };
+ xhr.onerror = function () {
+ reject({
+ status: this.status,
+ statusText: xhr.statusText
+ });
+ };
+ xhr.send();
+ });
+ },
+
+};
diff --git a/testing/web-platform/tests/annotation-model/scripts/ajv.min.js b/testing/web-platform/tests/annotation-model/scripts/ajv.min.js
new file mode 100644
index 0000000000..7d8ef758d6
--- /dev/null
+++ b/testing/web-platform/tests/annotation-model/scripts/ajv.min.js
@@ -0,0 +1,6 @@
+/* ajv 4.0.4: Another JSON Schema Validator */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.Ajv=e()}}(function(){var define,module,exports;return function e(r,t,a){function s(i,n){if(!t[i]){if(!r[i]){var l="function"==typeof require&&require;if(!n&&l)return l(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var h=t[i]={exports:{}};r[i][0].call(h.exports,function(e){var t=r[i][1][e];return s(t?t:e)},h,h.exports,e,r,t,a)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;a.length>i;i++)s(a[i]);return s}({1:[function(require,module,exports){"use strict";function setupAsync(e,r){r!==!1&&(r=!0);var t,a=e.async,s=e.transpile;switch(typeof s){case"string":var o=TRANSPILE[s];if(!o)throw new Error("bad transpiler: "+s);return e._transpileFunc=o(e,r);case"undefined":case"boolean":if("string"==typeof a){if(t=ASYNC[a],!t)throw new Error("bad async mode: "+a);return e.transpile=t(e,r)}for(var i=0;MODES.length>i;i++){var n=MODES[i];if(setupAsync(n,!1))return util.copy(n,e),e.transpile}throw new Error("generators, nodent and regenerator are not available");case"function":return e._transpileFunc=e.transpile;default:throw new Error("bad transpiler: "+s)}}function checkGenerators(opts,required){try{return eval("(function*(){})()"),!0}catch(e){if(required)throw new Error("generators not supported")}}function checkAsyncFunction(opts,required){try{return eval("(async function(){})()"),!0}catch(e){if(required)throw new Error("es7 async functions not supported")}}function getRegenerator(e,r){try{return regenerator||(regenerator=require("regenerator"),regenerator.runtime()),e.async&&e.async!==!0||(e.async="es7"),regeneratorTranspile}catch(t){if(r)throw new Error("regenerator not available")}}function regeneratorTranspile(e){return regenerator.compile(e).code}function getNodent(e,r){try{return nodent||(nodent=require("nodent")({log:!1,dontInstallRequireHook:!0})),"es7"!=e.async&&(e.async&&e.async!==!0&&console.warn("nodent transpiles only es7 async functions"),e.async="es7"),nodentTranspile}catch(t){if(r)throw new Error("nodent not available")}}function nodentTranspile(e){return nodent.compile(e,"",{promises:!0,sourcemap:!1}).code}function compileAsync(e,r){function t(e,r,a){function o(a){function o(a,o){if(a)return r(a);if(!s._refs[i]&&!s._schemas[i])try{s.addSchema(o,i)}catch(n){return void r(n)}t(e,r)}var i=a.missingSchema;if(s._refs[i]||s._schemas[i])return r(new Error("Schema "+i+" is loaded but"+a.missingRef+"cannot be resolved"));var n=s._loadingSchemas[i];n?"function"==typeof n?s._loadingSchemas[i]=[n,o]:n[n.length]=o:(s._loadingSchemas[i]=o,s._opts.loadSchema(i,function(e,r){var t=s._loadingSchemas[i];if(delete s._loadingSchemas[i],"function"==typeof t)t(e,r);else for(var a=0;t.length>a;a++)t[a](e,r)}))}function i(e,t){return a?void setTimeout(function(){r(e,t)}):r(e,t)}var n;try{n=s.compile(e)}catch(l){return void(l.missingSchema?o(l):i(l))}i(null,n)}var a,s=this;try{a=this._addSchema(e)}catch(o){return void setTimeout(function(){r(o)})}if(a.validate)setTimeout(function(){r(null,a.validate)});else{if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");t(e,r,!0)}}module.exports={setup:setupAsync,compile:compileAsync};var util=require("./compile/util"),ASYNC={"*":checkGenerators,"co*":checkGenerators,es7:checkAsyncFunction},TRANSPILE={nodent:getNodent,regenerator:getRegenerator},MODES=[{async:"co*"},{async:"es7",transpile:"nodent"},{async:"co*",transpile:"regenerator"}],regenerator,nodent},{"./compile/util":10}],2:[function(e,r,t){"use strict";var a=r.exports=function(){this._cache={}};a.prototype.put=function(e,r){this._cache[e]=r},a.prototype.get=function(e){return this._cache[e]},a.prototype.del=function(e){delete this._cache[e]},a.prototype.clear=function(){this._cache={}}},{}],3:[function(e,r,t){"use strict";r.exports={$ref:e("../dotjs/ref"),allOf:e("../dotjs/allOf"),anyOf:e("../dotjs/anyOf"),dependencies:e("../dotjs/dependencies"),"enum":e("../dotjs/enum"),format:e("../dotjs/format"),items:e("../dotjs/items"),maximum:e("../dotjs/_limit"),minimum:e("../dotjs/_limit"),maxItems:e("../dotjs/_limitItems"),minItems:e("../dotjs/_limitItems"),maxLength:e("../dotjs/_limitLength"),minLength:e("../dotjs/_limitLength"),maxProperties:e("../dotjs/_limitProperties"),minProperties:e("../dotjs/_limitProperties"),multipleOf:e("../dotjs/multipleOf"),not:e("../dotjs/not"),oneOf:e("../dotjs/oneOf"),pattern:e("../dotjs/pattern"),properties:e("../dotjs/properties"),required:e("../dotjs/required"),uniqueItems:e("../dotjs/uniqueItems"),validate:e("../dotjs/validate")}},{"../dotjs/_limit":13,"../dotjs/_limitItems":14,"../dotjs/_limitLength":15,"../dotjs/_limitProperties":16,"../dotjs/allOf":17,"../dotjs/anyOf":18,"../dotjs/dependencies":20,"../dotjs/enum":21,"../dotjs/format":22,"../dotjs/items":23,"../dotjs/multipleOf":24,"../dotjs/not":25,"../dotjs/oneOf":26,"../dotjs/pattern":27,"../dotjs/properties":29,"../dotjs/ref":30,"../dotjs/required":31,"../dotjs/uniqueItems":33,"../dotjs/validate":34}],4:[function(e,r,t){"use strict";r.exports=function a(e,r){if(e===r)return!0;var t,s=Array.isArray(e),o=Array.isArray(r);if(s&&o){if(e.length!=r.length)return!1;for(t=0;e.length>t;t++)if(!a(e[t],r[t]))return!1;return!0}if(s!=o)return!1;if(e&&r&&"object"==typeof e&&"object"==typeof r){var i=Object.keys(e);if(i.length!==Object.keys(r).length)return!1;for(t=0;i.length>t;t++)if(void 0===r[i[t]])return!1;for(t=0;i.length>t;t++)if(!a(e[i[t]],r[i[t]]))return!1;return!0}return!1}},{}],5:[function(e,r,t){"use strict";function a(e){e="full"==e?"full":"fast";var r=d.copy(a[e]);for(var t in a.compare)r[t]={validate:r[t],compare:a.compare[t]};return r}function s(e){var r=e.match(p);if(!r)return!1;var t=+r[1],a=+r[2];return t>=1&&12>=t&&a>=1&&m[t]>=a}function o(e,r){var t=e.match(v);if(!t)return!1;var a=t[1],s=t[2],o=t[3],i=t[5];return 23>=a&&59>=s&&59>=o&&(!r||i)}function i(e){var r=e.split(w);return s(r[0])&&o(r[1],!0)}function n(e){return 255>=e.length&&y.test(e)}function l(e){return j.test(e)&&g.test(e)}function c(e){try{return new RegExp(e),!0}catch(r){return!1}}function h(e,r){return e&&r?e>r?1:r>e?-1:e===r?0:void 0:void 0}function u(e,r){return e&&r&&(e=e.match(v),r=r.match(v),e&&r)?(e=e[1]+e[2]+e[3]+(e[4]||""),r=r[1]+r[2]+r[3]+(r[4]||""),e>r?1:r>e?-1:e===r?0:void 0):void 0}function f(e,r){if(e&&r){e=e.split(w),r=r.split(w);var t=h(e[0],r[0]);if(void 0!==t)return t||u(e[1],r[1])}}var d=e("./util"),p=/^\d\d\d\d-(\d\d)-(\d\d)$/,m=[0,31,29,31,30,31,30,31,31,30,31,30,31],v=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,y=/^[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?(\.[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?)*$/i,g=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,P=/^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,E=/^(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)+)*(?:\/)?$/i,b=/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?)$/;r.exports=a,a.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,email:/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:y,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:c,uuid:P,"json-pointer":E,"relative-json-pointer":b},a.full={date:s,time:o,"date-time":i,uri:l,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:n,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:c,uuid:P,"json-pointer":E,"relative-json-pointer":b},a.compare={date:h,time:u,"date-time":f};var w=/t|\s/i,j=/\/|\:/},{"./util":10}],6:[function(require,module,exports){"use strict";function compile(schema,root,localRefs,baseId){function localCompile(_schema,_root,localRefs,baseId){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs,baseId);var $async=_schema.$async===!0;$async&&!opts.transpile&&async.setup(opts);var sourceCode=validateGenerator({isTop:!0,schema:_schema,isRoot:isRoot,baseId:baseId,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',RULES:RULES,validate:validateGenerator,util:util,resolve:resolve,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:opts,formats:formats,self:self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode,opts.beautify&&(beautify?sourceCode=beautify(sourceCode,opts.beautify):console.error('"npm install js-beautify" to use beautify option'));var validate,validateCode,transpile=opts._transpileFunc;try{validateCode=$async&&transpile?transpile(sourceCode):sourceCode,eval(validateCode),refVal[0]=validate}catch(e){throw console.error("Error compiling schema, function code:",validateCode),e}return validate.schema=_schema,validate.errors=null,validate.refs=refs,validate.refVal=refVal,validate.root=isRoot?validate:_root,$async&&(validate.$async=!0),validate.sourceCode=sourceCode,validate}function resolveRef(e,r,t){r=resolve.url(e,r);var a,s,o=refs[r];if(void 0!==o)return a=refVal[o],s="refVal["+o+"]",resolvedRef(a,s);if(!t){var i=root.refs[r];if(void 0!==i)return a=root.refVal[i],s=addLocalRef(r,a),resolvedRef(a,s)}s=addLocalRef(r);var n=resolve.call(self,localCompile,root,r);if(!n){var l=localRefs&&localRefs[r];l&&(n=resolve.inlineRef(l,opts.inlineRefs)?l:compile.call(self,l,root,localRefs,e))}return n?(replaceLocalRef(r,n),resolvedRef(n,s)):void 0}function addLocalRef(e,r){var t=refVal.length;return refVal[t]=r,refs[e]=t,"refVal"+t}function replaceLocalRef(e,r){var t=refs[e];refVal[t]=r}function resolvedRef(e,r){return"object"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&e.$async}}function usePattern(e){var r=patternsHash[e];return void 0===r&&(r=patternsHash[e]=patterns.length,patterns[r]=e),"pattern"+r}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return util.toQuotedString(e);case"object":if(null===e)return"null";var r=stableStringify(e),t=defaultsHash[r];return void 0===t&&(t=defaultsHash[r]=defaults.length,defaults[t]=e),"default"+t}}function useCustomRule(e,r,t,a){var s,o=e.definition.compile,i=e.definition.inline,n=e.definition.macro;o?s=o.call(self,r,t):n?(s=n.call(self,r,t),opts.validateSchema!==!1&&self.validateSchema(s,!0)):s=i?i.call(self,a,e.keyword,r,t):e.definition.validate;var l=customRules.length;return customRules[l]=s,{code:"customRule"+l,validate:s}}var self=this,opts=this._opts,refVal=[void 0],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];root=root||{schema:schema,refVal:refVal,refs:refs};var formats=this._formats,RULES=this.RULES;return localCompile(schema,root,localRefs,baseId)}function patternCode(e,r){return"var pattern"+e+" = new RegExp("+util.toQuotedString(r[e])+");"}function defaultCode(e){return"var default"+e+" = defaults["+e+"];"}function refValCode(e,r){return r[e]?"var refVal"+e+" = refVal["+e+"];":""}function customRuleCode(e){return"var customRule"+e+" = customRules["+e+"];"}function vars(e,r){if(!e.length)return"";for(var t="",a=0;e.length>a;a++)t+=r(a,e);return t}var resolve=require("./resolve"),util=require("./util"),stableStringify=require("json-stable-stringify"),async=require("../async"),beautify=function(){try{return require("js-beautify").js_beautify}catch(e){}}(),validateGenerator=require("../dotjs/validate");module.exports=compile;var co=require("co"),ucs2length=util.ucs2length,equal=require("./equal"),ValidationError=require("./validation_error")},{"../async":1,"../dotjs/validate":34,"./equal":4,"./resolve":7,"./util":10,"./validation_error":11,co:39,"json-stable-stringify":40}],7:[function(e,r,t){"use strict";function a(e,r,t){var o=this._refs[t];if("string"==typeof o){if(!this._refs[o])return a.call(this,e,r,o);o=this._refs[o]}if(o=o||this._schemas[t],o instanceof g)return n(o.schema,this._opts.inlineRefs)?o.schema:o.validate||this._compile(o);var i,l,c,h=s.call(this,r,t);return h&&(i=h.schema,r=h.root,c=h.baseId),i instanceof g?l=i.validate||e.call(this,i.schema,r,void 0,c):i&&(l=n(i,this._opts.inlineRefs)?i:e.call(this,i,r,void 0,c)),l}function s(e,r){var t=m.parse(r,!1,!0),a=u(t),s=h(e.schema.id);if(a!==s){var n=f(a),l=this._refs[n];if("string"==typeof l)return o.call(this,e,l,t);if(l instanceof g)l.validate||this._compile(l),e=l;else if(l=this._schemas[n],l instanceof g){if(l.validate||this._compile(l),n==f(r))return{schema:l,root:e,baseId:s};e=l}if(!e.schema)return;s=h(e.schema.id)}return i.call(this,t,s,e.schema,e)}function o(e,r,t){var a=s.call(this,e,r);if(a){var o=a.schema,n=a.baseId;return e=a.root,o.id&&(n=d(n,o.id)),i.call(this,t,n,o,e)}}function i(e,r,t,a){if(e.hash=e.hash||"","#/"==e.hash.slice(0,2)){for(var o=e.hash.split("/"),i=1;o.length>i;i++){var n=o[i];if(n){if(n=y.unescapeFragment(n),t=t[n],!t)break;if(t.id&&!P[n]&&(r=d(r,t.id)),t.$ref){var l=d(r,t.$ref),c=s.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return t&&t!=a.schema?{schema:t,root:a,baseId:r}:void 0}}function n(e,r){return r===!1?!1:void 0===r||r===!0?l(e):r?c(e)<=r:void 0}function l(e){var r;if(Array.isArray(e)){for(var t=0;e.length>t;t++)if(r=e[t],"object"==typeof r&&!l(r))return!1}else for(var a in e){if("$ref"==a)return!1;if(r=e[a],"object"==typeof r&&!l(r))return!1}return!0}function c(e){var r,t=0;if(Array.isArray(e)){for(var a=0;e.length>a;a++)if(r=e[a],"object"==typeof r&&(t+=c(r)),t==1/0)return 1/0}else for(var s in e){if("$ref"==s)return 1/0;if(E[s])t++;else if(r=e[s],"object"==typeof r&&(t+=c(r)+1),t==1/0)return 1/0}return t}function h(e,r){r!==!1&&(e=f(e));var t=m.parse(e,!1,!0);return u(t)}function u(e){return(e.protocol||"")+(e.protocol?"//":"")+(e.host||"")+(e.path||"")+"#"}function f(e){return e?e.replace(b,""):""}function d(e,r){return r=f(r),m.resolve(e,r)}function p(e){function r(e,t,s){if(Array.isArray(e))for(var o=0;e.length>o;o++)r.call(this,e[o],t+"/"+o,s);else if(e&&"object"==typeof e){if("string"==typeof e.id){var i=s=s?m.resolve(s,e.id):e.id;i=f(i);var n=this._refs[i];if("string"==typeof n&&(n=this._refs[n]),n&&n.schema){if(!v(e,n.schema))throw new Error('id "'+i+'" resolves to more than one schema')}else if(i!=f(t))if("#"==i[0]){if(a[i]&&!v(e,a[i]))throw new Error('id "'+i+'" resolves to more than one schema');a[i]=e}else this._refs[i]=t}for(var l in e)r.call(this,e[l],t+"/"+y.escapeFragment(l),s)}}var t=f(e.id),a={};return r.call(this,e,h(t,!1),t),a}var m=e("url"),v=e("./equal"),y=e("./util"),g=e("./schema_obj");r.exports=a,a.normalizeId=f,a.fullPath=h,a.url=d,a.ids=p,a.inlineRef=n;var P=y.toHash(["properties","patternProperties","enum","dependencies","definitions"]),E=y.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]),b=/#\/?$/},{"./equal":4,"./schema_obj":9,"./util":10,url:48}],8:[function(e,r,t){"use strict";var a=e("./_rules"),s=e("./util");r.exports=function(){var e=[{type:"number",rules:["maximum","minimum","multipleOf"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","uniqueItems","items"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","properties"]},{rules:["$ref","enum","not","anyOf","oneOf","allOf"]}];return e.all=["type","additionalProperties","patternProperties"],e.keywords=["additionalItems","$schema","id","title","description","default"],e.types=["number","integer","string","array","object","boolean","null"],e.forEach(function(r){r.rules=r.rules.map(function(r){return e.all.push(r),{keyword:r,code:a[r]}})}),e.keywords=s.toHash(e.all.concat(e.keywords)),e.all=s.toHash(e.all),e.types=s.toHash(e.types),e}},{"./_rules":3,"./util":10}],9:[function(e,r,t){"use strict";function a(e){s.copy(e,this)}var s=e("./util");r.exports=a},{"./util":10}],10:[function(e,r,t){"use strict";function a(e,r){r=r||{};for(var t in e)r[t]=e[t];return r}function s(e,r,t){var a=t?" !== ":" === ",s=t?" || ":" && ",o=t?"!":"",i=t?"":"!";switch(e){case"null":return r+a+"null";case"array":return o+"Array.isArray("+r+")";case"object":return"("+o+r+s+"typeof "+r+a+'"object"'+s+i+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+a+'"number"'+s+i+"("+r+" % 1))";default:return"typeof "+r+a+'"'+e+'"'}}function o(e,r){switch(e.length){case 1:return s(e[0],r,!0);default:var t="",a=n(e);a.array&&a.object&&(t=a["null"]?"(":"(!"+r+" || ",t+="typeof "+r+' !== "object")',delete a["null"],delete a.array,delete a.object),a.number&&delete a.integer;for(var o in a)t+=(t?" && ":"")+s(o,r,!0);return t}}function i(e){if(Array.isArray(e)){for(var r=[],t=0;e.length>t;t++){var a=e[t];x[a]&&(r[r.length]=a)}if(r.length)return r}else if(x[e])return[e]}function n(e){for(var r={},t=0;e.length>t;t++)r[e[t]]=!0;return r}function l(e){return"number"==typeof e?"["+e+"]":S.test(e)?"."+e:"['"+e.replace(_,"\\$&")+"']"}function c(e){return e.replace(_,"\\$&")}function h(e){for(var r,t=0,a=e.length,s=0;a>s;)t++,r=e.charCodeAt(s++),r>=55296&&56319>=r&&a>s&&(r=e.charCodeAt(s),56320==(64512&r)&&s++);return t}function u(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0}function f(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")}function d(e){return e.replace(R,"").replace(O,"").replace(I,"if (!($1))")}function p(e,r){var t=e.match(k);return t&&2===t.length?r?e.replace(q,"").replace(D,V):e.replace(A,"").replace(L,C):e}function m(e,r){for(var t in e)if(r[t])return!0}function v(e){return"'"+c(e)+"'"}function y(e,r,t,a){var s=t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'";return E(e,s)}function g(e,r,t){var a=v(t?"/"+j(r):l(r));return E(e,a)}function P(e,r,t){var a=e.match(U);if(!a)throw new Error("Invalid relative JSON-pointer: "+e);var s=+a[1],o=a[2];if("#"==o){if(s>=r)throw new Error("Cannot access property/index "+s+" levels up, current level is "+r);return t[r-s]}if(s>r)throw new Error("Cannot access data "+s+" levels up, current level is "+r);var i="data"+(r-s||"");if(!o)return i;for(var n=i,c=o.split("/"),h=0;c.length>h;h++){var u=c[h];u&&(i+=l($(u)),n+=" && "+i)}return n}function E(e,r){return'""'==e?r:(e+" + "+r).replace(/' \+ '/g,"")}function b(e){return $(decodeURIComponent(e))}function w(e){return encodeURIComponent(j(e))}function j(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function $(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}r.exports={copy:a,checkDataType:s,checkDataTypes:o,coerceToTypes:i,toHash:n,getProperty:l,escapeQuotes:c,ucs2length:h,varOccurences:u,varReplace:f,cleanUpCode:d,cleanUpVarErrors:p,schemaHasRules:m,stableStringify:e("json-stable-stringify"),toQuotedString:v,getPathExpr:y,getPath:g,getData:P,unescapeFragment:b,escapeFragment:w,escapeJsonPointer:j};var x=n(["string","number","integer","boolean","null"]),S=/^[a-z$_][a-z$_0-9]*$/i,_=/'|\\/g,R=/else\s*{\s*}/g,O=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,I=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g,k=/[^v\.]errors/g,A=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,q=/var errors = 0;|var vErrors = null;/g,L="return errors === 0;",C="validate.errors = null; return true;",D=/if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/,V="return true;",U=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/},{"json-stable-stringify":40}],11:[function(e,r,t){"use strict";function a(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}r.exports=a,a.prototype=Object.create(Error.prototype),a.prototype.constructor=a},{}],12:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s;if(a+="var "+u+" = undefined;",e.opts.format===!1)return a+=" "+u+" = true; ";var f=e.schema.format,d=e.opts.v5&&f.$data,p="";if(d){var m=e.util.getData(f.$data,o,e.dataPathArr),v="format"+s,y="compare"+s;a+=" var "+v+" = formats["+m+"] , "+y+" = "+v+" && "+v+".compare;"}else{var v=e.formats[f];if(!v||!v.compare)return a+=" "+u+" = true; ";var y="formats"+e.util.getProperty(f)+".compare"}var g="formatMaximum"==r,P="formatExclusive"+(g?"Maximum":"Minimum"),E=e.schema[P],b=e.opts.v5&&E&&E.$data,w=g?"<":">",j="result"+s,$=e.opts.v5&&i.$data,x=$?e.util.getData(i.$data,o,e.dataPathArr):i;if($&&(a+=" var schema"+s+" = "+x+"; ",x="schema"+s),b){var S=e.util.getData(E.$data,o,e.dataPathArr),_="exclusive"+s,R="op"+s,O="' + "+R+" + '";a+=" var schemaExcl"+s+" = "+S+"; ",S="schemaExcl"+s,a+=" if (typeof "+S+" != 'boolean' && "+S+" !== undefined) { "+u+" = false; ";var t=P,I=I||[];I.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: '"+P+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var k=a;a=I.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+k+"]); ":" validate.errors = ["+k+"]; return false; ":" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(p+="}",a+=" else { "),$&&(a+=" if ("+x+" === undefined) "+u+" = true; else if (typeof "+x+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+j+" = "+y+"("+h+", ",a+=$?""+x:""+e.util.toQuotedString(i),a+=" ); if ("+j+" === undefined) "+u+" = false; var "+_+" = "+S+" === true; if ("+u+" === undefined) { "+u+" = "+_+" ? "+j+" "+w+" 0 : "+j+" "+w+"= 0; } if (!"+u+") var op"+s+" = "+_+" ? '"+w+"' : '"+w+"=';"}else{var _=E===!0,O=w;_||(O+="=");var R="'"+O+"'";$&&(a+=" if ("+x+" === undefined) "+u+" = true; else if (typeof "+x+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+j+" = "+y+"("+h+", ",a+=$?""+x:""+e.util.toQuotedString(i),a+=" ); if ("+j+" === undefined) "+u+" = false; if ("+u+" === undefined) "+u+" = "+j+" "+w,_||(a+="="),a+=" 0;"}a+=""+p+"if (!"+u+") { ";var t=r,I=I||[];I.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { comparison: '+R+", limit: ",a+=$?""+x:""+e.util.toQuotedString(i),a+=" , exclusive: "+_+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be "+O+' "',a+=$?"' + "+x+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=$?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var k=a;return a=I.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+k+"]); ":" validate.errors = ["+k+"]; return false; ":" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="}"}},{}],13:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s);var d="maximum"==r,p=d?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],v=e.opts.v5&&m&&m.$data,y=d?"<":">",g=d?">":"<";if(v){var P=e.util.getData(m.$data,o,e.dataPathArr),E="exclusive"+s,b="op"+s,w="' + "+b+" + '";a+=" var schemaExcl"+s+" = "+P+"; ",P="schemaExcl"+s,a+=" var exclusive"+s+"; if (typeof "+P+" != 'boolean' && typeof "+P+" != 'undefined') { ";var t=p,j=j||[];j.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var $=a;a=j.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ((exclusive"+s+" = "+P+" === true) ? "+h+" "+g+"= "+f+" : "+h+" "+g+" "+f+")) { var op"+s+" = exclusive"+s+" ? '"+y+"' : '"+y+"=';"}else{var E=m===!0,w=y;E||(w+="=");var b="'"+w+"'";a+=" if ( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+h+" "+g,E&&(a+="="),a+=" "+f+") {"}var t=r,j=j||[];j.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { comparison: '+b+", limit: "+f+", exclusive: "+E+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be "+w+" ",a+=u?"' + "+f:""+i+"'"),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var $=a;return a=j.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s);var d="maxItems"==r?">":"<";a+="if ( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+h+".length "+d+" "+f+") { ";var t=r,p=p||[];p.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { limit: '+f+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",a+="maxItems"==r?"more":"less",a+=" than ",a+=u?"' + "+f+" + '":""+i,a+=" items' "),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s);var d="maxLength"==r?">":"<";a+="if ( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=e.opts.unicode===!1?" "+h+".length ":" ucs2length("+h+") ",a+=" "+d+" "+f+") { ";var t=r,p=p||[];p.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { limit: '+f+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be ",a+="maxLength"==r?"longer":"shorter",a+=" than ",a+=u?"' + "+f+" + '":""+i,a+=" characters' "),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;
+u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s);var d="maxProperties"==r?">":"<";a+="if ( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" Object.keys("+h+").length "+d+" "+f+") { ";var t=r,p=p||[];p.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { limit: '+f+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",a+="maxProperties"==r?"more":"less",a+=" than ",a+=u?"' + "+f+" + '":""+i,a+=" properties' "),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.schema[r],s=e.schemaPath+"."+r,o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c=n.baseId,h=a;if(h)for(var u,f=-1,d=h.length-1;d>f;)u=h[f+=1],e.util.schemaHasRules(u,e.RULES.all)&&(n.schema=u,n.schemaPath=s+"["+f+"]",n.errSchemaPath=o+"/"+f,t+=" "+e.validate(n)+" ",n.baseId=c,i&&(t+=" if (valid"+n.level+") { ",l+="}"));return i&&(t+=" "+l.slice(0,-1)),t=e.util.cleanUpCode(t)}},{}],18:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="errs__"+s,d=e.util.copy(e),p="";d.level++;var m=i.every(function(r){return e.util.schemaHasRules(r,e.RULES.all)});if(m){var v=d.baseId;a+=" var "+f+" = errors; var "+u+" = false; ";var y=e.compositeRule;e.compositeRule=d.compositeRule=!0;var g=i;if(g)for(var P,E=-1,b=g.length-1;b>E;)P=g[E+=1],d.schema=P,d.schemaPath=n+"["+E+"]",d.errSchemaPath=l+"/"+E,a+=" "+e.validate(d)+" ",d.baseId=v,a+=" "+u+" = "+u+" || valid"+d.level+"; if (!"+u+") { ",p+="}";e.compositeRule=d.compositeRule=y,a+=" "+p+" if (!"+u+") { var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"anyOf")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)}else c&&(a+=" if (true) { ");return a}},{}],19:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f=e.opts.v5&&i.$data,d=f?e.util.getData(i.$data,o,e.dataPathArr):i;f&&(a+=" var schema"+s+" = "+d+"; ",d="schema"+s),f||(a+=" var schema"+s+" = validate.schema"+n+";"),a+="var "+u+" = equal("+h+", schema"+s+"); if (!"+u+") { ";var p=p||[];p.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"constant")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }"}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="errs__"+s,f=e.util.copy(e),d="";f.level++;var p={},m={};for(P in i){var v=i[P],y=Array.isArray(v)?m:p;y[P]=v}a+="var "+u+" = errors;";var g=e.errorPath;a+="var missing"+s+";";for(var P in m){if(y=m[P],a+=" if ("+h+e.util.getProperty(P)+" !== undefined ",c){a+=" && ( ";var E=y;if(E)for(var b,w=-1,j=E.length-1;j>w;){b=E[w+=1],w&&(a+=" || ");var $=e.util.getProperty(b);a+=" ( "+h+$+" === undefined && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?b:$)+") ) "}a+=")) { ";var x="missing"+s,S="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(g,x,!0):g+" + "+x);var _=_||[];_.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"dependencies")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { property: '"+e.util.escapeQuotes(P)+"', missingProperty: '"+S+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",a+=1==y.length?"property "+e.util.escapeQuotes(y[0]):"properties "+e.util.escapeQuotes(y.join(", ")),a+=" when property "+e.util.escapeQuotes(P)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var R=a;a=_.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+R+"]); ":" validate.errors = ["+R+"]; return false; ":" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var O=y;if(O)for(var I,k=-1,A=O.length-1;A>k;){I=O[k+=1];var $=e.util.getProperty(I),S=e.util.escapeQuotes(I);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(g,I,e.opts.jsonPointers)),a+=" if ("+h+$+" === undefined) { var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"dependencies")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { property: '"+e.util.escapeQuotes(P)+"', missingProperty: '"+S+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",a+=1==y.length?"property "+e.util.escapeQuotes(y[0]):"properties "+e.util.escapeQuotes(y.join(", ")),a+=" when property "+e.util.escapeQuotes(P)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(d+="}",a+=" else { ")}e.errorPath=g;var q=f.baseId;for(var P in p){var v=p[P];e.util.schemaHasRules(v,e.RULES.all)&&(a+=" valid"+f.level+" = true; if ("+h+"['"+P+"'] !== undefined) { ",f.schema=v,f.schemaPath=n+e.util.getProperty(P),f.errSchemaPath=l+"/"+e.util.escapeFragment(P),a+=" "+e.validate(f)+" ",f.baseId=q,a+=" } ",c&&(a+=" if (valid"+f.level+") { ",d+="}"))}return c&&(a+=" "+d+" if ("+u+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],21:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f=e.opts.v5&&i.$data,d=f?e.util.getData(i.$data,o,e.dataPathArr):i;f&&(a+=" var schema"+s+" = "+d+"; ",d="schema"+s);var p="i"+s;f||(a+=" var schema"+s+" = validate.schema"+n+";"),a+="var "+u+";",f&&(a+=" if (schema"+s+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+s+")) "+u+" = false; else {"),a+=""+u+" = false;for (var "+p+"=0; "+p+"
",b,c);return a=a.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,e),a=a.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,e),a=a.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,e),a=d.subParser("lists")(a,b,c),a=d.subParser("codeBlocks")(a,b,c),a=d.subParser("tables")(a,b,c),a=d.subParser("hashHTMLBlocks")(a,b,c),a=d.subParser("paragraphs")(a,b,c),a=c.converter._dispatch("blockGamut.after",a,b,c)}),d.subParser("blockQuotes",function(a,b,c){"use strict";return a=c.converter._dispatch("blockQuotes.before",a,b,c),a=a.replace(/((^[ \t]{0,3}>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(a,e){var f=e;return f=f.replace(/^[ \t]*>[ \t]?/gm,"~0"),f=f.replace(/~0/g,""),f=f.replace(/^[ \t]+$/gm,""),f=d.subParser("githubCodeBlocks")(f,b,c),f=d.subParser("blockGamut")(f,b,c),f=f.replace(/(^|\n)/g,"$1 "),f=f.replace(/(\s*[^\r]+?<\/pre>)/gm,function(a,b){var c=b;return c=c.replace(/^ /gm,"~0"),c=c.replace(/~0/g,"")}),d.subParser("hashBlock")("
","gim")}),d.subParser("headers",function(a,b,c){"use strict";function e(a){var b,e=a.replace(/[^\w]/g,"").toLowerCase();return c.hashLinkCounts[e]?b=e+"-"+c.hashLinkCounts[e]++:(b=e,c.hashLinkCounts[e]=1),f===!0&&(f="section"),d.helper.isString(f)?f+b:b}a=c.converter._dispatch("headers.before",a,b,c);var f=b.prefixHeaderId,g=isNaN(parseInt(b.headerLevelStart))?1:parseInt(b.headerLevelStart),h=b.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,i=b.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;return a=a.replace(h,function(a,f){var h=d.subParser("spanGamut")(f,b,c),i=b.noHeaderId?"":' id="'+e(f)+'"',j=g,k="\n"+f+"\n
",b,c)}),a=c.converter._dispatch("blockQuotes.after",a,b,c)}),d.subParser("codeBlocks",function(a,b,c){"use strict";a=c.converter._dispatch("codeBlocks.before",a,b,c),a+="~0";var e=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g;return a=a.replace(e,function(a,e,f){var g=e,h=f,i="\n";return g=d.subParser("outdent")(g),g=d.subParser("encodeCode")(g),g=d.subParser("detab")(g),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,""),b.omitExtraWLInCodeBlocks&&(i=""),g="
",d.subParser("hashBlock")(g,b,c)+h}),a=a.replace(/~0/,""),a=c.converter._dispatch("codeBlocks.after",a,b,c)}),d.subParser("codeSpans",function(a,b,c){"use strict";return a=c.converter._dispatch("codeSpans.before",a,b,c),"undefined"==typeof a&&(a=""),a=a.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(a,b,c,e){var f=e;return f=f.replace(/^([ \t]*)/g,""),f=f.replace(/[ \t]*$/g,""),f=d.subParser("encodeCode")(f),b+""+g+i+"
"+f+"
"}),a=c.converter._dispatch("codeSpans.after",a,b,c)}),d.subParser("detab",function(a){"use strict";return a=a.replace(/\t(?=\t)/g," "),a=a.replace(/\t/g,"~A~B"),a=a.replace(/~B(.+?)~A/g,function(a,b){for(var c=b,d=4-c.length%4,e=0;d>e;e++)c+=" ";return c}),a=a.replace(/~A/g," "),a=a.replace(/~B/g,"")}),d.subParser("encodeAmpsAndAngles",function(a){"use strict";return a=a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),a=a.replace(/<(?![a-z\/?\$!])/gi,"<")}),d.subParser("encodeBackslashEscapes",function(a){"use strict";return a=a.replace(/\\(\\)/g,d.helper.escapeCharactersCallback),a=a.replace(/\\([`*_{}\[\]()>#+-.!])/g,d.helper.escapeCharactersCallback)}),d.subParser("encodeCode",function(a){"use strict";return a=a.replace(/&/g,"&"),a=a.replace(//g,">"),a=d.helper.escapeCharacters(a,"*_{}[]\\",!1)}),d.subParser("encodeEmailAddress",function(a){"use strict";var b=[function(a){return""+a.charCodeAt(0)+";"},function(a){return""+a.charCodeAt(0).toString(16)+";"},function(a){return a}];return a="mailto:"+a,a=a.replace(/./g,function(a){if("@"===a)a=b[Math.floor(2*Math.random())](a);else if(":"!==a){var c=Math.random();a=c>.9?b[2](a):c>.45?b[1](a):b[0](a)}return a}),a=''+a+"",a=a.replace(/">.+:/g,'">')}),d.subParser("escapeSpecialCharsWithinTagAttributes",function(a){"use strict";var b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi;return a=a.replace(b,function(a){var b=a.replace(/(.)<\/?code>(?=.)/g,"$1`");return b=d.helper.escapeCharacters(b,"\\`*_",!1)})}),d.subParser("githubCodeBlocks",function(a,b,c){"use strict";return b.ghCodeBlocks?(a=c.converter._dispatch("githubCodeBlocks.before",a,b,c),a+="~0",a=a.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(a,e,f){var g=b.omitExtraWLInCodeBlocks?"":"\n";return f=d.subParser("encodeCode")(f),f=d.subParser("detab")(f),f=f.replace(/^\n+/g,""),f=f.replace(/\n+$/g,""),f="
",f=d.subParser("hashBlock")(f,b,c),"\n\n~G"+(c.ghCodeBlocks.push({text:a,codeblock:f})-1)+"G\n\n"}),a=a.replace(/~0/,""),c.converter._dispatch("githubCodeBlocks.after",a,b,c)):a}),d.subParser("hashBlock",function(a,b,c){"use strict";return a=a.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(c.gHtmlBlocks.push(a)-1)+"K\n\n"}),d.subParser("hashElement",function(a,b,c){"use strict";return function(a,b){var d=b;return d=d.replace(/\n\n/g,"\n"),d=d.replace(/^\n/,""),d=d.replace(/\n+$/g,""),d="\n\n~K"+(c.gHtmlBlocks.push(d)-1)+"K\n\n"}}),d.subParser("hashHTMLBlocks",function(a,b,c){"use strict";for(var e=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],f=function(a,b,d,e){var f=a;return-1!==d.search(/\bmarkdown\b/)&&(f=d+c.converter.makeHtml(b)+e),"\n\n~K"+(c.gHtmlBlocks.push(f)-1)+"K\n\n"},g=0;g"+f+g+"
]*>","
","gi"),f=0;f]*>","^(?: |\\t){0,3}
\\s*]*>\s*
]*>/.test(k)&&(l=!0)}f[h]=k}return a=f.join("\n\n"),a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,""),c.converter._dispatch("paragraphs.after",a,b,c)}),d.subParser("runExtension",function(a,b,c,d){"use strict";if(a.filter)b=a.filter(b,d.converter,c);else if(a.regex){var e=a.regex;!e instanceof RegExp&&(e=new RegExp(e,"g")),b=b.replace(e,a.replace)}return b}),d.subParser("spanGamut",function(a,b,c){"use strict";return a=c.converter._dispatch("spanGamut.before",a,b,c),a=d.subParser("codeSpans")(a,b,c),a=d.subParser("escapeSpecialCharsWithinTagAttributes")(a,b,c),a=d.subParser("encodeBackslashEscapes")(a,b,c),a=d.subParser("images")(a,b,c),a=d.subParser("anchors")(a,b,c),a=d.subParser("autoLinks")(a,b,c),a=d.subParser("encodeAmpsAndAngles")(a,b,c),a=d.subParser("italicsAndBold")(a,b,c),a=d.subParser("strikethrough")(a,b,c),a=a.replace(/ +\n/g,"
\n"),a=c.converter._dispatch("spanGamut.after",a,b,c)}),d.subParser("strikethrough",function(a,b,c){"use strict";return b.strikethrough&&(a=c.converter._dispatch("strikethrough.before",a,b,c),a=a.replace(/(?:~T){2}([\s\S]+?)(?:~T){2}/g,"$1"),a=c.converter._dispatch("strikethrough.after",a,b,c)),a}),d.subParser("stripBlankLines",function(a){"use strict";return a.replace(/^[ \t]+$/gm,"")}),d.subParser("stripLinkDefinitions",function(a,b,c){"use strict";var e=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(\S+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=~0))/gm;return a+="~0",a=a.replace(e,function(a,e,f,g,h,i,j){return e=e.toLowerCase(),c.gUrls[e]=d.subParser("encodeAmpsAndAngles")(f),i?i+j:(j&&(c.gTitles[e]=j.replace(/"|'/g,""")),b.parseImgDimensions&&g&&h&&(c.gDimensions[e]={width:g,height:h}),"")}),a=a.replace(/~0/,"")}),d.subParser("tables",function(a,b,c){"use strict";function e(a){return/^:[ \t]*--*$/.test(a)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(a)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(a)?' style="text-align:center;"':""}function f(a,e){var f="";return a=a.trim(),b.tableHeaderId&&(f=' id="'+a.replace(/ /g,"_").toLowerCase()+'"'),a=d.subParser("spanGamut")(a,b,c),""+a+" \n"}function g(a,e){var f=d.subParser("spanGamut")(a,b,c);return""+f+" \n"}function h(a,b){for(var c="\n\n
\n"}if(!b.tables)return a;var i=/^[ \t]{0,3}\|?.+\|.+\n[ \t]{0,3}\|?[ \t]*:?[ \t]*(?:-|=){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:-|=){2,}[\s\S]+?(?:\n\n|~0)/gm;return a=c.converter._dispatch("tables.before",a,b,c),a=a.replace(i,function(a){var b,c=a.split("\n");for(b=0;b\n",d=a.length,e=0;d>e;++e)c+=a[e];for(c+=" \n\n\n",e=0;e
The following assertions are being evaluated:
+ + + diff --git a/testing/web-platform/tests/annotation-model/tools/template_manual b/testing/web-platform/tests/annotation-model/tools/template_manual new file mode 100644 index 0000000000..14b3b9aa8b --- /dev/null +++ b/testing/web-platform/tests/annotation-model/tools/template_manual @@ -0,0 +1,42 @@ + + + +Fill the textarea below with JSON output from your annotation client +implementation that supports the following criteria:
+ + +Specifically, the following assertions will be evaluated:
+ + + diff --git a/testing/web-platform/tests/annotation-model/tools/tests/README.md b/testing/web-platform/tests/annotation-model/tools/tests/README.md new file mode 100644 index 0000000000..92e4f97c73 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/tools/tests/README.md @@ -0,0 +1,10 @@ +Tree to Test the Tests +====================== + +This folder is meant to contain a collection of .jsonld files that mirror the +structure of the top level folders and subfolders with .test files. A script +(@@@TODO@@@) will walk this tree, taking each folder and running it through the +corresponding .test file to ensure that the test is working as expected. An +argument to that script will report on any .jsonld files that do not have a +corresponding .test file, and vice versa. + -- cgit v1.2.3