|
973 | 973 |
|
974 | 974 | <section title="A Vocabulary for Applying Subschemas"> |
975 | 975 | <t> |
976 | | - Validation begins by applying the root schema to the complete instance |
977 | | - document. From there, various keywords are used to determine which additional |
978 | | - subschemas are applied to either the current location, or a child location. |
979 | | - These keywords also define whether and how subschema assertion results are |
980 | | - modified and/or combined. Such keywords do not assert conditions on their |
981 | | - own. Rather, they control how assertions are applied and evaluated. |
| 976 | + Evaluation of an instance against a schema begins by applying the root schema |
| 977 | + to the complete instance document. From there, various keywords are used |
| 978 | + to determine which additional subschemas are applied to either the current |
| 979 | + location, or a child location. These keywords also define how subschema |
| 980 | + assertion results are modified and/or combined. Annotation results are |
| 981 | + combined according to the rules specified by each annotation keyword. |
982 | 982 | </t> |
983 | 983 | <t> |
984 | | - The keywords in the <xref target="logic">boolean logic</xref> and |
985 | | - <xref target="conditional">conditional</xref> sections of this specification |
986 | | - apply subschemas to the same location as the parent schema. The former group |
987 | | - defines boolean operations on the subschema assertion results, while the |
988 | | - latter evaluates one subschema and uses its assertion results to determine |
989 | | - which of two other subschemas to apply as well. |
990 | | - </t> |
991 | | - <t> |
992 | | - Several keywords determine which subschemas are applied to array items, |
993 | | - object property values, and object property names. They are: |
994 | | - "items", "additionalItems", "contains", "properties", "patternProperties", |
995 | | - "additionalProperties", and "propertyNames". The "contains" keyword only |
996 | | - requires its subschema to be valid against at least one child instance, while |
997 | | - the other keywords require that all subschemas are valid against all child |
998 | | - instances to which they apply. |
| 984 | + Keyword that apply subschemas are called applicators, and do not assert |
| 985 | + conditions on their own. Rather, they control how assertions are applied |
| 986 | + and evaluated. This section defines a set of applicator keywords that |
| 987 | + are RECOMMENDED for use as the basis of other vocabularies. |
999 | 988 | </t> |
1000 | 989 | <section title="Keyword Independence"> |
1001 | 990 | <t> |
1002 | | - Validation keywords typically operate independently, without |
| 991 | + Schema keywords typically operate independently, without |
1003 | 992 | affecting each other's outcomes. |
1004 | 993 | </t> |
1005 | 994 | <t> |
1006 | 995 | For schema author convenience, there are some exceptions among the |
1007 | | - keywords that control subschema applicability: |
| 996 | + keywords in this vocabulary: |
1008 | 997 | <list> |
1009 | 998 | <t> |
1010 | 999 | "additionalProperties", whose behavior is defined in terms of |
|
1018 | 1007 | </section> |
1019 | 1008 |
|
1020 | 1009 | <section title="Keywords for Applying Subschemas in Place"> |
| 1010 | + <t> |
| 1011 | + These keywords apply subschemas to the same location in the instance |
| 1012 | + as the parent schema is being applied. They allow combining |
| 1013 | + or modifying the subschema results in various ways. |
| 1014 | + </t> |
1021 | 1015 |
|
1022 | 1016 | <section title="Keywords for Applying Subschemas With Boolean Logic" anchor="logic"> |
| 1017 | + <t> |
| 1018 | + These keywords correspond to logical operators for combining or modifying |
| 1019 | + the boolean assertion results of the subschemas. They have no direct |
| 1020 | + impact on annotation collection, although they enable the same annotation |
| 1021 | + keyword to be applied to an instance location with different values. |
| 1022 | + Annotation keywords define their own rules for combining such values. |
| 1023 | + </t> |
1023 | 1024 | <section title="allOf"> |
1024 | 1025 | <t> |
1025 | 1026 | This keyword's value MUST be a non-empty array. |
|
1118 | 1119 | </t> |
1119 | 1120 | <t> |
1120 | 1121 | When "if" is present, and the instance successfully |
1121 | | - validates against its subschema, then valiation |
| 1122 | + validates against its subschema, then validation |
1122 | 1123 | succeeds against this keyword if the instance also |
1123 | 1124 | successfully validates against this keyword's subschema. |
1124 | 1125 | </t> |
|
1136 | 1137 | </t> |
1137 | 1138 | <t> |
1138 | 1139 | When "if" is present, and the instance fails to |
1139 | | - validate against its subschema, then valiation |
| 1140 | + validate against its subschema, then validation |
1140 | 1141 | succeeds against this keyword if the instance |
1141 | 1142 | successfully validates against this keyword's subschema. |
1142 | 1143 | </t> |
|
1151 | 1152 | </section> |
1152 | 1153 | </section> |
1153 | 1154 | <section title="Keywords for Applying Subschemas to Child Instances"> |
| 1155 | + <t> |
| 1156 | + Each of these keywords defines a rule for applying its |
| 1157 | + subschema(s) to child instances, specifically object |
| 1158 | + properties and array items, and combining their results. |
| 1159 | + </t> |
1154 | 1160 | <section title="Keywords for Applying Subschemas to Arrays"> |
1155 | 1161 | <section title="items"> |
1156 | 1162 | <t> |
|
0 commit comments