tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

4.2.8-rangeSelectorValid.json (3235B)


      1 {
      2  "$schema": "http://json-schema.org/draft-04/schema#",
      3  "id": "4.2.8-rangeSelectorValid.json",
      4  "assertionType": "must",
      5  "expectedResult": "valid",
      6  "onUnexpectedResult" : "failAndContinue",
      7  "errorMessage": "ERROR: Annotation contains a Range selector that is NOT of format uri and NOT an object having both startSelector and endSelector keys.",
      8  "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)",
      9  "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)",
     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/rangeSelectorTypeValidIfPresent" }
     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/rangeSelectorTypeValidIfPresent" }                     ]
     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 }