diff --git a/md/clause-7.md b/md/clause-7.md index fb7f4d59fd58f4d07923e88da7507f5af61566fc..901fa73fc014b672b9564e19fee70347474b59ee 100644 --- a/md/clause-7.md +++ b/md/clause-7.md @@ -142,6 +142,7 @@ Query = (QueryTerm / QueryTermAssoc) *(LogicalOp (QueryTerm / QueryTermAssoc)) QueryTermAssoc = %x28 QueryTerm *(LogicalOp QueryTerm) %x29 ; (QueryTerm) QueryTerm = Attribute +QueryTerm =/ notOp Attribute QueryTerm =/ Attribute Operator ComparableValue QueryTerm =/ Attribute equal CompEqualityValue QueryTerm =/ Attribute unequal CompEqualityValue @@ -172,6 +173,7 @@ lessEq = %x3C %x3D ; <= patternOp = %x7E %x3D ; ~= notPatternOp = %x21 %x7E %x3D ; !~= dots = %x2E %x2E ; .. +notOp = %x7E ; ! TermChar = unicodeNumber / unicodeLetter TermChar =/ %x5F ; _ AttrName = unicodeLetter *TermChar @@ -301,9 +303,9 @@ RFC 3986 [5] and IETF RFC 3987 [23], for the exact list of them). >>> [!tip] EXAMPLE 6: -[?q=isMonitoredBy]{.HTML-Code} +[?q=!isMonitoredBy]{.HTML-Code} -To query for Entities that have the Attribute _`isMonitoredBy`_ ). +To query for Entities that do not have the Attribute _`isMonitoredBy`_. >>> @@ -804,7 +806,7 @@ The Query Term value, [temperature==10..20]{.HTML-Code}: The Query Term value, [description[​fr]=="pain"]{.HTML-Code} -- Matches to the _`languageMap`_ below as the value +- Matches the _`languageMap`_ below as the value ["pain"]{.HTML-Code} corresponds to the key ["fr"]{.HTML-Code} ```json @@ -815,7 +817,7 @@ The Query Term value, [description[​fr]=="pain"]{.HTML-Cod } ``` -- Does not match to the _`languageMap`_ below as the value +- Does not match the _`languageMap`_ below as the value ["pain"]{.HTML-Code}, although present in the _`languageMap`_, does not correspond to the key ["fr"]{.HTML-Code} @@ -827,7 +829,7 @@ The Query Term value, [description[​fr]=="pain"]{.HTML-Cod } ``` -- Matches to the _`languageMap`_ below as the value +- Matches the _`languageMap`_ below as the value ["pain"]{.HTML-Code} corresponds an element withn the key ["fr"]{.HTML-Code} @@ -839,7 +841,7 @@ The Query Term value, [description[​fr]=="pain"]{.HTML-Cod } ``` -- Does not match to the _`languageMap`_ below as the value +- Does not match the _`languageMap`_ below as the value ["pain"]{.HTML-Code} does not correspond to an element within the key ["fr"]{.HTML-Code} @@ -868,7 +870,7 @@ The Query Term value, [description[​fr]=="pain"]{.HTML-Cod The Query Term value, [description[\*]=="pain"]{.HTML-Code} -- Matches to the _`languageMap`_ below as the value ["pain"]{.HTML-Code} can be found. +- Matches the _`languageMap`_ below as the value ["pain"]{.HTML-Code} can be found. ```json { @@ -878,7 +880,7 @@ The Query Term value, [description[\*]=="pain"]{.HTML-Code} } ``` -- Also Matches to the _`languageMap`_ below as the value ["pain"]{.HTML-Code} can be found +- Also Matches the _`languageMap`_ below as the value ["pain"]{.HTML-Code} can be found as an element of an array. ```json @@ -904,13 +906,13 @@ The Query Term value, [description[\*]=="pain"]{.HTML-Code} The Query Term value, [color=="http://example/red"]{.HTML-Code} -- Matches to the _`object`_ below as it is identical or equivalent to the target value. +- Matches the _`object`_ below as it is identical or equivalent to the target value. ```json "http://example.com/red" ``` -- Matches to the _`objectList`_ below as it is included in the array +- Matches the _`objectList`_ below as it is included in the array ```json [ @@ -947,13 +949,13 @@ The Query Term value, [color=="http://example/red"]{.HTML-Code} The Query Term value, [color=="http://example/black","http://example/red"]{.HTML-Code} -- Matches to the _`object`_ below as it is identical or equivalent to one of the list values +- Matches the _`object`_ below as it is identical or equivalent to one of the list values ```json "http://example.com/red" ``` -- Matches to the _`object`_ below as the element ["http://example.com/red"]{.HTML-Code} +- Matches the _`object`_ below as the element ["http://example.com/red"]{.HTML-Code} is included as one of the elements within the array. ```json @@ -968,10 +970,85 @@ The Query Term value, [color=="http://example/black","http://example/red +8. The Query Term addresses a sub-attribute within a JSON Object, the target + element corresponds to a _Property_ , _ListProperty_ or _JsonProperty_ and + the value of sub-attribute: + + - Is identical or equivalent to the target value. + - Is included in one of the JSON Objects corresponding to the target value, + and the latter is an array. + + + +>>> [!tip] EXAMPLE 8: + +The Query Term value, [address[​city]==Berlin]{.HTML-Code}: + +- Matches the value below as the sub-attribute ["city"]{.HTML-Code} of + the JSON Object is identical or equivalent to the target value. + + +```json +{"city": "Berlin", "country":"DE"} +``` -8. If there is no equality between the target value data type and the Query - Term value data type, then it shall be considered as not matching. +- Matches the value below as the sub-attribute ["city"]{.HTML-Code} of at + least one of the JSON Object in the array, is identical or equivalent to the + target value. + +```json +[ + {"city": "London", "country":"GB"}, + {"city": "Paris", "country":"FR"}, + {"city": "Berlin", "country":"DE"} +] +``` + +>>> + + + +9. The Query Term addresses a sub-attribute within a JSON Object, the target + element corresponds to a _Property_ , _ListProperty_ or _JsonProperty_ and + the Query Term value is a list of values (production rule named + [ValueList]{.HTML-Sample}) and: + + - The sub-attribute of the JSON object corresponding to target value is + identical or equivalent to any of the list values + - The target value is an array of JSON objects, and the sub-attribute value + matches target value for at least one element of the array. + + + +>>> [!tip] EXAMPLE 9: + +The Query Term value, The Query Term value, [address[​city]==Berlin,Tokyo]{.HTML-Code}: + +- Matches the value below as the sub-attribute ["city"]{.HTML-Code} of + the JSON Object is identical or equivalent to one of the list values. + +```json +{"city": "Berlin", "country":"DE"} +``` + +- Matches the value below, as the sub-attribute ["city"]{.HTML-Code} of at least + one JSON Object in the array is included in one of the Query Term values + +```json +[ + {"city": "London", "country":"GB"}, + {"city": "Paris", "country":"FR"}, + {"city": "Berlin", "country":"DE"} +] +``` + +>>> + + + +10. If there is no equality between the target value data type and the Query + Term value data type, then it shall be considered as not matching. ### 7.2.4 GeoQuery language