4.2-fragmentCssXPathSelectorValid.json (3632B)
1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "id": "4.2-fragmentCssXPathSelectorValid.json", 4 "assertionType": "must", 5 "expectedResult": "valid", 6 "onUnexpectedResult" : "failAndContinue", 7 "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.", 8 "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)", 9 "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)", 10 "type": "object", 11 "patternProperties": 12 { 13 "^(body|target)$": 14 { 15 "oneOf": 16 [ 17 {"$ref": "id.json#/definitions/stringUri" }, 18 { 19 "allOf": 20 [ 21 { "$ref": "#/definitions/selectorSchema" }, 22 { "$ref": "#/definitions/itemsSchema" } 23 ] 24 }, 25 { 26 "type": "array", 27 "minItems": 1, 28 "items": 29 { 30 "oneOf": 31 [ 32 {"$ref": "id.json#/definitions/stringUri" }, 33 { 34 "allOf": 35 [ 36 { "$ref": "#/definitions/selectorSchema" }, 37 { "$ref": "#/definitions/itemsSchema" } 38 ] 39 } 40 ] 41 } 42 } 43 ] 44 } 45 }, 46 "definitions": 47 { 48 "selectorSchema": 49 { 50 "type": "object", 51 "properties": 52 { 53 "selector": 54 { 55 "oneOf": 56 [ 57 {"$ref": "id.json#/definitions/stringUri" }, 58 { 59 "type":"object", 60 "allOf": 61 [ 62 { "$ref": "specificResource.json#/definitions/fragmentSelectorTypeValidIfPresent" }, 63 { "$ref": "specificResource.json#/definitions/cssSelectorTypeValidIfPresent" }, 64 { "$ref": "specificResource.json#/definitions/xpathSelectorTypeValidIfPresent" } 65 ] 66 }, 67 { 68 "type": "array", 69 "minItems": 1, 70 "items": 71 { 72 "oneOf": 73 [ 74 {"$ref": "id.json#/definitions/stringUri" }, 75 { 76 "type":"object", 77 "allOf": 78 [ 79 { "$ref": "specificResource.json#/definitions/fragmentSelectorTypeValidIfPresent" }, 80 { "$ref": "specificResource.json#/definitions/cssSelectorTypeValidIfPresent" }, 81 { "$ref": "specificResource.json#/definitions/xpathSelectorTypeValidIfPresent" } 82 ] 83 } 84 ] 85 } 86 } 87 ] 88 } 89 } 90 }, 91 92 "itemsSchema": 93 { 94 "type": "object", 95 "properties": 96 { 97 "items": 98 { 99 "type": "array", 100 "minItems": 1, 101 "items": { 102 "oneOf": 103 [ 104 {"$ref": "id.json#/definitions/stringUri" }, 105 {"$ref": "#/definitions/selectorSchema" } 106 ] 107 } 108 } 109 } 110 } 111 } 112 }