From 8a6fd8087267441001029d12b32cd6d66935d32c Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Thu, 23 Oct 2025 19:08:41 +0200 Subject: [PATCH 1/5] - Add missing non-existence parameter to ABNF. - Add non-existence example - Add examples for equivalence based on JSON Objects. --- md/clause-7.md | 109 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 93 insertions(+), 16 deletions(-) diff --git a/md/clause-7.md b/md/clause-7.md index e807a35..a6f1b76 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 @@ -302,9 +304,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`_. >>> @@ -738,8 +740,8 @@ conditions apply: 1. The Query Term value: - - Is identical or equivalent to the target value. - - Is included in the target value, and the latter is an array. + - Is identical or equivalent to the target value. + - Is included in the target value, and the latter is an array. @@ -760,7 +762,7 @@ The Query Term value, [color=="red"]{.HTML-Code}: 2. The Query Term value is a list of values (production rule named [ValueList]{.HTML-Sample}) and: - - The target value is identical or equivalent to any of the list values + - The target value is identical or equivalent to any of the list values - The target value includes any of the Query Term values, and the target value is an array @@ -783,8 +785,8 @@ The Query Term value, [color=="black","red"]{.HTML-Code}: 3. The Query Term value is a range (production rule named [Range]{.HTML-Sample}), and: - - The target value is in the interval between the minimum and maximum of the - range (both included) + - The target value is in the interval between the minimum and maximum of the + range (both included) @@ -801,11 +803,11 @@ The Query Term value, [temperature==10..20]{.HTML-Code}: 4. The Query Term value target element corresponds to a _LanguageProperty_ and a natural language is specified and: - - a match is found as the value of the key-value pair corresponding to the - specified natural language of the _`languageMap`_. - - a match is found as a single element from the array of values of the - key-value pair corresponding to the specified natural language of the - _`languageMap`_. + - a match is found as the value of the key-value pair corresponding to the + specified natural language of the _`languageMap`_. + - a match is found as a single element from the array of values of the + key-value pair corresponding to the specified natural language of the + _`languageMap`_. @@ -868,9 +870,9 @@ The Query Term value, [description[​fr]=="pain"]{.HTML-Cod no natural language is specified and: - a match is found in any of the values of the key-value pairs of the - _`languageMap`_ + _`languageMap`_ - a match is found as a single element within the arrays of values of the - key-value pairs of the _`languageMap`_ + key-value pairs of the _`languageMap`_ @@ -979,10 +981,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: -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. + - 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 to 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"} +``` + + +- Matches to 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 to 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 to 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 -- GitLab From f272bc34a685895f25fec9b50ab0cdd620b45cd0 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Thu, 23 Oct 2025 19:17:53 +0200 Subject: [PATCH 2/5] Undo whitespacing --- md/clause-7.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/md/clause-7.md b/md/clause-7.md index a6f1b76..f5d7c62 100644 --- a/md/clause-7.md +++ b/md/clause-7.md @@ -740,8 +740,8 @@ conditions apply: 1. The Query Term value: - - Is identical or equivalent to the target value. - - Is included in the target value, and the latter is an array. + - Is identical or equivalent to the target value. + - Is included in the target value, and the latter is an array. @@ -785,8 +785,8 @@ The Query Term value, [color=="black","red"]{.HTML-Code}: 3. The Query Term value is a range (production rule named [Range]{.HTML-Sample}), and: - - The target value is in the interval between the minimum and maximum of the - range (both included) + - The target value is in the interval between the minimum and maximum of the + range (both included) @@ -803,11 +803,11 @@ The Query Term value, [temperature==10..20]{.HTML-Code}: 4. The Query Term value target element corresponds to a _LanguageProperty_ and a natural language is specified and: - - a match is found as the value of the key-value pair corresponding to the - specified natural language of the _`languageMap`_. - - a match is found as a single element from the array of values of the - key-value pair corresponding to the specified natural language of the - _`languageMap`_. + - a match is found as the value of the key-value pair corresponding to the + specified natural language of the _`languageMap`_. + - a match is found as a single element from the array of values of the + key-value pair corresponding to the specified natural language of the + _`languageMap`_. @@ -870,9 +870,9 @@ The Query Term value, [description[​fr]=="pain"]{.HTML-Cod no natural language is specified and: - a match is found in any of the values of the key-value pairs of the - _`languageMap`_ + _`languageMap`_ - a match is found as a single element within the arrays of values of the - key-value pairs of the _`languageMap`_ + key-value pairs of the _`languageMap`_ -- GitLab From 8158246782e049d878cdeb20ba31577d2ef22b96 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Thu, 23 Oct 2025 19:19:22 +0200 Subject: [PATCH 3/5] Undo whitespacing --- md/clause-7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/md/clause-7.md b/md/clause-7.md index f5d7c62..0d07e16 100644 --- a/md/clause-7.md +++ b/md/clause-7.md @@ -762,7 +762,7 @@ The Query Term value, [color=="red"]{.HTML-Code}: 2. The Query Term value is a list of values (production rule named [ValueList]{.HTML-Sample}) and: - - The target value is identical or equivalent to any of the list values + - The target value is identical or equivalent to any of the list values - The target value includes any of the Query Term values, and the target value is an array -- GitLab From 2c989bdfaafbfce34eaca1aa81f26a2bcb118adc Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Thu, 23 Oct 2025 19:21:08 +0200 Subject: [PATCH 4/5] Correct JSON examples --- md/clause-7.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/md/clause-7.md b/md/clause-7.md index 0d07e16..b5f1769 100644 --- a/md/clause-7.md +++ b/md/clause-7.md @@ -1010,8 +1010,8 @@ The Query Term value, [address[​city]==Berlin]{.HTML-Code} ```json [ - {"city": "London", "country":"GB"} - {"city": "Paris", "country":"FR"} + {"city": "London", "country":"GB"}, + {"city": "Paris", "country":"FR"}, {"city": "Berlin", "country":"DE"} ] ``` @@ -1048,8 +1048,8 @@ The Query Term value, The Query Term value, [address[​city]=& ```json [ - {"city": "London", "country":"GB"} - {"city": "Paris", "country":"FR"} + {"city": "London", "country":"GB"}, + {"city": "Paris", "country":"FR"}, {"city": "Berlin", "country":"DE"} ] ``` -- GitLab From 8a13db3c27f6f8b80d969faebf0c817dddf20c73 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Fri, 24 Oct 2025 10:43:17 +0200 Subject: [PATCH 5/5] Revise texts. Matches to -> Matches --- md/clause-7.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/md/clause-7.md b/md/clause-7.md index b5f1769..4fde3cd 100644 --- a/md/clause-7.md +++ b/md/clause-7.md @@ -815,7 +815,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 @@ -826,7 +826,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} @@ -838,7 +838,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} @@ -850,7 +850,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} @@ -880,7 +880,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 { @@ -890,7 +890,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 @@ -917,13 +917,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 [ @@ -960,13 +960,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 @@ -995,7 +995,7 @@ The Query Term value, [color=="http://example/black","http://example/red The Query Term value, [address[​city]==Berlin]{.HTML-Code}: -- Matches to the value below as the sub-attribute ["city"]{.HTML-Code} of +- Matches the value below as the sub-attribute ["city"]{.HTML-Code} of the JSON Object is identical or equivalent to the target value. @@ -1004,7 +1004,7 @@ The Query Term value, [address[​city]==Berlin]{.HTML-Code} ``` -- Matches to the value below as the sub-attribute ["city"]{.HTML-Code} of at +- 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. @@ -1036,14 +1036,14 @@ The Query Term value, [address[​city]==Berlin]{.HTML-Code} The Query Term value, The Query Term value, [address[​city]==Berlin,Tokyo]{.HTML-Code}: -- Matches to the value below as the sub-attribute ["city"]{.HTML-Code} of +- 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 to the value below, as the sub-attribute ["city"]{.HTML-Code} of at least +- 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 -- GitLab