Commit abe46829 authored by Jason Fox's avatar Jason Fox
Browse files

Add whitespace.

parent 39b670d8
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -30,12 +30,16 @@ Even though the JSON serialization format allows inclusion of any character in
the Unicode space, NGSI-LD restricts Entity Type names, Property names and
Relationship names to the following ABNF grammar:
<!-- prettier-ignore-start -->
```text
nameChar = unicodeNumber / unicodeLetter
nameChar =/ %x5F           ; _
name = unicodeLetter *nameChar
```
<!-- prettier-ignore-end -->
- _unicodeNumber_ is any Unicode character that has _Number_ as a Category
  [n.22]. With Unicode-capable regular expression (RegEx) parsers, such a
  character may be matched by [\\p{N}]{.HTML-Code}.
@@ -46,11 +50,15 @@ name = unicodeLetter *nameChar
In order to avoid name clashing, names can be prefixed as specified by the
following BNF grammar:
<!-- prettier-ignore-start -->
```text
prefix = unicodeLetter *nameChar
name =/ prefix %x3A unicodeLetter *nameChar ; prefix:name
```
<!-- prettier-ignore-end -->
When receiving a JSON-LD object with a name (Type, Property, Relationship)
including characters different than those expressed above, implementations
should raise an error of type [BadRequestData]{.HTML-Error}.
@@ -3695,6 +3703,8 @@ The grammar that encodes the syntax of the Scope is expressed in ABNF format
implementations. The special string ["urn:ngsi-ld:null"]{.HTML-Code} (i.e. the
NGSI-LD Null) shall be only used and only appear in case of deleted scopes.
<!-- prettier-ignore-start -->
```text
Scope = [%x2F] ScopeLevel *(%x2F ScopeLevel)              ; [/] ScopeLevel *(/ScopeLevel)
Scope =/ "urn:ngsi-ld:null"                               ; the literal string "urn:ngsi-ld:null"
@@ -3703,6 +3713,8 @@ ScopeLevelChar = unicodeNumber / unicodeLetter
ScopeLevelChar =/ %x5F                                    ; _
```
<!-- prettier-ignore-end -->
<!-- prettier-ignore-start -->
>>> [!tip] EXAMPLE 1:
+63 −36
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ with previous versions of the NGSI-LD API, a comma can be used as an alternative
representation of the or operator. For logical and grouping parenthesis are
needed.

<!-- prettier-ignore-start -->

```text
EntityTypes = OrEntityType *(orOp OrEntityType)                     ; OrEntityType|OrEntityType
OrEntityType = %x28 EntityType *(andOp EntityType) %x29             ; (EntityType;EntityType)
@@ -33,6 +35,8 @@ andOp = %x3B ; ;
orOp = %x7C / %x2C                                                  ; |  ,
```

<!-- prettier-ignore-end -->

[EntityType]{.HTML-Sample} is either a valid name as specified in clause 5.2.2.3
or a URI.

