tor-browser

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

4.2-TextDataPositionSelectorValid.json (3551B)


      1 {
      2  "$schema": "http://json-schema.org/draft-04/schema#",
      3  "id": "4.2-textDataPositionSelectorValid.json",
      4  "assertionType": "must",
      5  "expectedResult": "valid",
      6  "onUnexpectedResult" : "failAndContinue",
      7  "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.",
      8  "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)",
      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 both start and end keys, each with a single non-negative integer 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/textPositionSelectorTypeValidIfPresent" },
     63                  { "$ref": "specificResource.json#/definitions/dataPositionSelectorTypeValidIfPresent" }
     64                 ]
     65                },
     66                {
     67                 "type": "array",
     68                 "minItems": 1,
     69                 "items":
     70                 {
     71                   "oneOf":
     72                   [
     73                    {"$ref": "id.json#/definitions/stringUri" },
     74                    {
     75                     "type":"object",
     76                     "allOf":
     77                     [
     78                      { "$ref": "specificResource.json#/definitions/textPositionSelectorTypeValidIfPresent" },
     79                      { "$ref": "specificResource.json#/definitions/dataPositionSelectorTypeValidIfPresent" }
     80                     ]
     81                    }
     82                   ]
     83                 }
     84                }
     85              ]
     86            }
     87         }
     88      },
     89 
     90      "itemsSchema":
     91      {
     92        "type": "object",
     93        "properties":
     94        {
     95            "items":
     96            {
     97                "type": "array",
     98                "minItems": 1,
     99                "items": {
    100                  "oneOf":
    101                    [
    102                        {"$ref": "id.json#/definitions/stringUri" },
    103                        {"$ref": "#/definitions/selectorSchema" }
    104                    ]
    105                }
    106            }
    107        }
    108      }
    109  }
    110 }