4.2.7-svgSelectorValid.json (3164B)
1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "id": "4.2.7-svgSelectorValid.json", 4 "assertionType": "must", 5 "expectedResult": "valid", 6 "onUnexpectedResult" : "failAndContinue", 7 "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.", 8 "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)", 9 "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)", 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/svgSelectorTypeValidIfPresent" } 63 ] 64 }, 65 { 66 "type": "array", 67 "minItems": 1, 68 "items": 69 { 70 "oneOf": 71 [ 72 {"$ref": "id.json#/definitions/stringUri" }, 73 { 74 "type":"object", 75 "allOf": 76 [ 77 { "$ref": "specificResource.json#/definitions/svgSelectorTypeValidIfPresent" } ] 78 } 79 ] 80 } 81 } 82 ] 83 } 84 } 85 }, 86 87 "itemsSchema": 88 { 89 "type": "object", 90 "properties": 91 { 92 "items": 93 { 94 "type": "array", 95 "minItems": 1, 96 "items": { 97 "oneOf": 98 [ 99 {"$ref": "id.json#/definitions/stringUri" }, 100 {"$ref": "#/definitions/selectorSchema" } 101 ] 102 } 103 } 104 } 105 } 106 } 107 }