@@ -131,11 +135,12 @@ format [n.12], is the NGSI-LD Query Language. It is described below (it has been
validated using <https://github.com/ietf-tools/bap>[),]{.Hyperlink} and it shall
be supported by implementations:

<!-- prettier-ignore-start -->

```text
Query = (QueryTerm / QueryTermAssoc) *(LogicalOp (QueryTerm /
QueryTermAssoc))
QueryTermAssoc = %x28 QueryTerm *(LogicalOp QueryTerm) %x29 ;
(QueryTerm)
QueryTermAssoc = %x28 QueryTerm *(LogicalOp QueryTerm) %x29         ; (QueryTerm)
QueryTerm = Attribute
QueryTerm =/ Attribute Operator ComparableValue
QueryTerm =/ Attribute equal CompEqualityValue
@@ -143,12 +148,10 @@ QueryTerm =/ Attribute unequal CompEqualityValue
QueryTerm =/ Attribute patternOp RegExp
QueryTerm =/ Attribute notPatternOp RegExp
Attribute = LinkedEntityRelation
LinkedEntityRelation = AttrName %x7B LinkedEntityPath %x7D          ;
AttrName{LinkedEntityPath}
LinkedEntityRelation = AttrName %x7B LinkedEntityPath %x7D          ; AttrName{LinkedEntityPath}
LinkedEntityRelation =/ ValuePath
LinkedEntityPath = *1(EntityType 1*(%x2C EntityType) %x3A) AttrName %x7B
LinkedEntityPath %x7D
;*1(EntityType 1*(,EntityType):)AttrName{LinkedEntityPath}
LinkedEntityPath %x7D                                               ;*1(EntityType 1*(,EntityType):)AttrName{LinkedEntityPath}
LinkedEntityPath =/ ValuePath
ValuePath = DottedPath *1(%x5B DottedPath %x5D)                     ; DottedPath
*1([DottedPath])
@@ -179,6 +182,8 @@ orOp = %x7C ; |
LogicalOp = andOp / orOp
```

<!-- prettier-ignore-end -->

- [unicodeNumber]{.HTML-Sample} is any Unicode character that has Number as a
  Category [n.22]. With Unicode-capable regular expression (RegEx) parsers, such
  a character may be matched by \\p{N}.
@@ -937,13 +942,13 @@ Geoquery:
The following grammar defines the syntax for the geospatial relationships
(parameter name _`georel`_):

<!-- prettier-ignore-start -->

```text
andOp = %x3B ; ;
equal = %x3D %x3D ; ==
georel = nearRel / withinRel / containsRel / overlapsRel / intersectsRel
/ equalsRel / disjointRel
nearRel = nearOp andOp distance equal PositiveNumber ;
near;max(min)Distance==x (in meters)
georel = nearRel / withinRel / containsRel / overlapsRel / intersectsRel / equalsRel / disjointRel
nearRel = nearOp andOp distance equal PositiveNumber ; near;max(min)Distance==x (in meters)
distance = "maxDistance" / "minDistance"
nearOp = "near"
withinRel = "within"
@@ -951,9 +956,11 @@ containsRel = "contains"
intersectsRel = "intersects"
equalsRel = "equals"
disjointRel = "disjoint"
overlapsRel = "overlaps"
overlapsRel = "overlaps
```

<!-- prettier-ignore-end -->

[PositiveNumber]{.HTML-Sample} shall be a non-zero positive number as mandated
by the JSON Specification. Thus, it shall follow the ABNF Grammar, production
rule named [Number]{.HTML-Sample}, section 6 of IETF RFC 8259 [n.6], excluding
@@ -1077,6 +1084,8 @@ Language specified in clause 7.2.3. As a disjunction of Scopes can also be seen
as a list, a comma can be used as an alternative representation of the or
operator. For logical and grouping parenthesis are needed.

<!-- prettier-ignore-start -->

```text
ScopesQ = OrScopeQ *(orOp OrScopeQ)                         ; OrScopeQ|OrScopeQ
ScopesQ =/ %x2F %23                                         ; / #
@@ -1091,6 +1100,8 @@ ScopeQLevelChar = unicodeNumber / unicodeLetter
ScopeQLevelChar =/ %x5F                                     ; _
```

<!-- prettier-ignore-end -->

<!-- prettier-ignore-start -->

>>> [!tip] EXAMPLE 1:
@@ -1164,6 +1175,8 @@ and Relationships that were valid within the specified timeframe.

The following grammar defines the syntax that shall be supported:

<!-- prettier-ignore-start -->

```text
timerel = beforeRel / afterRel / betweenRel
beforeRel = "before"
@@ -1171,6 +1184,8 @@ afterRel = "after"
betweenRel = "between"
```

<!-- prettier-ignore-end -->

The points in time for comparison are defined as follows:

- A _`timeAt`_ parameter, which shall represent the comparison point for the
@@ -1337,12 +1352,16 @@ Attributes is a list, either a comma or a pipe character can be used as
alternative representations of the or operator. In the following, ABNF grammar
for NGSI-LD Attribute Projection Language is given.

<!-- prettier-ignore-start -->

```text
orOp = %x7C / %x2C                                  ; | ,
ProjectionTerm = AttrName *1(LinkedEntityTerm) *(orOp ProjectionTerm)
LinkedEntityTerm = %x7B ProjectionTerm %x7D         ; {ProjectionTerm}
```

<!-- prettier-ignore-end -->

See clause 7.2.3 for the definition of [AttrName]{.HTML-Sample}.

<!-- prettier-ignore-start -->
@@ -1437,11 +1456,15 @@ selected Entities

In the following, an ABNF grammar for NGSI-LD Attribute filtering is given.

<!-- prettier-ignore-start -->

```text
andOp = %x2C 										                 ; ,
FilteringTerm = AttrName *(andOp FilteringTerm)
```

<!-- prettier-ignore-end -->

See clause 7.2.3 for the definition of [AttrName]{.HTML-Sample}.

For backwards compatibility reasons, [Context Broker]{.HTML-Keyboard}
@@ -1672,6 +1695,8 @@ ordering which shall be applied sequentially.

In the following, ABNF grammar for NGSI-LD Entity Ordering Language is given.

<!-- prettier-ignore-start -->

```text
thenOp = %x2C                                                       ; ,
directionOp ::= asc | desc | dist-asc|
@@ -1680,6 +1705,8 @@ OrderingTerm = AttrName *1(DirectionTerm) *(thenOp OrderingTerm)
DirectionTerm = %x3B directionOp.                                   ; ;
```

<!-- prettier-ignore-end -->

See clause 7.2.3 for the definition of [AttrName]{.HTML-Sample}.

<!-- prettier-ignore-start -->