tor-browser

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

4.4-styleClassValidIfPresent.json (3032B)


      1 {
      2  "$schema": "http://json-schema.org/draft-04/schema#",
      3  "id": "4.4-styleClassValidIfPresent.json",
      4  "assertionType": "must",
      5  "expectedResult": "valid",
      6  "onUnexpectedResult" : "failAndContinue",
      7  "errorMessage": "ERROR: Annotation contains one or more Specific Resources with styleClass key, but does not contain an Annotation-level stylesheet key.",
      8  "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)",
      9  "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)",
     10  "type": "object",
     11  "anyOf":
     12   [
     13    { "required": ["stylesheet"] },
     14    { "not":
     15      {
     16        "anyOf":
     17         [
     18          { "$ref": "#/definitions/bodyHasStyleClass" },
     19          { "$ref": "#/definitions/targHasStyleClass" }
     20         ]
     21      }
     22    }
     23   ],
     24  "definitions":
     25   {
     26      "bodyHasStyleClass":
     27      {
     28        "properties":
     29        {
     30            "body":
     31            {
     32               "oneOf":
     33               [
     34                  { "anyOf":
     35                  [
     36                    { "$ref": "specificResource.json#/definitions/styleClassDetected" },
     37                    { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
     38                   ]
     39                  },
     40                   { "not":
     41                     { "items":
     42                        { "not":
     43                           { "anyOf": [
     44                              { "$ref": "specificResource.json#/definitions/styleClassDetected" },
     45                              { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
     46                             ]
     47                           }
     48                         }
     49                     }
     50                   }
     51               ]
     52             }
     53         },
     54         "required": ["body"]
     55      },
     56 
     57      "targHasStyleClass":
     58      {
     59        "properties":
     60        {
     61            "target":
     62            {
     63               "oneOf":
     64               [
     65                  { "anyOf":
     66                   [
     67                    { "$ref": "specificResource.json#/definitions/styleClassDetected" },
     68                    { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
     69                   ]
     70                  },
     71                   { "not":
     72                     { "items":
     73                        { "not":
     74                           { "anyOf": [
     75                              { "$ref": "specificResource.json#/definitions/styleClassDetected" },
     76                              { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" }
     77                             ]
     78                           }
     79                         }
     80                     }
     81                   }
     82               ]
     83             }
     84         },
     85         "required": [ "target" ]
     86      }
     87   }
     88 }