summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/annotation-model/annotations/specificResource
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/annotation-model/annotations/specificResource
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/annotation-model/annotations/specificResource')
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/3.2.2-targType.json38
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/3.3.3-targAudience.json38
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-TextDataPositionSelectorValid.json110
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-fragmentCssXPathSelectorValid.json112
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorFound.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorValidIfPresent.json43
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-conformsTo.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-fragmentSelector.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.2-cssSelector.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.3-xpathSelector.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-prefix.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-suffix.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelector.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelectorValid.json107
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.5-textPositionSelector.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.6-dataPositionSelector.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelector.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelectorValid.json107
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelector.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelectorValid.json107
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateFound.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateValidIfPresent.json43
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-cached.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeState.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeStateValid.json107
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-httpRequestStateValid.json107
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-requestHeaderState.json113
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedBy.json91
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedByValidated.json45
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClass.json91
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json88
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.5-renderedVia.json91
-rw-r--r--testing/web-platform/tests/annotation-model/annotations/specificResource/4.6-scope.json91
33 files changed, 3224 insertions, 0 deletions
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